2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
6 .. index:: Match and Simplify
8 .. _match-and-simplify:
13 The GIMPLE and GENERIC pattern matching project match-and-simplify
14 tries to address several issues.
16 * unify expression simplifications currently spread and duplicated
17 over separate files like fold-const.cc, gimple-fold.cc and builtins.cc
19 * allow for a cheap way to implement building and simplifying
20 non-trivial GIMPLE expressions, avoiding the need to go through
21 building and simplifying GENERIC via fold_buildN and then
22 gimplifying via force_gimple_operand
24 To address these the project introduces a simple domain-specific language
25 to write expression simplifications from which code targeting GIMPLE
26 and GENERIC is auto-generated. The GENERIC variant follows the
27 fold_buildN API while for the GIMPLE variant and to address 2) new