183 views

1 Answer

0 votes
0 votes
In SSA or Single Static Assignment form, each assignment needs to be done to a distinct variable name. This is used in intermediate representation.

Given:

a = b + m ---- (1)

m = a + e ---- (2)

d = b + m ---- (3)

b = a + e ---- (4)

In the question, notice that b has been reassigned a value in equation (4) after being used a couple of times previously. So we can denote this with 2 variables as b1 and b2. Similarly, m is also reassigned in equation (2). So, use m1 and m2 to denote it.

Then, in SSA form,

a = b1 + m1

m2 = a + e

d = b1 + m2

b2 = a + e

We are using the following variables in SSA form: a, b1, b2, d, e, m1, m2. Hence, minimum number of variables needed are 7.

Related questions

254
views
0 answers
0 votes
_harshit__01 asked Nov 14, 2022
254 views
For sr 7,11- 1. i.Strings of 0's and 1's of the form aa', where a is binary string and a' is reverse of a.ii. Binary string of the form xy s.t. x!=y. Total length of xy is even, each of x and y be of odd length
1.0k
views
4 answers
2 votes
tanyagt99 asked Mar 26, 2017
1,004 views
What will be the tokens formed for ',' and '{' ?
413
views
0 answers
0 votes
Tridhara Chakrabarti asked Dec 14, 2017
413 views
Self doubt--Hello i am preparing for gate on my own reading textbooks. There is a very detailed garbage collection part in runtime environments part in Aho ... read from there.. Any past gate rankers and fellow gate aspirants kindly reply.