Compiler Designing W08L1503

Analysis of Loops

loops

  • This CFG is for a loop. At the statement Y := 0, the value of X can not be determined. As value of predecessors X := 3 and A : 2*X is needed but see that A := 2*x can only be defined when Y := 0 can get some output.

To solve this initially bottom is given to that variable for that predecessor. In this case X would have value bottom for the loop edge and then all the values are updated.

See the video for example.

Advertisements

Help to improve or comment as you wish

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s