Question 11
What is a Basic Block in code optimization?
A Basic Block enters at the first statement and leaves at the last statement without internal branching or jumps into the middle.
What is a Basic Block in code optimization?
A Basic Block enters at the first statement and leaves at the last statement without internal branching or jumps into the middle.
In identifying leaders to partition intermediate code into Basic Blocks, which of the following statements is a Leader?
Leaders are: (1) 1st statement, (2) Targets of jumps/gotos, and (3) Statements immediately following jumps/gotos.
What is a Control Flow Graph (CFG) in compiler optimization?
In a Control Flow Graph (CFG), nodes are Basic Blocks and edges indicate valid execution paths between blocks.
Which phase of code optimization inspects a small sliding window of target machine instructions and replaces inefficient sequences with faster ones?
Peephole optimization examines a small window (peephole) of code instructions locally to apply quick performance transformations.
Which of the following transformations is commonly performed during Peephole Optimization?
Peephole optimizations perform redundant instruction elimination, jump simplification, algebraic identities, strength reduction, and dead code removal.