]>
Commit | Line | Data |
---|---|---|
2165588a | 1 | /* Preamble and helpers for the autogenerated generic-match.c file. |
d353bf18 | 2 | Copyright (C) 2014-2015 Free Software Foundation, Inc. |
2165588a | 3 | |
4 | This file is part of GCC. | |
5 | ||
6 | GCC is free software; you can redistribute it and/or modify it under | |
7 | the terms of the GNU General Public License as published by the Free | |
8 | Software Foundation; either version 3, or (at your option) any later | |
9 | version. | |
10 | ||
11 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
12 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 | for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with GCC; see the file COPYING3. If not see | |
18 | <http://www.gnu.org/licenses/>. */ | |
19 | ||
20 | #include "config.h" | |
21 | #include "system.h" | |
22 | #include "coretypes.h" | |
b20a8bb4 | 23 | #include "hash-set.h" |
b20a8bb4 | 24 | #include "vec.h" |
b20a8bb4 | 25 | #include "input.h" |
26 | #include "alias.h" | |
27 | #include "symtab.h" | |
28 | #include "options.h" | |
b20a8bb4 | 29 | #include "inchash.h" |
2165588a | 30 | #include "tree.h" |
b20a8bb4 | 31 | #include "fold-const.h" |
2165588a | 32 | #include "stringpool.h" |
33 | #include "stor-layout.h" | |
34 | #include "flags.h" | |
35 | #include "tm.h" | |
36 | #include "hard-reg-set.h" | |
37 | #include "function.h" | |
94ea8568 | 38 | #include "predict.h" |
2165588a | 39 | #include "basic-block.h" |
40 | #include "tree-ssa-alias.h" | |
41 | #include "internal-fn.h" | |
42 | #include "gimple-expr.h" | |
43 | #include "is-a.h" | |
44 | #include "gimple.h" | |
45 | #include "gimple-ssa.h" | |
46 | #include "tree-ssanames.h" | |
47 | #include "gimple-fold.h" | |
48 | #include "gimple-iterator.h" | |
d53441c8 | 49 | #include "hashtab.h" |
50 | #include "rtl.h" | |
51 | #include "statistics.h" | |
d53441c8 | 52 | #include "insn-config.h" |
53 | #include "expmed.h" | |
54 | #include "dojump.h" | |
55 | #include "explow.h" | |
56 | #include "calls.h" | |
57 | #include "emit-rtl.h" | |
58 | #include "varasm.h" | |
59 | #include "stmt.h" | |
2165588a | 60 | #include "expr.h" |
61 | #include "tree-dfa.h" | |
62 | #include "builtins.h" | |
63 | #include "tree-phinodes.h" | |
64 | #include "ssa-iterators.h" | |
65 | #include "dumpfile.h" | |
55534d34 | 66 | #include "generic-match.h" |
2165588a | 67 | |
8cd9143e | 68 | /* Routine to determine if the types T1 and T2 are effectively |
b1306f12 | 69 | the same for GENERIC. If T1 or T2 is not a type, the test |
70 | applies to their TREE_TYPE. */ | |
2165588a | 71 | |
8cd9143e | 72 | static inline bool |
73 | types_match (tree t1, tree t2) | |
74 | { | |
b1306f12 | 75 | if (!TYPE_P (t1)) |
76 | t1 = TREE_TYPE (t1); | |
77 | if (!TYPE_P (t2)) | |
78 | t2 = TREE_TYPE (t2); | |
79 | ||
8cd9143e | 80 | return TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2); |
81 | } | |
82 | ||
83 | /* Return if T has a single use. For GENERIC, we assume this is | |
84 | always true. */ | |
85 | ||
86 | static inline bool | |
87 | single_use (tree t ATTRIBUTE_UNUSED) | |
88 | { | |
89 | return true; | |
90 | } |