Please refer to the internals manual for documentation.
The match-and-simplify branch has been merged to trunk for GCC 5.
Project TODO
General
- Create/export const_ternop from fold-const.c as a better entry point to dispatch to for constant folding
- Devise a general way to dispose of dead statements exposed by fold_stmt that is cheap enough to be used from forwprop for example
Generator
Optimize the placement of ifs and withs in the generated code and avoid unnecessarily un-CSEing them
- Implement inlining of user-defined predicates at the AST level
Users
- Convert remaining users of force_gimple_operand to gimple_build
Patterns
- Remove dispatches to fold_binary and fold_ternary from fold_stmt and gimple_fold_stmt_to_constant which requires adding patterns for all simplifications that would have catched
- Implement all patterns from fold-const.c that SCCVN could have triggered
- Implement all comparison simplifications that tree-ssa-forwprop.c could have exercised from fold (this should be a subset of what is required in step 2.)
- Implement builtin foldings from builtins.c as patterns (or move them to gimple-fold.c)
Proving correctness of the GCC match.pd
Proving correctness of the GCC match.pd - Part 1, Krister Walfridsson, 2015-03-17
Proving correctness of the GCC match.pd - Part 2, Krister Walfridsson, 2015-06-14