1 votes 1 votes Consider the following code segment a= b - c d = a + d a = d + e d = c * f d = a * d the min number of total variables required to convert the above code segment to static single assignment form is _____________ Compiler Design compiler-design code-optimization static-single-assignment numerical-answers + – A_i_$_h asked Sep 7, 2017 • retagged Jun 21, 2022 by Lakshman Bhaiya A_i_$_h 602 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes For Static Single Assignment: A0=B0-C0; D0=A0+D1; A2=D0+E0; D3=C0*F0; D4=A0*D3; So total number of variables: A0,B0,C0,D0,D1,D2,D3,D4,E0,F0. So total 10 variables. Red_devil answered Sep 12, 2017 Red_devil comment Share Follow See all 2 Comments See all 2 2 Comments reply A_i_$_h commented Sep 12, 2017 reply Follow Share A0=B0-C0; D0=A0+D1; // why have u changed it to D1 ?? A2=D0+E0; D3=C0*F0; D4=A0*D3; 0 votes 0 votes rosshan77 commented Aug 5, 2018 reply Follow Share u left A2 and when u now count total variable will be 11 but when u consider 2nd expression D0 = A0 + D0 then it will be 10 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes Is ans is 11 simran batra answered Sep 7, 2017 simran batra comment Share Follow See 1 comment See all 1 1 comment reply A_i_$_h commented Sep 7, 2017 reply Follow Share no the answer given is 10...i feel its 9 can u explain how u derived it? 0 votes 0 votes Please log in or register to add a comment.