



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The ssa-based sparse conditional constant propagation algorithm used in compiler construction. How the use of ssa-edges for faster propagation of constants from definitions to uses, handling executable vs non-executable edges, and maintaining two worklists for control flow edges and ssa edges contribute to the efficiency of the algorithm. The document also discusses the differences between def-use edges and ssa-edges and their impact on algorithm efficiency.
Typology: Study notes
1 / 6
This page cannot be seen from the preview
Don't miss anything!




1
SSA-based algorithm is faster than the previous algorithm that was presented earlier. Basic Idea: Use SSA-edges for faster propagation of constants from definitions to uses. 2
Handling Executable vs Non-Executable Edges
When can we process a SSA edge?
Visitϕ For each operand in the ϕ-node examine the ExecutableFlag of the corresponding CFG-edge and set the operand’s lattice value as follows: CFG-edge executable lattice value same as lattice value at the definition edge of the SSA-edge. CFG-edge non-executable lattice value is UNDEF or top. Compute the lattice value of the variable on the left hand side. 9
VisitExpression Evaluate lattice value of the expression using lattice values of operands from places where they were defined. If lattice value changes then if expression is part of an assignment statement then add SSA-edge starting from left hand side to SSAWorkList elseif expression is conditional/predicate then based upon the result add appropriate CFG-edges to the FlowWorkList: TRUEtrue edge; FALSEfalse edge; and bottom both edges. 10