3,594 views

1 Answer

Best answer
8 votes
8 votes

Three-address code (often abbreviated to TAC or 3AC) is an intermediate code used by optimising compilers to aid in the implementation of code improvement and portability. Each TAC instruction has at most three operands and is typically a combination of assignment and a binary operator. For example, t1 := t2 + t3. The name derives from the use of three operands in these statements even though instructions with fewer operands may occur , just as in the case of TAC implementation of goto statements.

Single static assignment is a type of intermediate representation..But the  constraint is that each variable is assigned a value at most once but can be used any number of times..Only thing it has to be written once only..

Say  t1 = x + y , then 

        t2 = t1 + z , then if we write

        t1 = t1 + 3 , then it is an invalid SSA code as t1 is assigned second time which should not be the case..

selected by

Related questions

9 votes
9 votes
1 answer
2
papesh asked Dec 17, 2016
1,972 views
$x=5$$x=x-3$$\textbf{if } x<3$$\quad y=x*2$$\quad w=y$$\textbf{else}$$\quad y=x-3$$w=x-y$$z=x+y$Give Equivalent SSA.
0 votes
0 votes
1 answer
4
minal asked Jan 22, 2019
937 views
# of temporary variable required to create 3 address code in static single assignment form for the expression P+Q*R-S/(Q*R).