



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















CMSC 631 2
Source Code
Abstract Syntax Tree
Control Flow Graph
Object Code
CMSC 631 3
CMSC 631 4
x := a + b
y := a * b
y > a
a := a + 1
x := a + b
CMSC 631 7
x := a + b
y := a * b
y > a
a := a + 1
x := a + b
exit
entry
CMSC 631 8
CMSC 631 9
CMSC 631 10
CMSC 631 13
{a + b}
{a + b, a * b}
{a + b, a * b}
{a + b}
{a + b}
{a + b}
{a + b}
x := a + b
y := a * b
y > a
a := a + 1
x := a + b
entry
exit
CMSC 631 14
CMSC 631 15
CMSC 631 16
CMSC 631 19
{x}
{x, y, a}
{x, y, a}
{y, a, b}
{y, a, b}
{x, a, b}
{a, b} x := a + b
y := a * b
y > a
a := a + 1
x := a + b
{x, y, a, b}
{x, y, a, b}
CMSC 631 20
CMSC 631 21
CMSC 631 22
May Must
Forward
Reaching definitions
Available expressions
Backward Live variables
Very busy expressions
CMSC 631 25
CMSC 631 26
■
■
CMSC 631 27
S
CMSC 631 28
■ // Slight acceleration: Could set Out(s) = Gen(s) (Top - Kill(s))
CMSC 631 31
repeat
Take s from W
temp := f s
s′ pred(s)
Out(s′)) (f s
monotonic transfer fn )
if (temp != Out(s)) {
Out(s) := temp
W := W U succ(s)
}
until W =
CMSC 631 32
CMSC 631 33
CMSC 631 34
CMSC 631 37
CMSC 631 38
CMSC 631 39
CMSC 631 40