Please refer to the internals manual for documentation.

The match-and-simplify branch has been partly merged to trunk for GCC 5. Development continues on the branch.

Project TODO


  1. Create/export const_unop, const_binop, const_ternop from fold-const.c as a better entry point to dispatch to for constant folding
  2. Devise a general way to dispose of dead statements exposed by fold_stmt that is cheap enough to be used from forwprop for example


  1. Optimize the placement of ifs and withs in the generated code and avoid unnecessarily un-CSEing them

  2. Implement inlining of user-defined predicates at the AST level


  1. Convert remaining users of force_gimple_operand to gimple_build
  2. Convert SCCVN to use gimple_simplify (done on the branch)


  1. 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
  2. Implement all patterns from fold-const.c that SCCVN could have triggered
  3. 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.)
  4. Implement builtin foldings from builtins.c as patterns (or move them to gimple-fold.c) (some done on the branch)

Proving correctness of the GCC match.pd

  1. Proving correctness of the GCC match.pd - Part 1, Krister Walfridsson, 2015-03-17

  2. Proving correctness of the GCC match.pd - Part 2, Krister Walfridsson, 2015-06-14

None: MatchAndSimplify (last edited 2015-06-16 09:58:57 by tschwinge)