retagged by
1,107 views
0 votes
0 votes
retagged by

1 Answer

Best answer
3 votes
3 votes
Live variable means those which will be used again- not necessarily by same block.

int a = 5;
if(a < b)
{
   b = 7;
}
c = a;

Here the statements inside the if are in a separate basic block and a is live there because a is used again though in a different block. Compiler use live variable analysis to see for which all variables it can free the registers.
selected by

Related questions

1 votes
1 votes
1 answer
2
Na462 asked Jun 11, 2018
1,785 views
Need to tell the Variables live at the Shown points. And Please explain because I know how to identify but I am little confused in applying the concept.Thank you
1 votes
1 votes
1 answer
3
santhoshdevulapally asked Jan 4, 2017
680 views
What is live variable and dead code elimination.please explain with example each
2 votes
2 votes
3 answers
4