GCC Middle and Back End API Reference
gimple-isel.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "ssa.h"
#include "expmed.h"
#include "optabs-tree.h"
#include "tree-eh.h"
#include "gimple-iterator.h"
#include "gimplify-me.h"
#include "gimplify.h"
#include "tree-cfg.h"
#include "bitmap.h"
#include "tree-ssa-dce.h"
#include "memmodel.h"
#include "optabs.h"
#include "gimple-fold.h"
#include "internal-fn.h"
#include "fold-const.h"
Include dependency graph for gimple-isel.cc:

Macros

#define CASE_ATOMIC(NAME)
#define CASE_ATOMIC_CMP0(ATOMIC, SYNC)
#define CASE_ATOMIC_BIT_TEST_AND(ATOMIC, SYNC, FN, AFTER)

Functions

static bool gimple_expand_vec_set_extract_expr (struct function *fun, gimple_stmt_iterator *gsi)
static gimplegimple_expand_vec_cond_expr (gimple_stmt_iterator *gsi)
static void maybe_duplicate_comparison (gassign *stmt, basic_block bb)
bool gimple_nop_atomic_bit_test_and_p (tree, tree *, tree(*)(tree))
bool gimple_nop_convert (tree, tree *, tree(*)(tree))
gimple_opt_passmake_pass_gimple_isel (gcc::context *ctxt)

Macro Definition Documentation

◆ CASE_ATOMIC

#define CASE_ATOMIC ( NAME)
Value:
case BUILT_IN_##NAME##_1: \
case BUILT_IN_##NAME##_2: \
case BUILT_IN_##NAME##_4: \
case BUILT_IN_##NAME##_8: \
case BUILT_IN_##NAME##_16
@ NAME
Definition tree-ssa-pre.cc:242

◆ CASE_ATOMIC_BIT_TEST_AND

#define CASE_ATOMIC_BIT_TEST_AND ( ATOMIC,
SYNC,
FN,
AFTER )
Value:
CASE_ATOMIC(ATOMIC_##ATOMIC): \
optimize_atomic_bit_test_and (gsi, \
IFN_ATOMIC_BIT_TEST_AND_##FN, \
true, AFTER); \
break; \
CASE_ATOMIC(SYNC_##SYNC): \
optimize_atomic_bit_test_and (gsi, \
IFN_ATOMIC_BIT_TEST_AND_##FN, \
false, AFTER); \
break;
#define CASE_ATOMIC(NAME)
#define true
Definition system.h:887
#define false
Definition system.h:888

◆ CASE_ATOMIC_CMP0

#define CASE_ATOMIC_CMP0 ( ATOMIC,
SYNC )
Value:
CASE_ATOMIC(ATOMIC_##ATOMIC): \
optimize_atomic_op_fetch_cmp_0 (gsi, \
IFN_ATOMIC_##ATOMIC##_CMP_0, \
true); \
break; \
CASE_ATOMIC(SYNC_##SYNC): \
optimize_atomic_op_fetch_cmp_0 (gsi, \
IFN_ATOMIC_##ATOMIC##_CMP_0, \
false); \
break;

Function Documentation

◆ gimple_expand_vec_cond_expr()

◆ gimple_expand_vec_set_extract_expr()

bool gimple_expand_vec_set_extract_expr ( struct function * fun,
gimple_stmt_iterator * gsi )
static
Schedule GIMPLE vector statements.
   Copyright (C) 2020-2025 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/>.   
Expand all ARRAY_REF(VIEW_CONVERT_EXPR) gimple assignments into calls to
internal function based on vector type of selected expansion.

For vec_set:

  VIEW_CONVERT_EXPR<int[4]>(u)[_1] = i_4(D);
=>
  _7 = u;
  _8 = .VEC_SET (_7, i_4(D), _1);
  u = _8;

For vec_extract:

   _3 = VIEW_CONVERT_EXPR<intD.1[4]>(vD.2208)[idx_2(D)];
=>
   _4 = vD.2208;
   _3 = .VEC_EXTRACT (_4, idx_2(D));   

References auto_var_in_fn_p(), can_vec_extract_var_idx_p(), can_vec_set_var_idx_p(), cfg_changed, function::decl, DECL_HARD_REGISTER, DECL_P, dyn_cast(), gimple_assign_lhs(), gimple_assign_rhs1(), gimple_bb(), gimple_build_assign(), gimple_build_call_internal(), gimple_call_set_lhs(), gimple_location(), gimple_move_vops(), gimple_purge_dead_eh_edges(), gimple_set_location(), gimple_set_vuse(), gimple_vuse(), gsi_for_stmt(), gsi_insert_before(), gsi_remove(), gsi_replace(), GSI_SAME_STMT, gsi_stmt(), make_ssa_name(), NULL, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_MODE, VAR_P, and VECTOR_TYPE_P.

◆ gimple_nop_atomic_bit_test_and_p()

bool gimple_nop_atomic_bit_test_and_p ( tree ,
tree * ,
tree(*  )(tree) )
extern
match.pd function to match atomic_bit_test_and pattern which
 has nop_convert:
   _1 = __atomic_fetch_or_4 (&v, 1, 0);
   _2 = (int) _1;
   _5 = _2 & 1;

◆ gimple_nop_convert()

bool gimple_nop_convert ( tree ,
tree * ,
tree(*  )(tree) )
extern

◆ make_pass_gimple_isel()

gimple_opt_pass * make_pass_gimple_isel ( gcc::context * ctxt)

◆ maybe_duplicate_comparison()

void maybe_duplicate_comparison ( gassign * stmt,
basic_block bb )
static
Duplicate COND_EXPR condition defs of STMT located in BB when they are
comparisons so RTL expansion with the help of TER
can perform better if conversion.   

References as_a(), duplicate_ssa_name(), FOR_EACH_IMM_USE_FAST, gimple_assign_lhs(), gimple_assign_rhs1_ptr(), gimple_assign_rhs_code(), gimple_assign_set_lhs(), gimple_assign_set_rhs1(), gimple_bb(), gimple_copy(), gsi_for_stmt(), gsi_insert_before(), GSI_SAME_STMT, is_gimple_assign(), is_gimple_debug(), update_stmt(), ssa_use_operand_t::use, and USE_STMT.