]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/doc/gccint/match-and-simplify.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / gcc / doc / gccint / match-and-simplify.rst
1 ..
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.
5
6 .. index:: Match and Simplify
7
8 .. _match-and-simplify:
9
10 Match and Simplify
11 ------------------
12
13 The GIMPLE and GENERIC pattern matching project match-and-simplify
14 tries to address several issues.
15
16 * unify expression simplifications currently spread and duplicated
17 over separate files like fold-const.cc, gimple-fold.cc and builtins.cc
18
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
23
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
28 APIs are introduced.
29
30 .. toctree::
31 :maxdepth: 2
32
33 gimple-api
34 the-language