ECE 468
Purdue University
All 1 results
Sort by
-
HW5_SOL ECE 468ECE 468 & 573 Problem Set 5: Dataflow analysis and Loop transformations
- Exam (elaborations) • 7 pages • 2022
-
- $6.49
- + learn more
ECE 468 & 573 
Problem Set 5: Dataflow analysis and Loop transformations 
Loop transformations 
For the following problems, consider the code below: 
1. X = 2; 
2. Y = 10; 
3. Y = X * Y; 
4. A = Y * X - 2 * Y; 
5. B = X / 2 + Y; 
6. Z = 10; 
7. if (B < Z) goto 12 
8. D = Y - Z * Y; 
9. Q = Y - 8; 
10. Z = Z - Q; 
11. goto 7; 
12. X = X + A*Y; 
13. if (X < Z*100) goto 4; 
14. Y = D; 
15. halt; 
1. Draw the CFG for the code above. Identify the loops in the code. 
Answer: 
1 
1. X = 2; 
2. Y ...
Fear of missing out? Then don’t!
Do you wonder why so many students wear nice clothes, have money to spare and enjoy tons of free time? Well, they sell on Stuvia! Imagine your study notes being downloaded a dozen times for $15 each. Every. Single. Day. Discover all about earning on Stuvia