-
Notifications
You must be signed in to change notification settings - Fork 664
Implement Sparse Conditional Constant Propagation (SSA-CCP) #889
Copy link
Copy link
Closed
Description
This will implement the algorithm proposed in https://dl.acm.org/citation.cfm?id=103136. This implementation has several pre-requisites:
- Phi placement. Although there is an implementation of Phi placement in local_ssa_elim_pass.cpp, it assumes structured control flow. A more generalized form of Phi placement (i.e., pruned SSA form) may be required.
- CFG edges. Needed for the simulation done during constant propagation.
- Propagation engine. The propagation logic for SSA-CCP can be shared by other transformations (value range propagation, attribute and copy propagation).
- Constant folding. Some of the logic needed to fold integer constants exists in opt/fold.{cpp,h}. More logic will need to be added to fold floating point.
- Control Flow cleanups. In particular, straightening of conditional branches. Constant propagation can convert predicates for conditional jumps into compile-time constant values 'true' or 'false'. This allows CFG cleanups to completely remove the conditional branch.
I will be creating new issues for these pre-requisites and link them to this issue.
Reactions are currently unavailable