{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 07 - Control Flow Analysis Computing Static Single...

This preview shows pages 1–5. Sign up to view the full content.

Control Flow Analysis Last Time Constant propagation Dominator relationships Today Static Single Assignment (SSA) - a sparse program representation for data flow Dominance Frontier CS 380C Lecture 7 1 Static Single Assignment Computing Static Single Assignment (SSA) Form Overview What is SSA? Advantages of SSA over use-def chains “Flavors” of SSA Dominance frontier Control dependence Inserting φ -nodes Renaming the variables Translating out of SSA form R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck, “E ffi ciently Computing Static Single Assignment Form and the Control Dependence Graph”, ACM TOPLAS 13(4), October, 1991, pp. 451–490. CS 380C Lecture 7 2 Static Single Assignment

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
What is SSA? Each assignment to a variable is given a unique name All of the uses reached by that assignment are renamed Easy for straight-line code V 4 V 0 4 V + 5 V 0 + 5 V 6 V 1 6 V + 7 V 1 + 7 What about control flow? = φ -nodes CS 380C Lecture 7 3 Static Single Assignment What is SSA? if (. . . ) B 1 X 5 B 2 X 3 B 3 Y X B 4 if (. . . ) B 1 X 0 5 B 2 X 1 3 B 3 X 2 φ (X 0 , X 1 ) Y X 2 B 4 CS 380C Lecture 7 4 Static Single Assignment
What is SSA? I 1 B 1 I I + 1 B 2 I 0 1 B 1 I 1 φ (I 2 , I 0 ) I 2 I 1 + 1 B 2 CS 380C Lecture 7 5 Static Single Assignment Advantages of SSA over use-def chains More compact representation Easier to update? Each USE has only one definition Definitions are explicit merging of values φ -node merge together multiple definitions definitions may reach multiple φ -node CS 380C Lecture 7 6 Static Single Assignment

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
“Flavors” of SSA Where do we place φ -nodes?
This is the end of the preview. Sign up to access the rest of the document.
• Fall '08
• shmat
• Dead code elimination, Static Single Assignment, Static single assignment form, Sparse conditional constant propagation, Use-define chain

{[ snackBarMessage ]}

### Page1 / 11

07 - Control Flow Analysis Computing Static Single...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online