|
GCC Middle and Back End API Reference
|
#include "config.h"#include "system.h"#include "coretypes.h"#include "backend.h"#include "target.h"#include "rtl.h"#include "tree.h"#include "gimple.h"#include "ssa.h"#include "cgraph.h"#include "vec-perm-indices.h"#include "fold-const.h"#include "fold-const-call.h"#include "stor-layout.h"#include "gimple-iterator.h"#include "gimple-fold.h"#include "calls.h"#include "tree-dfa.h"#include "builtins.h"#include "gimple-match.h"#include "tree-pass.h"#include "internal-fn.h"#include "case-cfn-macros.h"#include "gimplify.h"#include "memmodel.h"#include "optabs.h"#include "optabs-tree.h"#include "tree-eh.h"#include "dbgcnt.h"#include "tm.h"#include "gimple-range.h"#include "langhooks.h"#include "attribs.h"#include "asan.h"
Macros | |
| #define | bitwise_equal_p(expr1, expr2) |
| #define | bitwise_inverted_equal_p(expr1, expr2, wascmp) |
| #define bitwise_equal_p | ( | expr1, | |
| expr2 ) |
Return true if EXPR1 and EXPR2 have the same value, but not necessarily same type. The types can differ through nop conversions.
Referenced by bitwise_equal_p(), and bitwise_inverted_equal_p().
| #define bitwise_inverted_equal_p | ( | expr1, | |
| expr2, | |||
| wascmp ) |
Return true if EXPR1 and EXPR2 have the bitwise opposite value, but not necessarily same type. The types can differ through nop conversions.
Referenced by bitwise_inverted_equal_p().
|
inlinestatic |
Return true if math operations that are beneficial only after vectorization should be canonicalized.
References canonicalize_math_after_vectorization_p(), cfun, and PROP_gimple_lvec.
|
inlinestatic |
Return true if math operations should be canonicalized, e.g. sqrt(sqrt(x)) -> pow(x, 0.25).
References canonicalize_math_p(), cfun, and PROP_gimple_opt_math.
Helper for the autogenerated code, valueize OP.
References do_valueize(), and TREE_CODE.
Preamble and helpers for the autogenerated gimple-match.cc file. Copyright (C) 2014-2026 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see <http://www.gnu.org/licenses/>.
Helper for gimple_simplify valueizing OP using VALUEIZE and setting VALUEIZED to true if valueization changed OP.
References do_valueize(), and TREE_CODE.
Referenced by do_valueize(), do_valueize(), do_valueize(), gimple_bitwise_inverted_equal_p(), gimple_simplify(), gimple_simplify(), and object_sizes_execute().
Returns true if the expression T has no side effects including not trapping.
References expr_no_side_effects_p(), gcc_assert, and is_gimple_val().
Helper for the autogenerated code, get at the definition of NAME when VALUEIZE allows that.
References get_def(), NULL, and SSA_NAME_DEF_STMT.
Referenced by get_def(), and gimple_bitwise_inverted_equal_p().
References gimple_bit_not_with_nop().
Referenced by gimple_bit_not_with_nop(), and gimple_bitwise_inverted_equal_p().
References gimple_bit_xor_cst().
Referenced by gimple_bit_xor_cst(), and gimple_bitwise_inverted_equal_p().
Helper function for bitwise_equal_p macro.
References gimple_bitwise_equal_p(), gimple_maybe_truncate(), gimple_nop_convert(), operand_equal_p(), wi::to_wide(), TREE_CODE, tree_nop_conversion_p(), and TREE_TYPE.
Referenced by gimple_bitwise_equal_p(), and gimple_bitwise_inverted_equal_p().
|
inlinestatic |
Helper function for bitwise_inverted_equal_p macro.
References d1, d2, do_valueize(), dyn_cast(), gcc_assert, get_def(), gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_bit_not_with_nop(), gimple_bit_xor_cst(), gimple_bitwise_equal_p(), gimple_bitwise_inverted_equal_p(), gimple_maybe_cmp(), HONOR_NANS(), INTEGRAL_TYPE_P, invert_tree_comparison(), operand_equal_p(), wi::to_wide(), tree_nop_conversion_p(), TREE_TYPE, TYPE_PRECISION, and uniform_integer_cst_p().
Referenced by gimple_bitwise_inverted_equal_p().
If OP is a SSA_NAME with SSA_NAME_DEF_STMT in the IL, return that stmt, otherwise NULL. For use in range_of_expr calls.
References gimple_bb(), gimple_match_ctx(), NULL, SSA_NAME_DEF_STMT, and TREE_CODE.
|
inlinestatic |
Return true if CODE applied to OP0 and OP1 in TYPE cannot overflow, either because TYPE says so or because their ranges prove it. CTX is a capture passed on to gimple_match_range_of_expr.
References gimple_match_no_overflow_p(), gimple_match_range_of_expr(), and TYPE_OVERFLOW_UNDEFINED.
Helper to shorten range queries in match.pd. R is the range to be queried, OP tree on which it should be queried and CTX is some capture on which gimple_match_ctx should be called, or NULL for global range.
References cfun, get_range_query(), gimple_match_ctx(), gimple_match_range_of_expr(), NULL, NULL_TREE, and r.
Referenced by gimple_match_no_overflow_p(), and gimple_match_range_of_expr().
References gimple_maybe_cmp().
Referenced by gimple_bitwise_inverted_equal_p(), and gimple_maybe_cmp().
References gimple_maybe_truncate().
Referenced by gimple_bitwise_equal_p(), and gimple_maybe_truncate().
References EDGE_COUNT, EDGE_PRED, gimple_bb(), gimple_phi_arg_def(), gimple_phi_num_args(), gsi_last_bb(), match_cond_with_binary_phi(), NULL_TREE, basic_block_def::preds, safe_dyn_cast(), and basic_block_def::succs.
Referenced by match_cond_with_binary_phi().
Return true if pow(cst, x) should be optimized into exp(log(cst) * x). As a workaround for SPEC CPU2017 628.pop2_s, don't do it if arg0 is an exact integer, arg1 = phi_res +/- cst1 and phi_res = PHI <cst2, ...> where cst2 +/- cst1 is an exact integer, because then pow (arg0, arg1) will likely be exact, while exp (log (arg0) * arg1) might be not. Also don't do it if arg1 is phi_res above and cst2 is an exact integer.
References const_binop(), dyn_cast(), gcc_assert, gimple_assign_rhs1(), gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_phi_num_args(), i, is_gimple_assign(), NULL_TREE, operand_equal_p(), optimize_pow_to_exp(), PHI_ARG_DEF, real_isinteger(), SSA_NAME_DEF_STMT, TREE_CODE, TREE_REAL_CST_PTR, TREE_TYPE, and TYPE_MODE.
Referenced by optimize_pow_to_exp().
Return true if a division INNER_DIV / DIVISOR where INNER_DIV is another division can be optimized. Don't optimize if INNER_DIV is used in a TRUNC_MOD_EXPR with DIVISOR as second operand.
References cfun, FOR_EACH_IMM_USE_FAST, gimple_assign_rhs2(), gimple_assign_rhs_code(), gimple_in_ssa_p(), is_gimple_assign(), operand_equal_p(), optimize_successive_divisions_p(), and USE_STMT.
|
inlinestatic |
Return true if we can still perform transformations that may introduce vector operations that are not supported by the target. Vector lowering normally handles those, but after that pass, it becomes unsafe.
References cfun, optimize_vectors_before_lowering_p(), and PROP_gimple_lvec.
|
static |
Return if T has a single use. For GIMPLE, we also allow any non-SSA_NAME (ie constants) and zero uses to cope with uses that aren't linked up yet.
References is_gimple_debug(), ssa_use_operand_t::next, single_use(), SSA_NAME_IMM_USE_NODE, TREE_CODE, and USE_STMT.
Routine to determine if the types T1 and T2 are effectively the same for GIMPLE. If T1 or T2 is not a type, the test applies to their TREE_TYPE.
References TREE_TYPE, TYPE_P, types_compatible_p(), and types_match().
Routine to determine if the types T1, T2 and T3 are effectively the same for GIMPLE. If T1, T2 or T2 is not a type, the test applies to their TREE_TYPE.
References types_match().