Q: Given the following 3-address code

1: a = 1
2: b = 2
3: c = a + b
4: d = c - a
5: if( d < 20 ) goto 11
6: d = b * d
7: if( d > 20 ) goto 11
8: d = a + b
9: e = e + 1
10: goto 6
11: b = a + b
12: e = c - a
13: if( e < d ) goto 3
14: a = b * d
15: b = a – d

(a) What are the basic blocks for the code segment?

(b) Draw the control flow graph (CFG) for the code once you have determined the basic block.

Given the following 3-address code

1: a = 1
2: b = 2
3: c = a + b
4: d = c - a
5: if( d < 20 ) goto 11
6: d = b * d
7: if( d > 20 ) goto 11
8: d = a + b
9: e = e + 1
10: goto 6
11: b = a + b
12: e = c - a
13: if( e < d ) goto 3
14: a = b * d
15: b = a – d

(a) What are the basic blocks for the code segment?

(b) Draw the control flow graph (CFG) for the code once you have determined the basic block.

Similar Questions
    1. answers icon 1 answer
  1. [Your Name][Your Address] [City, State, Zip Code] [Email Address] [Phone Number] [Date] [Recipient Name] [Title] [Organization
    1. answers icon 1 answer
  2. Your Name][Your Address] [City, State, Zip Code] [Email Address] [Phone Number] [Date] [Recipient Name] [Title] [Organization
    1. answers icon 1 answer
  3. [Your Name][Your Address] [City, State, Zip Code] [Email Address] [Phone Number] [Date] [Recipient Name] [Title] [Organization
    1. answers icon 1 answer
more similar questions