annotate gcc/generic-match-head.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Preamble and helpers for the autogenerated generic-match.c file.
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
2 Copyright (C) 2014-2018 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify it under
kono
parents:
diff changeset
7 the terms of the GNU General Public License as published by the Free
kono
parents:
diff changeset
8 Software Foundation; either version 3, or (at your option) any later
kono
parents:
diff changeset
9 version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
kono
parents:
diff changeset
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
kono
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
kono
parents:
diff changeset
14 for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
kono
parents:
diff changeset
17 along with GCC; see the file COPYING3. If not see
kono
parents:
diff changeset
18 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 #include "config.h"
kono
parents:
diff changeset
21 #include "system.h"
kono
parents:
diff changeset
22 #include "coretypes.h"
kono
parents:
diff changeset
23 #include "backend.h"
kono
parents:
diff changeset
24 #include "target.h"
kono
parents:
diff changeset
25 #include "rtl.h"
kono
parents:
diff changeset
26 #include "tree.h"
kono
parents:
diff changeset
27 #include "gimple.h"
kono
parents:
diff changeset
28 #include "ssa.h"
kono
parents:
diff changeset
29 #include "cgraph.h"
kono
parents:
diff changeset
30 #include "fold-const.h"
kono
parents:
diff changeset
31 #include "stor-layout.h"
kono
parents:
diff changeset
32 #include "tree-dfa.h"
kono
parents:
diff changeset
33 #include "builtins.h"
kono
parents:
diff changeset
34 #include "case-cfn-macros.h"
kono
parents:
diff changeset
35 #include "gimplify.h"
kono
parents:
diff changeset
36 #include "optabs-tree.h"
kono
parents:
diff changeset
37
kono
parents:
diff changeset
38
kono
parents:
diff changeset
39 /* Routine to determine if the types T1 and T2 are effectively
kono
parents:
diff changeset
40 the same for GENERIC. If T1 or T2 is not a type, the test
kono
parents:
diff changeset
41 applies to their TREE_TYPE. */
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 static inline bool
kono
parents:
diff changeset
44 types_match (tree t1, tree t2)
kono
parents:
diff changeset
45 {
kono
parents:
diff changeset
46 if (!TYPE_P (t1))
kono
parents:
diff changeset
47 t1 = TREE_TYPE (t1);
kono
parents:
diff changeset
48 if (!TYPE_P (t2))
kono
parents:
diff changeset
49 t2 = TREE_TYPE (t2);
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 return TYPE_MAIN_VARIANT (t1) == TYPE_MAIN_VARIANT (t2);
kono
parents:
diff changeset
52 }
kono
parents:
diff changeset
53
kono
parents:
diff changeset
54 /* Return if T has a single use. For GENERIC, we assume this is
kono
parents:
diff changeset
55 always true. */
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 static inline bool
kono
parents:
diff changeset
58 single_use (tree t ATTRIBUTE_UNUSED)
kono
parents:
diff changeset
59 {
kono
parents:
diff changeset
60 return true;
kono
parents:
diff changeset
61 }
kono
parents:
diff changeset
62
kono
parents:
diff changeset
63 /* Return true if math operations should be canonicalized,
kono
parents:
diff changeset
64 e.g. sqrt(sqrt(x)) -> pow(x, 0.25). */
kono
parents:
diff changeset
65
kono
parents:
diff changeset
66 static inline bool
kono
parents:
diff changeset
67 canonicalize_math_p ()
kono
parents:
diff changeset
68 {
kono
parents:
diff changeset
69 return true;
kono
parents:
diff changeset
70 }
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
71
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
72 /* Return true if math operations that are beneficial only after
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
73 vectorization should be canonicalized. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
74
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
75 static inline bool
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
76 canonicalize_math_after_vectorization_p ()
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
77 {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
78 return false;
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
79 }