Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Commutativity Analysis: A New Analysis Framework for Parallelizing Compilers Martin C. Rinard Pedro C. Diniz"— Presentation transcript:

1 Commutativity Analysis: A New Analysis Framework for Parallelizing Compilers Martin C. Rinard (martin@cs.ucsb.edu) martin@cs.ucsb.edu Pedro C. Diniz (pedro@cs.ucsb.edu) pedro@cs.ucsb.edu Department of Computer Science University of California, Santa Barbara Santa Barbara, CA 93106 Presented by Hardiyanto Wibisono

2 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.

3 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

4 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

5 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.

6 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

7 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

8 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.

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

10 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

11 Experimental Result (Barnes-Hut)

12 Experimental Result (Water)

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

14 Discussion


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

Similar presentations


Ads by Google