Expand description
Control Flow Propagation Normalization Pass
The propagate_control_flow
normalization pass tries to simplify the
representation of sequences of if-else blocks that all have the same
condition. After this transformation the program should be of a form where
either all or none of the blocks are executed. Such sequences are often
generated by sequences of conditional assignment assembly instructions.
In addition to the above, the pass also removes blocks that consist of a single, unconditional jump.
For each “re-targetalbe” intraprocedural control flow transfer, i.e., call-returns and (conditional) jumps, the pass computes a new target that is equivalent to the old target but skips zero or more intermediate blocks. Knowledge about conditions that are always true when a particular branch is executed are used to resolve the target of intermediate conditional jumps.
Lastly, the newly bypassed blocks are considered dead code and are removed.
Functions
- Performs the Control Flow Propagation normalization pass.