Implementation of A Three Address Code
Implementation of A Three Address Code
VANTAGE
DlSAD ADVANTAGE felds -4
Quick,Qcecs
TampEortan,
vavtablepora ot
|MPLEMENTATION
eloatin
Qses
time
CODE
mpot code
vuables
for OF
globat THREE
ostinsaton ADDRESS
space
tabe
hen a- DISADVANTAGIE TRIPLE
bt¢a= -
must beTmporaut - a
- a-b
Djaut when adoesnot
opuaor, - prant
pointa
Asapl o
to mak
() pdatd optutue that to
opahy
(0)
is
iu g',ag se
Stat inmplit
moved,
(pt to o
+
pator 2. anothee any b
y
annvlve,
cthexofhen eochra
mQung toples
b nteumodlata
Buplh eeasuanga
code to tanpttmp
wae
(0)
autuoing vaiabk
C a 9Uult
is
coda needac,
to4 ) to
() (0) sBet
d=a a-btc
INDIRECT
TRIPLES
xnd - to
iple
Zempo»asiauquusabut
() (O) Computalin
+
taty a
4pauless %
made -
paintvr
emjicitand
Compoed
thanit. to
to
(o) C
parataystoaednd the
ethg
|5 14
geasanpe
code.to
pant
tot s
eyons al
Iuplthu statement
*pasentabon
Fable
EXANPLE I a = b, * -c, +, b * -c a= (b -) t+ (b*-c)
INDIRECT
TRIPLE
QUADRUPLE TRIPE
THREE ADDR6SS CODE c t a t r
statr
b t tg (3) b t4 c3) b
te ts
ts = t t ty (4) () () (3)
a ts () ts (S) a
2-PHSt a t
dag
Example 9 () (y+(z+yt
THREE ADDRESS CODE
OVADRUPLE TRIPLG 1NDIRPCT TRIPLe
AATE
# OP ARGI ARG2 RESULT AREIARG2 NENT
(2) ti (2)
N
(8) (3)
tq=, t+z by |(3)
+
(o)
ts t3+ty + tg ty ts ( (3)