Perform Live Variable analysis for the following code. Then, based on the analysis result, employ Dead Code Elimination
Posted: Fri Jul 08, 2022 6:15 am
Perform Live Variable analysis for the following code. Then, based on the analysis result, employ Dead Code Elimination for the first basic block. (For Moodle, you can only answer DEAD (B1) where B1 is the first basic block.) (1) (2) (3) x = a*b+c; i=0; while (i < n) { if (cond) C--; (4) (5) (6) (7) (8) (9) } (10) y = a*z; else i++; z = b+c;