1 /* Preamble and helpers for the autogenerated generic-match.c file.
2 Copyright (C) 2014-2020 Free Software Foundation, Inc.
4 This file is part of GCC.
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
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
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/>. */
22 #include "coretypes.h"
30 #include "vec-perm-indices.h"
31 #include "fold-const.h"
32 #include "fold-const-call.h"
33 #include "stor-layout.h"
36 #include "case-cfn-macros.h"
38 #include "optabs-tree.h"
41 /* Routine to determine if the types T1 and T2 are effectively
42 the same for GENERIC. If T1 or T2 is not a type, the test
43 applies to their TREE_TYPE. */
46 types_match (tree t1
, tree t2
)
53 return TYPE_MAIN_VARIANT (t1
) == TYPE_MAIN_VARIANT (t2
);
56 /* Return if T has a single use. For GENERIC, we assume this is
60 single_use (tree t ATTRIBUTE_UNUSED
)
65 /* Return true if math operations should be canonicalized,
66 e.g. sqrt(sqrt(x)) -> pow(x, 0.25). */
69 canonicalize_math_p ()
74 /* Return true if math operations that are beneficial only after
75 vectorization should be canonicalized. */
78 canonicalize_math_after_vectorization_p ()
83 /* Return true if we can still perform transformations that may introduce
84 vector operations that are not supported by the target. Vector lowering
85 normally handles those, but after that pass, it becomes unsafe. */
88 optimize_vectors_before_lowering_p ()
93 /* Return true if successive divisions can be optimized.
94 Defer to GIMPLE opts. */
97 optimize_successive_divisions_p (tree
, tree
)