Replacements for CSE path following
- This pass does forward propagation and simplification of operands that can only come from a single def. The pass has a very good potential of catching simplifications currently done by inter-basic-block CSE (-fcse-follow-jumps and -fcse-skip-blocks) and combine: however, it is much faster than inter-basic-block CSE and runs much earlier than combine.
Unlike other attempts to supersede CSE path following, however, I did not write a general optimization framework like GCSE: instead, looking at what kinds of simplifications are only made by CSE, I tried to implement them in a very generic way. Take for example [gccbug:13724]: my fix for it was to make CSE recognize the high word of (zero_extend:DI (reg:SI M)) and simplify it to zero. After committing it, Roger Sayle also tried adding the same to [gccsource:simplify-rtx.c], but it was ineffective. This pass, instead, can use [gccsource:simplify-rtx.c] much more effectively than CSE.
Personnel
- Paolo Bonzini
- Steven Bosscher
Delivery Date
- 2005-11-18. The current version of the patch is based on the dataflow-branch, but it's not problematic to extract the required [gccsource:df.c] bits.
Benefits
- Improved compilation time, maintainability.
Modifications Required
- Code will be removed from [gccsource:cse.c] (400 lines for path following, and at least 600-700 elsewhere).
Patch posted at http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01420.html and http://gcc.gnu.org/ml/gcc-patches/2006-02/msg01421.html.