Optimization of Basic Blocks
Optimization of Basic Blocks
ex! .
a6+c
bd
e
bo Co
-a
bo C
The DAG DepPresentaton bsic bloch lets y
pefom Sereral Code imprening transformattons
On tPre. code repesented by Ihe basie dof.
Elimnate Local Comron bub expeslon.
Eliminate. dead ode
e Rerder Btatement kiat do not depend
One ano ter
dz.a-d
în abore. example are Common
da-d
la
bo Co
do
In abo re example and are t e .
C and nle Can
atfached
bo Co
Ex'
aT:Y
DAG is follow s-
t. An assi qnment from an Qrray, tihc xag
i's veprese ted by Coeating node iti
oßerator = CJ and tod chi td vern repsesen ttng
the inital -Value of the do in thscdl
the index i. Yariable becomes label o
and
this meus 20 de
to an aray ie aGIy
3. An assignmen t
is vepresented by
CIa and tree childoen representnthi node
an
4. These Vaoable labeting
yo
hhat clittesent L3 that tBe cea tion
node his al CuoDenty Constuted
nodes nhose raue depends On aO
éCDHled
the pA4.
The Tules to
4 . The oder instruction must eSpet
nodes in t e LDA G.
2-ASsignment ray.must fellaw
Porerions assignment to o evaluatoos
from the Same an aceording to te oe