Predicated Static Single Assignment (PSSA)

21
Predicated Static Single Assignment (PSSA) Presented by AbdulAziz Al-Shammari [email protected]

description

Predicated Static Single Assignment (PSSA). Presented by AbdulAziz Al-Shammari [email protected]. Papers. Path Analysis and Renaming for Predicated Instruction Scheduling - L. Carter, E .Simon, B. Calder, L. Carter, and J. Ferrante Predicated Static Single Assignment - PowerPoint PPT Presentation

Transcript of Predicated Static Single Assignment (PSSA)

Page 1: Predicated Static Single Assignment (PSSA)

Predicated Static Single Assignment(PSSA)

Presented by

AbdulAziz [email protected]

Page 2: Predicated Static Single Assignment (PSSA)

2

Papers

• Path Analysis and Renaming for Predicated Instruction Scheduling- L. Carter, E .Simon, B. Calder, L. Carter, and J. Ferrante

• Predicated Static Single Assignment- L. Carter, E .Simon, B. Calder, L. Carter, and J. Ferrante

Page 3: Predicated Static Single Assignment (PSSA)

3

Motivation

• Increasing instruction level parallelism (ILP) are needed to exploit the potential parallelism available in wide issues architectures (e.g. EPIC).

• Limitation to ILP:

- Control-flow dependencies.

- Data-flow dependencies.

Page 4: Predicated Static Single Assignment (PSSA)

4

Motivation (cont.)

• Static Single Assignment (SSA) removes false data dependencies across basic block boundaries in a CFG revealing more ILP but …

• Still need to create a larger pool of sequential instructions for even more ILP…

How?

- Eliminate control-flow dependencies using

predicated executing.

Page 5: Predicated Static Single Assignment (PSSA)

5

Motivation (cont.)

• Problem…!

- Introduces Predicate dependencies:

exists between every operation and the definition(s) of its guarding predicate.

SSA doesn’t deal with such dependencies

• Solution A predicate-sensitive implementation of SSA PSSA

Page 6: Predicated Static Single Assignment (PSSA)

6

Outline

• Predicated Execution• Predicated Static Single Assignment (PSSA)• Code Optimizations

- Predicated Speculation

- Control Height Reduction

• Experimental Results• Future Work• Conclusions

Page 7: Predicated Static Single Assignment (PSSA)

7

Predicated Execution

• Each operation is guarded by one of the predicate registers (provided by hardware arch.) that holds the value of its guarding predicate and committed only if the value of its guarding predicate is true.

• Predicate registers:– a feature in hardware to support predicated code

• Advantages– removes hard-to-predict branches– provides a larger pool for ILP (by combining several smaller basic

blocks into one larger hyperblock)

Page 8: Predicated Static Single Assignment (PSSA)

8

Predicated Execution- Hyperblock

• A hyperblock is“a predicated region of code consisting of a straight-

line sequence of instructions with a single entry point and possibly multiple exit points ”.

• If-conversion: “The process of replacing branches with compare

operations and associating operations with predicate defined by that compare”.

Page 9: Predicated Static Single Assignment (PSSA)

9

Predicated Execution- Example

Page 10: Predicated Static Single Assignment (PSSA)

10

PSSA

• Introduce Full-Path Predicates to extend SSA to handle predicate dependencies and the multiple control paths that are merged together in a single predicated region.

• Allows effective predicated scheduling by(1) eliminating false dependencies -via renaming

(2) Creating full-path predicates, and

(3) providing path-sensitive data flow analysis

• Goal: to accomplish the same objectives as SSA for a predicated hyperblock

Page 11: Predicated Static Single Assignment (PSSA)

11

PSSA- transformation..!

• Each operations is processed in turn at the top of the hyperblock and proceeding to the end.

• PSSA form: First, PSSA assigns each target of an assignment operation

in the hyperblock a unique variables.

Second, PSSA summarizes under what conditions each of

the multiple definitions of a variable reaches a joint in the

hyperblock (using full-path predicates).

Page 12: Predicated Static Single Assignment (PSSA)

12

Example

Page 13: Predicated Static Single Assignment (PSSA)

13

PSSA- transformation (cont.)

• Two phases: - Hyperblocks are converted to PSSA form before optimization.

- After optimization, PSSA inserts clean-up code on edges

leaving the hyperblock.

• Optimizations:– Predicated Speculation

– Control Height Reduction

Page 14: Predicated Static Single Assignment (PSSA)

14

Predicated Speculation (PSpec)

• PSpec schedules a normal operations at its earliest schedulable cycle.

• The speculative operation is scheduled earlier than the operation it is control dependent on, and predicated on true.

Page 15: Predicated Static Single Assignment (PSSA)

15

Control Height Reduction (CHR)

• CHR eases control constrains between multiple control statements.

• Allows successive control operations on the control path to be scheduled in the same cycle, effectively reducing control dependence height.

Page 16: Predicated Static Single Assignment (PSSA)

16

Experimental Results

Executed cycles normalized to the number of cycles to execute the original code produced by Trimaran for a 16 issue machine

Reduce execution time from 12% to 68%.

Page 17: Predicated Static Single Assignment (PSSA)

17

Experimental Results (cont.)

Weighted average number of operations schedule per cycle for hyperblocks when used using PSSA with PSpec and CHR

Page 18: Predicated Static Single Assignment (PSSA)

18

Experimental Results (cont.)

Weighted average register pressure in hyperblocks when using PSSA with PSpec and CHR

Page 19: Predicated Static Single Assignment (PSSA)

19

Experimental Results (cont.)

Static and Dynamic Code Expansion normalized to original code size.

Page 20: Predicated Static Single Assignment (PSSA)

20

Future Work

• Examine different PSSA representations to reduce code duplication and the number of full-path predicates created.

• Apply more optimization techniques

• Study the advantages in implementing ø-functions for non-critical path names.

• Create a more efficient implementation of PSSA.

Page 21: Predicated Static Single Assignment (PSSA)

21

Conclusions

• PSSA is an extension of SSA for a predicate code

• PSSA enables using code optimization such as:

- Predicated Speculation

- Control Height Reduction

(+) Using PSSA to enable Predicated peculation and Constant Height Reduction reduce execution time from 12% to 68%.

(-) PSSA increase code size significantly.