Commutativity Analysis: A New Analysis Framework for Parallelizing Compilers Martin C. Rinard Pedro C. Diniz

Slides:



Advertisements
Similar presentations
Automatic Data Movement and Computation Mapping for Multi-level Parallel Architectures with Explicitly Managed Memories Muthu Baskaran 1 Uday Bondhugula.
Advertisements

Introduction to C Programming
Symbol Table.
Static Single-Assignment ? ? Introduction: Over last few years [1991] SSA has been Stablished as… Intermediate program representation.
Data-Flow Analysis II CS 671 March 13, CS 671 – Spring Data-Flow Analysis Gather conservative, approximate information about what a program.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Subprogram Control - Data sharing Mechanisms to exchange data Arguments - data objects sent to a subprogram to be processed. Obtained through  parameters.
AUTOMATIC GENERATION OF CODE OPTIMIZERS FROM FORMAL SPECIFICATIONS Vineeth Kumar Paleri Regional Engineering College, calicut Kerala, India. (Currently,
SCIENCES USC INFORMATION INSTITUTE Pedro C. Diniz University of Southern California / Information Sciences Institute 4676 Admiralty Way, Suite 1001 Marina.
Automatic Parallelization of Divide and Conquer Algorithms Radu Rugina and Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology.
Chapter 5: Elementary Data Types Properties of types and objects –Data objects, variables and constants –Data types –Declarations –Type checking –Assignment.
Dynamic Feedback: An Effective Technique for Adaptive Computing Pedro Diniz and Martin Rinard Department of Computer Science University of California,
Commutativity Analysis: A New Analysis Technique for Parallelizing Compilers Martin C. Rinard Pedro C. Diniz April 7 th, 2010 Youngjoon Jo.
Commutativity Analysis: A New Analysis Framework for Parallelizing Compilers Martin C. Rinard Pedro C. Diniz University of California, Santa Barbara Santa.
Chapter 10 Storage Management Implementation details beyond programmer’s control Storage/CPU time trade-off Binding times to storage.
Run-Time Storage Organization
Run time vs. Compile time
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
Catriel Beeri Pls/Winter 2004/5 environment 68  Some details of implementation As part of / extension of type-checking: Each declaration d(x) associated.
Context-sensitive Analysis, II Ad-hoc syntax-directed translation, Symbol Tables, andTypes.
Improving Code Generation Honors Compilers April 16 th 2002.
1 Run time vs. Compile time The compiler must generate code to handle issues that arise at run time Representation of various data types Procedure linkage.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
Shallow Versus Deep Copy and Pointers Shallow copy: when two or more pointers of the same types point to the same memory – They point to the same data.
Maria-Cristina Marinescu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology A Synthesis Algorithm for Modular Design of.
 2006 Pearson Education, Inc. All rights reserved Classes: A Deeper Look.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 19 Clicker Questions November 3, 2009.
Data Structures Using C++ 2E Chapter 3 Pointers and Array-Based Lists.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
1 The Java Virtual Machine Yearly Programming Project.
Automatic Identification of Concurrency in Handel-C Joseph C Libby, Kenneth B Kent, Farnaz Gharibian Faculty of Computer Science University of New Brunswick.
Fast, Effective Code Generation in a Just-In-Time Java Compiler Rejin P. James & Roshan C. Subudhi CSE Department USC, Columbia.
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
Lecture 10 : Introduction to Java Virtual Machine
Programming Languages and Design Lecture 7 Subroutines and Control Abstraction Instructor: Li Ma Department of Computer Science Texas Southern University,
Course Web Page Most information about the course (including the syllabus) will be posted on the course wiki:
Chapter 12 Recursion, Complexity, and Searching and Sorting
Compiler course 1. Introduction. Outline Scope of the course Disciplines involved in it Abstract view for a compiler Front-end and back-end tasks Modules.
Overloading Binary Operators Two ways to overload –As a member function of a class –As a friend function As member functions –General syntax Data Structures.
Basic Semantics Associating meaning with language entities.
Synchronization Transformations for Parallel Computing Pedro Diniz and Martin Rinard Department of Computer Science University of California, Santa Barbara.
MD – Object Model Domain eSales Checker Presentation Régis Elling 26 th October 2005.
Effective Fine-Grain Synchronization For Automatically Parallelized Programs Using Optimistic Synchronization Primitives Martin Rinard University of California,
Introduction to Problem Solving. Steps in Programming A Very Simplified Picture –Problem Definition & Analysis – High Level Strategy for a solution –Arriving.
Data Structures Using C++ 2E Chapter 3 Pointers. Data Structures Using C++ 2E2 Objectives Learn about the pointer data type and pointer variables Explore.
Chapter 12: Pointers, Classes, Virtual Functions, and Abstract Classes.
An Object-Oriented Approach to Programming Logic and Design Chapter 3 Using Methods and Parameters.
Chapter 12 Support for Object oriented Programming.
Run-Time Storage Organization Compiler Design Lecture (03/23/98) Computer Science Rensselaer Polytechnic.
COMP3190: Principle of Programming Languages
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Overview of Compilers and JikesRVM John.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
System To Generate Test Data: The Analysis Program Syed Nabeel.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering CSCE 330 Programming Language Structures Operational Semantics (Slides mainly.
Chapter 7 Modularity Using Functions: Part II. A First Book of ANSI C, Fourth Edition 2 Variable Scope If variables created inside a function are available.
A First Book of ANSI C Fourth Edition
Pedro C. Diniz Information Sciences Institute Viterbi School of Engineering Atomic-Delayed Execution: A Concurrent Programming Model for Incomplete Graph-based.
Review Deleting an Element from a Linked List Deletion involves:
Implementing Subprograms
Compositional Pointer and Escape Analysis for Java Programs
Martin Rinard Laboratory for Computer Science
Dynamic Memory Allocation
An Integrated Synchronization and Consistency Protocol for the Implementation of a High-Level Parallel Programming Language Martin C. Rinard University.
Radu Rugina and Martin Rinard Laboratory for Computer Science
point when a program element is bound to a characteristic or property
RUN-TIME STORAGE Chuen-Liang Chen Department of Computer Science
Computational physics: intro workshop
Presentation transcript:

Commutativity Analysis: A New Analysis Framework for Parallelizing Compilers Martin C. Rinard Pedro C. Diniz Department of Computer Science University of California, Santa Barbara Santa Barbara, CA Presented by Hardiyanto Wibisono

Introduction Data dependence analysis: Inadequate for computations that manipulate dynamic, pointer-based data structures. Inadequate for computations that manipulate dynamic, pointer-based data structures. Need to perform complicated analysis to extract global properties of the data structure topology. Need to perform complicated analysis to extract global properties of the data structure topology. Inherent inability to parallelize computations that manipulate graphs. Inherent inability to parallelize computations that manipulate graphs. By using commutativity analysis, we can automatically recognize and exploit commuting operations to generate parallel code.

Building Blocks Designed to work with separable operation Designed to work with separable operation Commutativity Testing Commutativity Testing  Instance Variables  Invoked Operations Symbolic Execution Symbolic Execution Extensions Extensions  Extent Constants  Auxiliary Operations

Algorithm Pass Given a method, this pass identifies the set of extent constant variables, auxiliary operations, computing the extent as set of method and then checking the commutativity

Extent Constant Variables Using abstract interpretation to compute a read set and write set of storage descriptors that accurately represent how the computation may read and write data. Using abstract interpretation to compute a read set and write set of storage descriptors that accurately represent how the computation may read and write data. Prunes the read set so that it only contains storage descriptors that represent memory locations that the computation does not write. Prunes the read set so that it only contains storage descriptors that represent memory locations that the computation does not write.

Extents and Auxiliary Operations Performs a depth first search of the call graph Performs a depth first search of the call graph Compute the set of call sites that always invoke auxiliary operations Compute the set of call sites that always invoke auxiliary operations Compute the extent of the method Compute the extent of the method

Reference Parameter Checks Ensure that the symbolic execution operates correctly Ensure that the symbolic execution operates correctly Enforces the constraint that none of the operations in the extent write their reference parameters. Enforces the constraint that none of the operations in the extent write their reference parameters. Enforces the constraint that none of the methods are invoked with a reference parameter that points into the receiver Enforces the constraint that none of the methods are invoked with a reference parameter that points into the receiver

Separability The method never accesses an instance variable after it executes a call site that may invoke an operation in the extent. The method never accesses an instance variable after it executes a call site that may invoke an operation in the extent. The method only writes local variables or instance variables of the receiver and only reads parameters, local variables, instance variables of the receiver or extent constant variables. The method only writes local variables or instance variables of the receiver and only reads parameters, local variables, instance variables of the receiver or extent constant variables.

Commutativity Testing After checking dependence and symbolically executable, this pass comparing the two expression with both execution order

Symbolic Analysis Symbolically manipulates the expression on RHS using current set of bindings Symbolically manipulates the expression on RHS using current set of bindings Organize the RHS into a simplified form for comparison Organize the RHS into a simplified form for comparison Sort the operands according to an arbitrary order on expressions Sort the operands according to an arbitrary order on expressions

Experimental Result (Barnes-Hut)

Experimental Result (Water)

Future Research Relative Commutativity Relative Commutativity Analysis Granularity Analysis Granularity A Message-Passing Implementation A Message-Passing Implementation Pointer Analysis Pointer Analysis

Discussion