GCC Middle and Back End API Reference
gimplify.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
#include "tree.h"
#include "memmodel.h"
#include "tm_p.h"
#include "gimple.h"
#include "gimple-predict.h"
#include "tree-pass.h"
#include "ssa.h"
#include "cgraph.h"
#include "tree-pretty-print.h"
#include "diagnostic-core.h"
#include "diagnostic.h"
#include "alias.h"
#include "fold-const.h"
#include "calls.h"
#include "varasm.h"
#include "stmt.h"
#include "expr.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "tree-eh.h"
#include "gimplify.h"
#include "stor-layout.h"
#include "print-tree.h"
#include "tree-iterator.h"
#include "tree-inline.h"
#include "langhooks.h"
#include "tree-cfg.h"
#include "tree-ssa.h"
#include "tree-hash-traits.h"
#include "omp-general.h"
#include "omp-low.h"
#include "gimple-low.h"
#include "gomp-constants.h"
#include "splay-tree.h"
#include "gimple-walk.h"
#include "langhooks-def.h"
#include "builtins.h"
#include "stringpool.h"
#include "attribs.h"
#include "asan.h"
#include "dbgcnt.h"
#include "omp-offload.h"
#include "context.h"
#include "tree-nested.h"
#include "gcc-urlifier.h"

Data Structures

struct  gimplify_hasher
 
struct  gimplify_ctx
 
struct  gimplify_omp_ctx
 
struct  label_entry
 
struct  gimplify_init_ctor_preeval_data
 
struct  tree_operand_hash_no_se
 
struct  omp_mapping_group
 
struct  gimplify_adjust_omp_clauses_data
 

Typedefs

typedef char * char_p
 

Enumerations

enum  gimplify_omp_var_data {
  GOVD_SEEN = 0x000001 , GOVD_EXPLICIT = 0x000002 , GOVD_SHARED = 0x000004 , GOVD_PRIVATE = 0x000008 ,
  GOVD_FIRSTPRIVATE = 0x000010 , GOVD_LASTPRIVATE = 0x000020 , GOVD_REDUCTION = 0x000040 , GOVD_LOCAL = 0x00080 ,
  GOVD_MAP = 0x000100 , GOVD_DEBUG_PRIVATE = 0x000200 , GOVD_PRIVATE_OUTER_REF = 0x000400 , GOVD_LINEAR = 0x000800 ,
  GOVD_ALIGNED = 0x001000 , GOVD_MAP_TO_ONLY = 0x002000 , GOVD_LINEAR_LASTPRIVATE_NO_OUTER = 0x004000 , GOVD_MAP_0LEN_ARRAY = 0x008000 ,
  GOVD_MAP_ALWAYS_TO = 0x010000 , GOVD_WRITTEN = 0x020000 , GOVD_MAP_FORCE = 0x040000 , GOVD_MAP_FORCE_PRESENT = 0x080000 ,
  GOVD_MAP_ALLOC_ONLY = 0x100000 , GOVD_MAP_FROM_ONLY = 0x200000 , GOVD_NONTEMPORAL = 0x400000 , GOVD_LASTPRIVATE_CONDITIONAL = 0x800000 ,
  GOVD_CONDTEMP = 0x1000000 , GOVD_REDUCTION_INSCAN = 0x2000000 , GOVD_FIRSTPRIVATE_IMPLICIT = 0x4000000 , GOVD_DATA_SHARE_CLASS
}
 
enum  omp_region_type {
  ORT_WORKSHARE = 0x00 , ORT_TASKGROUP = 0x01 , ORT_DISPATCH = 0x02 , ORT_SIMD = 0x04 ,
  ORT_PARALLEL = 0x08 , ORT_COMBINED_PARALLEL = ORT_PARALLEL | 1 , ORT_TASK = 0x10 , ORT_UNTIED_TASK = ORT_TASK | 1 ,
  ORT_TASKLOOP = ORT_TASK | 2 , ORT_UNTIED_TASKLOOP = ORT_UNTIED_TASK | 2 , ORT_TEAMS = 0x20 , ORT_COMBINED_TEAMS = ORT_TEAMS | 1 ,
  ORT_HOST_TEAMS = ORT_TEAMS | 2 , ORT_COMBINED_HOST_TEAMS = ORT_COMBINED_TEAMS | 2 , ORT_TARGET_DATA = 0x40 , ORT_TARGET = 0x80 ,
  ORT_COMBINED_TARGET = ORT_TARGET | 1 , ORT_IMPLICIT_TARGET = ORT_TARGET | 2 , ORT_ACC = 0x100 , ORT_ACC_DATA = ORT_ACC | ORT_TARGET_DATA ,
  ORT_ACC_PARALLEL = ORT_ACC | ORT_TARGET , ORT_ACC_KERNELS = ORT_ACC | ORT_TARGET | 2 , ORT_ACC_SERIAL = ORT_ACC | ORT_TARGET | 4 , ORT_ACC_HOST_DATA = ORT_ACC | ORT_TARGET_DATA | 2 ,
  ORT_NONE = 0x200
}
 
enum  gimplify_defaultmap_kind {
  GDMK_SCALAR , GDMK_SCALAR_TARGET , GDMK_AGGREGATE , GDMK_ALLOCATABLE ,
  GDMK_POINTER
}
 
enum  omp_tsort_mark { UNVISITED , TEMPORARY , PERMANENT }
 

Functions

static unsigned next_cond_uid ()
 
static void reset_cond_uid ()
 
static void tree_associate_condition_with_expr (tree stmt, unsigned uid)
 
static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool)
 
static enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *, bool(*)(tree), fallback_t, bool)
 
static void prepare_gimple_addressable (tree *, gimple_seq *)
 
static void gimplify_seq_add_stmt (gimple_seq *seq_p, gimple *gs)
 
static void gimplify_seq_add_seq (gimple_seq *dst_p, gimple_seq src)
 
static struct gimplify_ctxctx_alloc (void)
 
static void ctx_free (struct gimplify_ctx *c)
 
void free_gimplify_stack (void)
 
void push_gimplify_context (bool in_ssa, bool rhs_cond_ok)
 
void pop_gimplify_context (gimple *body)
 
static void gimple_push_bind_expr (gbind *bind_stmt)
 
static void gimple_pop_bind_expr (void)
 
gbindgimple_current_bind_expr (void)
 
vec< gbind * > gimple_bind_expr_stack (void)
 
static bool gimple_conditional_context (void)
 
static void gimple_push_condition (void)
 
static void gimple_pop_condition (gimple_seq *pre_p)
 
static int splay_tree_compare_decl_uid (splay_tree_key xa, splay_tree_key xb)
 
static struct gimplify_omp_ctxnew_omp_context (enum omp_region_type region_type)
 
static void delete_omp_context (struct gimplify_omp_ctx *c)
 
static void omp_add_variable (struct gimplify_omp_ctx *, tree, unsigned int)
 
static bool omp_notice_variable (struct gimplify_omp_ctx *, tree, bool)
 
void gimplify_and_add (tree t, gimple_seq *seq_p)
 
static gimplegimplify_and_return_first (tree t, gimple_seq *seq_p)
 
static bool is_gimple_mem_rhs (tree t)
 
static bool is_gimple_reg_rhs_or_call (tree t)
 
static bool is_gimple_mem_rhs_or_call (tree t)
 
static tree create_tmp_from_val (tree val)
 
static tree lookup_tmp_var (tree val, bool is_formal, bool not_gimple_reg)
 
static tree internal_get_tmp_var (tree val, gimple_seq *pre_p, gimple_seq *post_p, bool is_formal, bool allow_ssa, bool not_gimple_reg)
 
tree get_formal_tmp_var (tree val, gimple_seq *pre_p)
 
tree get_initialized_tmp_var (tree val, gimple_seq *pre_p, gimple_seq *post_p, bool allow_ssa)
 
void declare_vars (tree vars, gimple *gs, bool debug_info)
 
static void force_constant_size (tree var)
 
void gimple_add_tmp_var_fn (struct function *fn, tree tmp)
 
void gimple_add_tmp_var (tree tmp)
 
static tree mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
 
static tree copy_if_shared_r (tree *tp, int *walk_subtrees, void *data)
 
void copy_if_shared (tree *tp, void *data)
 
static void unshare_body (tree fndecl)
 
static tree unmark_visited_r (tree *tp, int *walk_subtrees, void *data)
 
static void unmark_visited (tree *tp)
 
static void unvisit_body (tree fndecl)
 
tree unshare_expr (tree expr)
 
static tree prune_expr_location (tree *tp, int *walk_subtrees, void *)
 
tree unshare_expr_without_location (tree expr)
 
static location_t rexpr_location (tree expr, location_t or_else=UNKNOWN_LOCATION)
 
static bool rexpr_has_location (tree expr)
 
tree voidify_wrapper_expr (tree wrapper, tree temp)
 
static void build_stack_save_restore (gcall **save, gcall **restore)
 
static tree build_asan_poison_call_expr (tree decl)
 
static void asan_poison_variable (tree decl, bool poison, gimple_stmt_iterator *it, bool before)
 
static void asan_poison_variable (tree decl, bool poison, gimple_seq *seq_p)
 
static int sort_by_decl_uid (const void *a, const void *b)
 
static void asan_poison_variables (hash_set< tree > *variables, bool poison, gimple_seq *seq_p)
 
static enum gimplify_status gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
 
static void maybe_add_early_return_predict_stmt (gimple_seq *pre_p)
 
static enum gimplify_status gimplify_return_expr (tree stmt, gimple_seq *pre_p)
 
static void gimplify_vla_decl (tree decl, gimple_seq *seq_p)
 
static tree force_labels_r (tree *tp, int *walk_subtrees, void *data)
 
static void gimple_add_init_for_auto_var (tree decl, enum auto_init_type init_type, gimple_seq *seq_p)
 
static void gimple_add_padding_init_for_auto_var (tree decl, bool is_vla, gimple_seq *seq_p)
 
static bool is_var_need_auto_init (tree decl)
 
static enum gimplify_status gimplify_decl_expr (tree *stmt_p, gimple_seq *seq_p)
 
static enum gimplify_status gimplify_loop_expr (tree *expr_p, gimple_seq *pre_p)
 
static enum gimplify_status gimplify_statement_list (tree *expr_p, gimple_seq *pre_p)
 
static gimpleemit_warn_switch_unreachable (gimple *stmt)
 
static tree warn_switch_unreachable_and_auto_init_r (gimple_stmt_iterator *gsi_p, bool *handled_ops_p, struct walk_stmt_info *wi)
 
static void maybe_warn_switch_unreachable_and_auto_init (gimple_seq seq)
 
static struct label_entryfind_label_entry (const auto_vec< struct label_entry > *vec, tree label)
 
static bool case_label_p (const vec< tree > *cases, tree label)
 
static gimplelast_stmt_in_scope (gimple *stmt)
 
static gimplecollect_fallthrough_labels (gimple_stmt_iterator *gsi_p, auto_vec< struct label_entry > *labels, location_t *prevloc)
 
static bool should_warn_for_implicit_fallthrough (gimple_stmt_iterator *gsi_p, tree label)
 
static tree warn_implicit_fallthrough_r (gimple_stmt_iterator *gsi_p, bool *handled_ops_p, struct walk_stmt_info *)
 
static void maybe_warn_implicit_fallthrough (gimple_seq seq)
 
static tree expand_FALLTHROUGH_r (gimple_stmt_iterator *gsi_p, bool *handled_ops_p, struct walk_stmt_info *wi)
 
static void expand_FALLTHROUGH (gimple_seq *seq_p)
 
static enum gimplify_status gimplify_switch_expr (tree *expr_p, gimple_seq *pre_p)
 
static enum gimplify_status gimplify_label_expr (tree *expr_p, gimple_seq *pre_p)
 
static enum gimplify_status gimplify_case_label_expr (tree *expr_p, gimple_seq *pre_p)
 
tree build_and_jump (tree *label_p)
 
static enum gimplify_status gimplify_exit_expr (tree *expr_p)
 
static void canonicalize_component_ref (tree *expr_p)
 
static void canonicalize_addr_expr (tree *expr_p)
 
static enum gimplify_status gimplify_conversion (tree *expr_p)
 
static enum gimplify_status gimplify_var_or_parm_decl (tree *expr_p)
 
static void recalculate_side_effects (tree t)
 
static enum gimplify_status gimplify_compound_lval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, fallback_t fallback)
 
enum gimplify_status gimplify_self_mod_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, bool want_value, tree arith_type)
 
static void maybe_with_size_expr (tree *expr_p)
 
enum gimplify_status gimplify_arg (tree *arg_p, gimple_seq *pre_p, location_t call_location, bool allow_ssa)
 
static bool maybe_fold_stmt (gimple_stmt_iterator *gsi)
 
static enum gimplify_status gimplify_call_expr (tree *expr_p, gimple_seq *pre_p, bool want_value)
 
static tree shortcut_cond_r (tree pred, tree *true_label_p, tree *false_label_p, location_t locus, unsigned condition_uid)
 
static tree find_goto (tree expr)
 
static tree find_goto_label (tree expr)
 
static void tag_shortcut_cond (tree pred, unsigned condition_uid)
 
static tree shortcut_cond_expr (tree expr, unsigned condition_uid)
 
tree gimple_boolify (tree expr)
 
static enum gimplify_status gimplify_pure_cond_expr (tree *expr_p, gimple_seq *pre_p)
 
bool generic_expr_could_trap_p (tree expr)
 
static void gimple_associate_condition_with_expr (struct function *fn, gcond *stmt, unsigned uid)
 
static enum gimplify_status gimplify_cond_expr (tree *expr_p, gimple_seq *pre_p, fallback_t fallback)
 
static enum gimplify_status gimplify_modify_expr_to_memcpy (tree *expr_p, tree size, bool want_value, gimple_seq *seq_p)
 
static enum gimplify_status gimplify_modify_expr_to_memset (tree *expr_p, tree size, bool want_value, gimple_seq *seq_p)
 
static tree gimplify_init_ctor_preeval_1 (tree *tp, int *walk_subtrees, void *xdata)
 
static void gimplify_init_ctor_preeval (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, struct gimplify_init_ctor_preeval_data *data)
 
static void gimplify_init_ctor_eval (tree, vec< constructor_elt, va_gc > *, gimple_seq *, bool)
 
static void gimplify_init_ctor_eval_range (tree object, tree lower, tree upper, tree value, tree array_elt_type, gimple_seq *pre_p, bool cleared)
 
gimple_predicate rhs_predicate_for (tree lhs)
 
static gimple_predicate initial_rhs_predicate_for (tree lhs)
 
static enum gimplify_status gimplify_compound_literal_expr (tree *expr_p, gimple_seq *pre_p, bool(*gimple_test_f)(tree), fallback_t fallback)
 
static tree optimize_compound_literals_in_ctor (tree orig_ctor)
 
static enum gimplify_status gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, bool want_value, bool notify_temp_creation)
 
static tree gimple_fold_indirect_ref_rhs (tree t)
 
static enum gimplify_status gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, gimple_seq *pre_p, gimple_seq *post_p, bool want_value)
 
static bool is_gimple_stmt (tree t)
 
static enum gimplify_status gimplify_modify_expr_complex_part (tree *expr_p, gimple_seq *pre_p, bool want_value)
 
static enum gimplify_status gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, bool want_value)
 
static enum gimplify_status gimplify_variable_sized_compare (tree *expr_p)
 
static enum gimplify_status gimplify_scalar_mode_aggregate_compare (tree *expr_p)
 
static enum gimplify_status gimplify_save_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 
static enum gimplify_status gimplify_addr_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 
static enum gimplify_status gimplify_asm_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 
static enum gimplify_status gimplify_cleanup_point_expr (tree *expr_p, gimple_seq *pre_p)
 
static void gimple_push_cleanup (tree var, tree cleanup, bool eh_only, gimple_seq *pre_p, bool force_uncond=false)
 
static enum gimplify_status gimplify_target_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 
bool gimplify_stmt (tree *stmt_p, gimple_seq *seq_p)
 
void omp_firstprivatize_variable (struct gimplify_omp_ctx *ctx, tree decl)
 
static void omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *ctx, tree type)
 
static bool omp_notice_threadprivate_variable (struct gimplify_omp_ctx *ctx, tree decl, tree decl2)
 
static bool device_resident_p (tree decl)
 
static bool is_oacc_declared (tree decl)
 
static unsigned omp_default_clause (struct gimplify_omp_ctx *ctx, tree decl, bool in_code, unsigned flags)
 
static const char * oacc_region_type_name (enum omp_region_type region_type)
 
static unsigned oacc_default_clause (struct gimplify_omp_ctx *ctx, tree decl, unsigned flags)
 
static bool omp_is_private (struct gimplify_omp_ctx *ctx, tree decl, int simd)
 
static bool omp_check_private (struct gimplify_omp_ctx *ctx, tree decl, bool copyprivate)
 
static tree find_decl_expr (tree *tp, int *walk_subtrees, void *data)
 
static void gimplify_omp_affinity (tree *list_p, gimple_seq *pre_p)
 
static int gimplify_omp_depend (tree *list_p, gimple_seq *pre_p)
 
static bool omp_map_clause_descriptor_p (tree c)
 
static tree build_omp_struct_comp_nodes (enum tree_code code, tree grp_start, tree grp_end, tree *extra_node)
 
static tree extract_base_bit_offset (tree base, poly_int64 *bitposp, poly_offset_int *poffsetp, bool *variable_offset)
 
DEBUG_FUNCTION void debug_mapping_group (omp_mapping_group *grp)
 
static tree omp_get_base_pointer (tree expr)
 
static tree omp_get_attachment (omp_mapping_group *grp)
 
static treeomp_group_last (tree *start_p)
 
static void omp_gather_mapping_groups_1 (tree *list_p, vec< omp_mapping_group > *groups, tree gather_sentinel)
 
static vec< omp_mapping_group > * omp_gather_mapping_groups (tree *list_p)
 
static tree omp_group_base (omp_mapping_group *grp, unsigned int *chained, tree *firstprivate)
 
static void omp_index_mapping_groups_1 (hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap, vec< omp_mapping_group > *groups, tree reindex_sentinel)
 
static hash_map< tree_operand_hash_no_se, omp_mapping_group * > * omp_index_mapping_groups (vec< omp_mapping_group > *groups)
 
static hash_map< tree_operand_hash_no_se, omp_mapping_group * > * omp_reindex_mapping_groups (tree *list_p, vec< omp_mapping_group > *groups, vec< omp_mapping_group > *processed_groups, tree sentinel)
 
static tree omp_containing_struct (tree expr)
 
static bool omp_mapped_by_containing_struct (hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap, tree decl, omp_mapping_group **mapped_by_group)
 
static bool omp_tsort_mapping_groups_1 (omp_mapping_group ***outlist, vec< omp_mapping_group > *groups, hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap, omp_mapping_group *grp)
 
static omp_mapping_groupomp_tsort_mapping_groups (vec< omp_mapping_group > *groups, hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap, bool enter_exit_data)
 
static omp_mapping_groupomp_segregate_mapping_groups (omp_mapping_group *inlist)
 
static treeomp_reorder_mapping_groups (vec< omp_mapping_group > *groups, omp_mapping_group *head, tree *list_p)
 
static void omp_lastprivate_for_combined_outer_constructs (struct gimplify_omp_ctx *octx, tree decl, bool implicit_p)
 
static omp_mapping_groupomp_get_nonfirstprivate_group (hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap, tree decl, bool allow_deleted=false)
 
static bool omp_directive_maps_explicitly (hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap, tree decl, omp_mapping_group **base_group, bool to_specifically, bool allow_deleted, bool contained_in_struct)
 
bool omp_check_mapping_compatibility (location_t loc, omp_mapping_group *outer, omp_mapping_group *inner)
 
void omp_resolve_clause_dependencies (enum tree_code code, vec< omp_mapping_group > *groups, hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap)
 
void oacc_resolve_clause_dependencies (vec< omp_mapping_group > *groups, hash_map< tree_operand_hash_no_se, omp_mapping_group * > *grpmap)
 
static treeomp_siblist_insert_node_after (tree newnode, tree *insert_at)
 
static void omp_siblist_move_node_after (tree node, tree *old_pos, tree *move_after)
 
static treeomp_siblist_move_nodes_after (tree *first_ptr, tree last_node, tree *move_after)
 
static treeomp_siblist_move_concat_nodes_after (tree first_new, tree *last_new_tail, tree *first_ptr, tree last_node, tree *move_after)
 
static omp_addr_tokenomp_first_chained_access_token (vec< omp_addr_token * > &addr_tokens)
 
static treeomp_accumulate_sibling_list (enum omp_region_type region_type, enum tree_code code, hash_map< tree_operand_hash, tree > *&struct_map_to_clause, hash_map< tree_operand_hash_no_se, omp_mapping_group * > *group_map, tree *grp_start_p, tree grp_end, vec< omp_addr_token * > &addr_tokens, tree **inner, bool *fragile_p, bool reprocessing_struct, tree **added_tail)
 
static bool omp_build_struct_sibling_lists (enum tree_code code, enum omp_region_type region_type, vec< omp_mapping_group > *groups, hash_map< tree_operand_hash_no_se, omp_mapping_group * > **grpmap, tree *list_p)
 
static void gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, enum omp_region_type region_type, enum tree_code code)
 
static bool omp_shared_to_firstprivate_optimizable_decl_p (tree decl)
 
static void omp_mark_stores (struct gimplify_omp_ctx *ctx, tree decl)
 
static tree omp_find_stores_op (tree *tp, int *walk_subtrees, void *data)
 
static tree omp_find_stores_stmt (gimple_stmt_iterator *gsi_p, bool *handled_ops_p, struct walk_stmt_info *wi)
 
static int gimplify_adjust_omp_clauses_1 (splay_tree_node n, void *data)
 
static void gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p, enum tree_code code)
 
int omp_has_novariants (void)
 
static int omp_has_nocontext (void)
 
int omp_construct_selector_matches (enum tree_code *constructs, int nconstructs, int *scores)
 
static void gimplify_oacc_cache (tree *expr_p, gimple_seq *pre_p)
 
static tree gimplify_oacc_declare_1 (tree clause)
 
static void gimplify_oacc_declare (tree *expr_p, gimple_seq *pre_p)
 
static void gimplify_omp_parallel (tree *expr_p, gimple_seq *pre_p)
 
static void gimplify_omp_task (tree *expr_p, gimple_seq *pre_p)
 
static void gimplify_omp_taskloop_expr (tree type, tree *tp, gimple_seq *pre_p, tree orig_for_stmt)
 
static tree find_standalone_omp_ordered (tree *tp, int *walk_subtrees, void *)
 
static enum gimplify_status gimplify_omp_loop_xform (tree *expr_p, gimple_seq *pre_p)
 
static enum gimplify_status gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
 
static tree note_no_context_vars (tree *tp, int *, void *data)
 
static enum gimplify_status gimplify_omp_loop (tree *expr_p, gimple_seq *pre_p)
 
static tree find_omp_teams (tree *tp, int *walk_subtrees, void *)
 
static tree computable_teams_clause (tree *tp, int *walk_subtrees, void *)
 
static void optimize_target_teams (tree target, gimple_seq *pre_p)
 
static void gimplify_omp_workshare (tree *expr_p, gimple_seq *pre_p)
 
static void gimplify_omp_target_update (tree *expr_p, gimple_seq *pre_p)
 
static bool goa_lhs_expr_p (tree expr, tree addr)
 
static int goa_stabilize_expr (tree *expr_p, gimple_seq *pre_p, tree lhs_addr, tree lhs_var, tree &target_expr, bool rhs, int depth)
 
static enum gimplify_status gimplify_omp_atomic (tree *expr_p, gimple_seq *pre_p)
 
static enum gimplify_status gimplify_transaction (tree *expr_p, gimple_seq *pre_p)
 
static gimplegimplify_omp_ordered (tree expr, gimple_seq body)
 
static tree find_ifn_gomp_dispatch (tree *tp, int *, void *modify)
 
static enum gimplify_status gimplify_omp_dispatch (tree *expr_p, gimple_seq *pre_p)
 
enum gimplify_status gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, bool(*gimple_test_f)(tree), fallback_t fallback)
 
void gimplify_type_sizes (tree type, gimple_seq *list_p)
 
void gimplify_one_sizepos (tree *expr_p, gimple_seq *stmt_p)
 
gbindgimplify_body (tree fndecl, bool do_parms)
 
static bool flag_instrument_functions_exclude_p (tree fndecl)
 
static void build_instrumentation_call (gimple_seq *seq, enum built_in_function fncode, tree cond_var, gimple *stmt)
 
void gimplify_function_tree (tree fndecl)
 
static tree dummy_object (tree type)
 
enum gimplify_status gimplify_va_arg_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p)
 
gimplegimplify_assign (tree dst, tree src, gimple_seq *seq_p)
 

Variables

static unsigned nextconduid = 1
 
static hash_map< tree, unsigned > * cond_uids
 
static hash_set< tree > * asan_poisoned_variables = NULL
 
static struct gimplify_ctxgimplify_ctxp
 
static struct gimplify_omp_ctxgimplify_omp_ctxp
 
static bool in_omp_construct
 
static hash_map< tree, tree > * oacc_declare_returns
 
static struct gimplify_ctxctx_pool = NULL
 

Typedef Documentation

◆ char_p

typedef char* char_p

Enumeration Type Documentation

◆ gimplify_defaultmap_kind

Enumerator
GDMK_SCALAR 
GDMK_SCALAR_TARGET 
GDMK_AGGREGATE 
GDMK_ALLOCATABLE 
GDMK_POINTER 

◆ gimplify_omp_var_data

Enumerator
GOVD_SEEN 
GOVD_EXPLICIT 
GOVD_SHARED 
GOVD_PRIVATE 
GOVD_FIRSTPRIVATE 
GOVD_LASTPRIVATE 
GOVD_REDUCTION 
GOVD_LOCAL 
GOVD_MAP 
GOVD_DEBUG_PRIVATE 
GOVD_PRIVATE_OUTER_REF 
GOVD_LINEAR 
GOVD_ALIGNED 
GOVD_MAP_TO_ONLY 
GOVD_LINEAR_LASTPRIVATE_NO_OUTER 
GOVD_MAP_0LEN_ARRAY 
GOVD_MAP_ALWAYS_TO 
GOVD_WRITTEN 
GOVD_MAP_FORCE 
GOVD_MAP_FORCE_PRESENT 
GOVD_MAP_ALLOC_ONLY 
GOVD_MAP_FROM_ONLY 
GOVD_NONTEMPORAL 
GOVD_LASTPRIVATE_CONDITIONAL 
GOVD_CONDTEMP 
GOVD_REDUCTION_INSCAN 
GOVD_FIRSTPRIVATE_IMPLICIT 
GOVD_DATA_SHARE_CLASS 

◆ omp_region_type

Enumerator
ORT_WORKSHARE 
ORT_TASKGROUP 
ORT_DISPATCH 
ORT_SIMD 
ORT_PARALLEL 
ORT_COMBINED_PARALLEL 
ORT_TASK 
ORT_UNTIED_TASK 
ORT_TASKLOOP 
ORT_UNTIED_TASKLOOP 
ORT_TEAMS 
ORT_COMBINED_TEAMS 
ORT_HOST_TEAMS 
ORT_COMBINED_HOST_TEAMS 
ORT_TARGET_DATA 
ORT_TARGET 
ORT_COMBINED_TARGET 
ORT_IMPLICIT_TARGET 
ORT_ACC 
ORT_ACC_DATA 
ORT_ACC_PARALLEL 
ORT_ACC_KERNELS 
ORT_ACC_SERIAL 
ORT_ACC_HOST_DATA 
ORT_NONE 

◆ omp_tsort_mark

Used for topological sorting of mapping groups.  UNVISITED means we haven't
started processing the group yet.  The TEMPORARY mark is used when we first
encounter a group on a depth-first traversal, and the PERMANENT mark is used
when we have processed all the group's children (i.e. all the base pointers
referred to by the group's mapping nodes, recursively).   
Enumerator
UNVISITED 
TEMPORARY 
PERMANENT 

Function Documentation

◆ asan_poison_variable() [1/2]

static void asan_poison_variable ( tree decl,
bool poison,
gimple_seq * seq_p )
static
Generate IFN_ASAN_MARK internal call that depending on POISON flag
either poisons or unpoisons a DECL.  Created statement is appended
to SEQ_P gimple sequence.   

References asan_poison_variable(), gsi_end_p(), and gsi_last().

◆ asan_poison_variable() [2/2]

static void asan_poison_variable ( tree decl,
bool poison,
gimple_stmt_iterator * it,
bool before )
static
Generate IFN_ASAN_MARK call that would poison or unpoison, depending
on POISON flag, shadow memory of a DECL variable.  The call will be
put on location identified by IT iterator, where BEFORE flag drives
position where the stmt will be put.   

References ASAN_SHADOW_GRANULARITY, build_fold_addr_expr, build_int_cst(), DECL_ALIGN_UNIT, DECL_SIZE_UNIT, g, gcc_assert, gimple_build_call_internal(), gsi_insert_after(), gsi_insert_before(), GSI_NEW_STMT, hwasan_sanitize_p(), hwasan_sanitize_stack_p(), HWASAN_TAG_GRANULE_SIZE, integer_type_node, SET_DECL_ALIGN, and zerop().

Referenced by asan_poison_variable(), asan_poison_variables(), gimplify_bind_expr(), gimplify_decl_expr(), and gimplify_target_expr().

◆ asan_poison_variables()

static void asan_poison_variables ( hash_set< tree > * variables,
bool poison,
gimple_seq * seq_p )
static
Generate IFN_ASAN_MARK internal call for all VARIABLES
depending on POISON flag.  Created statement is appended
to SEQ_P gimple sequence.   

References asan_poison_variable(), ASAN_USE_AFTER_SCOPE_ATTRIBUTE, DECL_ATTRIBUTES, FOR_EACH_VEC_ELT, get_identifier(), i, integer_one_node, lookup_attribute(), sort_by_decl_uid(), tree_cons(), and variables.

Referenced by gimplify_expr().

◆ build_and_jump()

tree build_and_jump ( tree * label_p)
Build a GOTO to the LABEL_DECL pointed to by LABEL_P, building it first
if necessary.   

References build1(), create_artificial_label(), NULL, NULL_TREE, UNKNOWN_LOCATION, and void_type_node.

Referenced by gimplify_exit_expr(), gimplify_omp_affinity(), gimplify_omp_depend(), lower_omp_master(), lower_omp_single_copy(), shortcut_cond_expr(), and shortcut_cond_r().

◆ build_asan_poison_call_expr()

static tree build_asan_poison_call_expr ( tree decl)
static
Generate IFN_ASAN_MARK call that poisons shadow of a for DECL variable.   

References build_call_expr_internal_loc(), build_fold_addr_expr, build_int_cst(), DECL_SIZE_UNIT, integer_type_node, NULL_TREE, UNKNOWN_LOCATION, void_type_node, and zerop().

Referenced by gimplify_target_expr().

◆ build_instrumentation_call()

static void build_instrumentation_call ( gimple_seq * seq,
enum built_in_function fncode,
tree cond_var,
gimple * stmt )
static
Build a call to the instrumentation function FNCODE and add it to SEQ.
If COND_VAR is not NULL, it is a boolean variable guarding the call to
the instrumentation function.  IF STMT is not NULL, it is a statement
to be executed just before the call to the instrumentation function.   

References boolean_false_node, build_fold_addr_expr, builtin_decl_implicit(), create_artificial_label(), create_tmp_var, current_function_decl, gimple_build_call(), gimple_build_cond(), gimple_build_label(), gimple_build_predict(), gimple_call_set_lhs(), gimplify_seq_add_stmt(), integer_zero_node, NOT_TAKEN, ptr_type_node, TREE_NO_TRAMPOLINE, and UNKNOWN_LOCATION.

Referenced by gimplify_function_tree().

◆ build_omp_struct_comp_nodes()

static tree build_omp_struct_comp_nodes ( enum tree_code code,
tree grp_start,
tree grp_end,
tree * extra_node )
static
For a set of mappings describing an array section pointed to by a struct
(or derived type, etc.) component, create an "alloc" or "release" node to
insert into a list following a GOMP_MAP_STRUCT node.  For some types of
mapping (e.g. Fortran arrays with descriptors), an additional mapping may
be created that is inserted into the list of mapping nodes attached to the
directive being processed -- not part of the sorted list of nodes after
GOMP_MAP_STRUCT.

CODE is the code of the directive being processed.  GRP_START and GRP_END
are the first and last of two or three nodes representing this array section
mapping (e.g. a data movement node like GOMP_MAP_{TO,FROM}, optionally a
GOMP_MAP_TO_PSET, and finally a GOMP_MAP_ALWAYS_POINTER).  EXTRA_NODE is
filled with the additional node described above, if needed.

This function does not add the new nodes to any lists itself.  It is the
responsibility of the caller to do that.   

References build_omp_clause(), gimplify_omp_ctx::code, gcc_assert, NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_SET_MAP_KIND, OMP_CLAUSE_SIZE, omp_map_clause_descriptor_p(), ptr_type_node, TYPE_SIZE_UNIT, and unshare_expr().

Referenced by omp_accumulate_sibling_list().

◆ build_stack_save_restore()

static void build_stack_save_restore ( gcall ** save,
gcall ** restore )
static
Prepare calls to builtins to SAVE and RESTORE the stack as well as
a temporary through which they communicate.   

References builtin_decl_implicit(), create_tmp_var, gimple_build_call(), gimple_call_set_lhs(), and ptr_type_node.

Referenced by gimplify_bind_expr().

◆ canonicalize_addr_expr()

static void canonicalize_addr_expr ( tree * expr_p)
static
If a NOP conversion is changing a pointer to array of foo to a pointer
to foo, embed that change in the ADDR_EXPR by converting
   T array[U];
   (T *)&array
==>
   &array[L]
where L is the lower bound.  For simplicity, only do this for constant
lower bound.
The constraint is that the type of &array[L] is trivially convertible
to T *.   

References build1(), build4(), build_pointer_type(), fold_convert, NULL_TREE, POINTER_TYPE_P, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_DOMAIN, TYPE_MAIN_VARIANT, TYPE_MIN_VALUE, TYPE_SIZE_UNIT, and useless_type_conversion_p().

Referenced by gimplify_conversion().

◆ canonicalize_component_ref()

static void canonicalize_component_ref ( tree * expr_p)
static
*EXPR_P is a COMPONENT_REF being used as an rvalue.  If its type is
different from its canonical type, wrap the whole thing inside a
NOP_EXPR and force the type of the COMPONENT_REF to be the canonical
type.

The canonical type of a COMPONENT_REF is the type of the field being
referenced--unless the field is a bit-field which can be read directly
in a smaller mode, in which case the canonical type is the
sign-appropriate type corresponding to that mode.   

References build_qualified_type(), gcc_assert, get_unwidened(), INTEGRAL_TYPE_P, NULL_TREE, TREE_CODE, TREE_OPERAND, TREE_TYPE, type(), TYPE_MAIN_VARIANT, TYPE_QUALS, and useless_type_conversion_p().

Referenced by gimplify_compound_lval(), and gimplify_conversion().

◆ case_label_p()

static bool case_label_p ( const vec< tree > * cases,
tree label )
static
Return true if LABEL, a LABEL_DECL, represents a case label
in a vector of labels CASES.   

References CASE_LABEL, FOR_EACH_VEC_ELT, i, and label_entry::label.

Referenced by should_warn_for_implicit_fallthrough().

◆ collect_fallthrough_labels()

static gimple * collect_fallthrough_labels ( gimple_stmt_iterator * gsi_p,
auto_vec< struct label_entry > * labels,
location_t * prevloc )
static
Collect labels that may fall through into LABELS and return the statement
preceding another case label, or a user-defined label.  Store a location
useful to give warnings at *PREVLOC (usually the location of the returned
statement or of its surrounding scope).   

References as_a(), DECL_ARTIFICIAL, find_label_entry(), gimple_bind_body(), gimple_call_internal_p(), gimple_cond_false_label(), gimple_goto_dest(), gimple_has_location(), gimple_label_label(), gimple_location(), gimple_seq_first_stmt(), gimple_seq_last_stmt(), gsi_end_p(), gsi_next(), gsi_prev(), gsi_stmt(), is_gimple_debug(), label_entry::label, last, last_stmt_in_scope(), NULL, SWITCH_BREAK_LABEL_P, UNKNOWN_LOCATION, and UNUSED_LABEL_P.

Referenced by warn_implicit_fallthrough_r().

◆ computable_teams_clause()

◆ copy_if_shared()

void copy_if_shared ( tree * tp,
void * data )
Unshare most of the shared trees rooted at *TP.  DATA is passed to the
copy_if_shared_r callback unmodified.   

References copy_if_shared_r(), NULL, and walk_tree.

Referenced by unshare_body().

◆ copy_if_shared_r()

static tree copy_if_shared_r ( tree * tp,
int * walk_subtrees,
void * data )
static
Callback for walk_tree to unshare most of the shared trees rooted at *TP.
If *TP has been visited already, then *TP is deeply copied by calling
mostly_copy_tree_r.  DATA is passed to mostly_copy_tree_r unmodified.   

References gimplify_omp_ctx::code, mostly_copy_tree_r(), NULL, NULL_TREE, tcc_constant, tcc_declaration, tcc_type, TREE_CODE, TREE_CODE_CLASS, TREE_VISITED, and walk_tree.

Referenced by copy_if_shared().

◆ create_tmp_from_val()

static tree create_tmp_from_val ( tree val)
inlinestatic
Create a temporary with a name derived from VAL.  Subroutine of
lookup_tmp_var; nobody else should call this function.   

References create_tmp_var, get_name(), TREE_TYPE, and TYPE_MAIN_VARIANT.

Referenced by lookup_tmp_var().

◆ ctx_alloc()

static struct gimplify_ctx * ctx_alloc ( void )
inlinestatic
Return a gimplify context struct from the pool.   

References ctx_pool, and gimplify_ctx::prev_context.

Referenced by push_gimplify_context().

◆ ctx_free()

static void ctx_free ( struct gimplify_ctx * c)
inlinestatic
Put gimplify context C back into the pool.   

References ctx_pool, and gimplify_ctx::prev_context.

Referenced by pop_gimplify_context().

◆ debug_mapping_group()

◆ declare_vars()

void declare_vars ( tree vars,
gimple * gs,
bool debug_info )

◆ delete_omp_context()

static void delete_omp_context ( struct gimplify_omp_ctx * c)
static
Destroy an omp construct that deals with variable remapping.   

References gimplify_omp_ctx::loop_iter_var, gimplify_omp_ctx::privatized_types, and gimplify_omp_ctx::variables.

Referenced by gimplify_adjust_omp_clauses(), gimplify_body(), and gimplify_omp_dispatch().

◆ device_resident_p()

static bool device_resident_p ( tree decl)
static
Return true if global var DECL is device resident.   

References DECL_ATTRIBUTES, lookup_attribute(), OMP_CLAUSE_MAP_KIND, TREE_PURPOSE, and TREE_VALUE.

Referenced by oacc_default_clause().

◆ dummy_object()

static tree dummy_object ( tree type)
static
Return a dummy expression of type TYPE in order to keep going after an
error.   

References build2(), build_int_cst(), and build_pointer_type().

Referenced by gimplify_va_arg_expr().

◆ emit_warn_switch_unreachable()

static gimple * emit_warn_switch_unreachable ( gimple * stmt)
static

◆ expand_FALLTHROUGH()

static void expand_FALLTHROUGH ( gimple_seq * seq_p)
static
Expand all FALLTHROUGH () calls in SEQ.   

References expand_FALLTHROUGH_r(), NULL, pedwarn(), UNKNOWN_LOCATION, and walk_gimple_seq_mod().

Referenced by gimplify_switch_expr().

◆ expand_FALLTHROUGH_r()

◆ extract_base_bit_offset()

static tree extract_base_bit_offset ( tree base,
poly_int64 * bitposp,
poly_offset_int * poffsetp,
bool * variable_offset )
static
Strip ARRAY_REFS or an indirect ref off BASE, find the containing object,
and set *BITPOSP and *POFFSETP to the bit offset of the access.
If BASE_REF is non-NULL and the containing object is a reference, set
*BASE_REF to that reference before dereferencing the object.
If BASE_REF is NULL, check that the containing object is a COMPONENT_REF or
has array type, else return NULL.   

References bits_to_bytes_round_down, get_inner_reference(), NULL_TREE, offset, poly_int_tree_p(), STRIP_NOPS, and wi::to_poly_offset().

Referenced by omp_accumulate_sibling_list().

◆ find_decl_expr()

static tree find_decl_expr ( tree * tp,
int * walk_subtrees,
void * data )
static
Callback for walk_tree to find a DECL_EXPR for the given DECL.   

References DECL_EXPR_DECL, IS_TYPE_OR_DECL_P, NULL_TREE, and TREE_CODE.

Referenced by gimplify_scan_omp_clauses().

◆ find_goto()

static tree find_goto ( tree expr)
static
If EXPR is a GOTO_EXPR, return it.  If it is a STATEMENT_LIST, skip
any of its leading DEBUG_BEGIN_STMTS and recurse on the subsequent
statement, if it is the last one.  Otherwise, return NULL.   

References expr, find_goto(), i, NULL_TREE, TREE_CODE, tsi_end_p(), tsi_next(), tsi_one_before_end_p(), tsi_start(), and tsi_stmt().

Referenced by find_goto(), and find_goto_label().

◆ find_goto_label()

static tree find_goto_label ( tree expr)
inlinestatic
Same as find_goto, except that it returns NULL if the destination
is not a LABEL_DECL.   

References find_goto(), GOTO_DESTINATION, NULL_TREE, and TREE_CODE.

Referenced by gimplify_cond_expr(), and shortcut_cond_expr().

◆ find_ifn_gomp_dispatch()

static tree find_ifn_gomp_dispatch ( tree * tp,
int * ,
void * modify )
static
Callback for walk_tree to find an IFN_GOMP_DISPATCH.   

References CALL_EXPR_ARG, CALL_EXPR_IFN, modify, NULL_TREE, and TREE_CODE.

Referenced by gimplify_omp_dispatch().

◆ find_label_entry()

static struct label_entry * find_label_entry ( const auto_vec< struct label_entry > * vec,
tree label )
static
Find LABEL in vector of label entries VEC.   

References FOR_EACH_VEC_ELT, i, label_entry::label, and NULL.

Referenced by collect_fallthrough_labels(), and warn_implicit_fallthrough_r().

◆ find_omp_teams()

static tree find_omp_teams ( tree * tp,
int * walk_subtrees,
void *  )
static
Helper function of optimize_target_teams, find OMP_TEAMS inside
of OMP_TARGET's body.   

References NULL_TREE, and TREE_CODE.

Referenced by optimize_target_teams().

◆ find_standalone_omp_ordered()

static tree find_standalone_omp_ordered ( tree * tp,
int * walk_subtrees,
void *  )
static
Helper function of gimplify_omp_for, find OMP_ORDERED with
null OMP_ORDERED_BODY inside of OMP_FOR's body.   

References NULL_TREE, OMP_ORDERED_BODY, and TREE_CODE.

Referenced by gimplify_omp_for().

◆ flag_instrument_functions_exclude_p()

static bool flag_instrument_functions_exclude_p ( tree fndecl)
static
Return whether we should exclude FNDECL from instrumentation.   

References lang_hooks::decl_printable_name, DECL_SOURCE_FILE, FOR_EACH_VEC_ELT, i, and NULL.

Referenced by gimplify_function_tree().

◆ force_constant_size()

static void force_constant_size ( tree var)
static
For VAR a VAR_DECL of variable size, try to find a constant upper bound
for the size and adjust DECL_SIZE/DECL_SIZE_UNIT accordingly.  Abort if
no such upper bound can be obtained.   

References build_int_cst(), DECL_SIZE, DECL_SIZE_UNIT, gcc_assert, max_int_size_in_bytes(), TREE_TYPE, and VAR_P.

Referenced by gimple_add_tmp_var(), and gimple_add_tmp_var_fn().

◆ force_labels_r()

static tree force_labels_r ( tree * tp,
int * walk_subtrees,
void * data )
static
A helper function to be called via walk_tree.  Mark all labels under *TP
as being forced.  To be called for DECL_INITIAL of static variables.   

References cfun, FORCED_LABEL, NULL_TREE, TREE_CODE, and TYPE_P.

Referenced by gimplify_decl_expr(), and gimplify_init_constructor().

◆ free_gimplify_stack()

void free_gimplify_stack ( void )
Free allocated ctx stack memory.   

References ctx_pool, free(), and gimplify_ctx::prev_context.

Referenced by expand_all_functions().

◆ generic_expr_could_trap_p()

bool generic_expr_could_trap_p ( tree expr)
Return true if evaluating EXPR could trap.
EXPR is GENERIC, while tree_could_trap_p can be called
only on GIMPLE.   

References EXPR_P, generic_expr_could_trap_p(), i, is_gimple_val(), tree_could_trap_p(), TREE_OPERAND, and TREE_OPERAND_LENGTH.

Referenced by expr_no_side_effects_p(), expression_expensive_p(), generic_expr_could_trap_p(), gimplify_cond_expr(), maybe_resimplify_conditional_op(), and simple_condition_p().

◆ get_formal_tmp_var()

tree get_formal_tmp_var ( tree val,
gimple_seq * pre_p )
Return a formal temporary variable initialized with VAL.  PRE_P is as
in gimplify_expr.  Only use this function if:

1) The value of the unfactored expression represented by VAL will not
   change between the initialization and use of the temporary, and
2) The temporary will not be otherwise modified.

For instance, #1 means that this is inappropriate for SAVE_EXPR temps,
and #2 means it is inappropriate for && temps.

For other cases, use get_initialized_tmp_var instead.   

References internal_get_tmp_var(), and NULL.

Referenced by gimplify_expr(), gimplify_init_constructor(), gimplify_init_ctor_preeval(), gimplify_modify_expr_complex_part(), and lower_omp_for().

◆ get_initialized_tmp_var()

tree get_initialized_tmp_var ( tree val,
gimple_seq * pre_p,
gimple_seq * post_p,
bool allow_ssa )

◆ gimple_add_init_for_auto_var()

static void gimple_add_init_for_auto_var ( tree decl,
enum auto_init_type init_type,
gimple_seq * seq_p )
static
Generate an initialization to automatic variable DECL based on INIT_TYPE.
Build a call to internal const function DEFERRED_INIT:
1st argument: SIZE of the DECL;
2nd argument: INIT_TYPE;
3rd argument: NAME of the DECL;

as LHS = DEFERRED_INIT (SIZE of the DECL, INIT_TYPE, NAME of the DECL).   

References AUTO_INIT_UNINITIALIZED, auto_var_p(), build_call_expr_internal_loc(), build_int_cst(), build_string_literal(), DECL_NAME, DECL_SOURCE_LOCATION, DECL_UID, gcc_assert, gimplify_assign(), HOST_BITS_PER_INT, integer_type_node, TREE_TYPE, and TYPE_SIZE_UNIT.

Referenced by gimplify_decl_expr().

◆ gimple_add_padding_init_for_auto_var()

static void gimple_add_padding_init_for_auto_var ( tree decl,
bool is_vla,
gimple_seq * seq_p )
static
Generate padding initialization for automatic variable DECL.
C guarantees that brace-init with fewer initializers than members
aggregate will initialize the rest of the aggregate as-if it were
static initialization.  In turn static initialization guarantees
that padding is initialized to zero. So, we always initialize paddings
to zeroes regardless INIT_TYPE.
To do the padding initialization, we insert a call to
__builtin_clear_padding (&decl, 0, for_auto_init = true).
Note, we add an additional dummy argument for __builtin_clear_padding,
'for_auto_init' to distinguish whether this call is for automatic
variable initialization or not.

References build_fold_addr_expr, build_one_cst(), builtin_decl_explicit(), DECL_HAS_VALUE_EXPR_P, DECL_VALUE_EXPR, gcc_assert, gimple_build_call(), gimplify_seq_add_stmt(), INDIRECT_REF_P, mark_addressable(), NULL_TREE, TREE_OPERAND, and TREE_TYPE.

Referenced by gimplify_decl_expr(), and gimplify_init_constructor().

◆ gimple_add_tmp_var()

◆ gimple_add_tmp_var_fn()

void gimple_add_tmp_var_fn ( struct function * fn,
tree tmp )

◆ gimple_associate_condition_with_expr()

static void gimple_associate_condition_with_expr ( struct function * fn,
gcond * stmt,
unsigned uid )
static
Associate the condition STMT with the discriminator UID.  STMTs that are
broken down with ANDIF/ORIF from the same Boolean expression should be given
the same UID; 'if (a && b && c) { if (d || e) ... } ...' should yield the
{ a: 1, b: 1, c: 1, d: 2, e: 2 } when gimplification is done.  This is used
for condition coverage.   

References function::cond_uids, and hash_map< KeyId, Value, Traits >::put().

Referenced by gimplify_cond_expr().

◆ gimple_bind_expr_stack()

vec< gbind * > gimple_bind_expr_stack ( void )
Return the stack of bindings created during gimplification.   

References gimplify_ctx::bind_expr_stack, and gimplify_ctxp.

◆ gimple_boolify()

◆ gimple_conditional_context()

static bool gimple_conditional_context ( void )
static
Return true iff there is a COND_EXPR between us and the innermost
CLEANUP_POINT_EXPR.  This info is used by gimple_push_cleanup.   

References gimplify_ctx::conditions, and gimplify_ctxp.

Referenced by gimple_push_cleanup(), and maybe_add_early_return_predict_stmt().

◆ gimple_current_bind_expr()

gbind * gimple_current_bind_expr ( void )
Return the first element of the stack of bindings.   

References gimplify_ctx::bind_expr_stack, and gimplify_ctxp.

◆ gimple_fold_indirect_ref_rhs()

static tree gimple_fold_indirect_ref_rhs ( tree t)
static
Given a pointer value OP0, return a simplified version of an
indirection through OP0, or NULL_TREE if no simplification is
possible.  This may only be applied to a rhs of an expression.
Note that the resulting type may be different from the type pointed
to in the sense that it is still compatible from the langhooks
point of view.  

References gimple_fold_indirect_ref().

Referenced by gimplify_modify_expr_rhs().

◆ gimple_pop_bind_expr()

static void gimple_pop_bind_expr ( void )
static
Pop the first element off the stack of bindings.   

References gimplify_ctx::bind_expr_stack, and gimplify_ctxp.

Referenced by gimplify_bind_expr().

◆ gimple_pop_condition()

static void gimple_pop_condition ( gimple_seq * pre_p)
static
Note that we've left a COND_EXPR.  If we're back at unconditional scope
now, add any conditional cleanups we've seen to the prequeue.   

References gimplify_ctx::conditional_cleanups, gimplify_ctx::conditions, gcc_assert, gimplify_ctxp, gimplify_seq_add_seq(), and NULL.

Referenced by gimplify_cond_expr().

◆ gimple_push_bind_expr()

static void gimple_push_bind_expr ( gbind * bind_stmt)
static
Push a GIMPLE_BIND tuple onto the stack of bindings.   

References gimplify_ctx::bind_expr_stack, and gimplify_ctxp.

Referenced by gimplify_bind_expr().

◆ gimple_push_cleanup()

static void gimple_push_cleanup ( tree var,
tree cleanup,
bool eh_only,
gimple_seq * pre_p,
bool force_uncond = false )
static
Insert a cleanup marker for gimplify_cleanup_point_expr.  CLEANUP
is the cleanup action required.  EH_ONLY is true if the cleanup should
only be executed if an exception is thrown, not on normal exit.
If FORCE_UNCOND is true perform the cleanup unconditionally;  this is
only valid for clobbers.   

References boolean_false_node, boolean_true_node, boolean_type_node, build3(), gimplify_ctx::conditional_cleanups, create_tmp_var, gimple_build_assign(), gimple_build_wce(), gimple_conditional_context(), gimple_wce_set_cleanup_eh_only(), gimplify_ctxp, gimplify_seq_add_stmt(), gimplify_stmt(), NULL, seen_error(), suppress_warning(), and void_type_node.

Referenced by gimplify_target_expr().

◆ gimple_push_condition()

static void gimple_push_condition ( void )
static

◆ gimplify_addr_expr()

static enum gimplify_status gimplify_addr_expr ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p )
static
Rewrite the ADDR_EXPR node pointed to by EXPR_P

  unary_expr
          : ...
          | '&' varname
          ...

PRE_P points to the list where side effects that must happen before
    *EXPR_P should be stored.

POST_P points to the list where side effects that must happen after
    *EXPR_P should be stored.   

References build_fold_addr_expr, build_fold_addr_expr_loc(), BUILT_IN_NORMAL, builtin_decl_declared_p(), DECL_FUNCTION_CODE(), EXPR_LOCATION, fb_either, fndecl_built_in_p(), fold_convert, fold_convert_loc(), gimplify_expr(), GS_ERROR, GS_OK, INDIRECT_REF_P, integer_zerop(), is_gimple_addressable(), mark_addressable(), prepare_gimple_addressable(), recompute_tree_invariant_for_addr_expr(), set_builtin_decl_implicit_p(), TREE_CODE, TREE_OPERAND, tree_ssa_useless_type_conversion(), TREE_TYPE, types_compatible_p(), and useless_type_conversion_p().

Referenced by gimplify_expr().

◆ gimplify_adjust_omp_clauses()

static void gimplify_adjust_omp_clauses ( gimple_seq * pre_p,
gimple_seq body,
tree * list_p,
enum tree_code code )
static

References gimplify_omp_ctx::add_safelen1, build_omp_clause(), build_simple_mem_ref, gimplify_omp_ctx::clauses, gimplify_omp_ctx::code, copy_node(), DECL_ATTRIBUTES, DECL_HAS_VALUE_EXPR_P, DECL_NAME, DECL_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_VALUE_EXPR, lang_hooks::decls, gimplify_omp_ctx::default_kind, delete_omp_context(), error_at(), fb_lvalue, fb_rvalue, gcc_assert, gcc_checking_assert, gcc_unreachable, get_initialized_tmp_var(), gimplify_adjust_omp_clauses_1(), gimplify_expr(), gimplify_omp_ctxp, GOVD_DATA_SHARE_CLASS, GOVD_DEBUG_PRIVATE, GOVD_FIRSTPRIVATE, GOVD_LASTPRIVATE, GOVD_LASTPRIVATE_CONDITIONAL, GOVD_LINEAR, GOVD_LOCAL, GOVD_MAP, GOVD_PRIVATE, GOVD_REDUCTION, GOVD_REDUCTION_INSCAN, GOVD_SEEN, GOVD_SHARED, GOVD_WRITTEN, GS_ERROR, gimplify_omp_ctx::has_depend, INDIRECT_REF_P, integer_one_node, is_gimple_lvalue(), is_gimple_val(), is_global_var(), gimplify_adjust_omp_clauses_data::list_p, lookup_attribute(), NULL, NULL_TREE, oacc_resolve_clause_dependencies(), omp_add_variable(), omp_build_struct_sibling_lists(), OMP_CLAUSE__CACHE_, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_ALLOCATE, OMP_CLAUSE_ALLOCATE_ALLOCATOR, OMP_CLAUSE_ASYNC, OMP_CLAUSE_AUTO, OMP_CLAUSE_BIND, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_DEFAULT_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP, OMP_CLAUSE_DEPEND, OMP_CLAUSE_DETACH, OMP_CLAUSE_DEVICE, OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_DOACROSS, OMP_CLAUSE_EXCLUSIVE, OMP_CLAUSE_FILTER, OMP_CLAUSE_FINAL, OMP_CLAUSE_FINALIZE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT, OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT_TARGET, OMP_CLAUSE_FROM, OMP_CLAUSE_GANG, OMP_CLAUSE_GRAINSIZE, OMP_CLAUSE_HAS_DEVICE_ADDR, OMP_CLAUSE_HINT, OMP_CLAUSE_IF, OMP_CLAUSE_IF_PRESENT, OMP_CLAUSE_IN_REDUCTION, OMP_CLAUSE_INCLUSIVE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_IS_DEVICE_PTR, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_CONDITIONAL, OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_CLAUSE_LINEAR, OMP_CLAUSE_LINEAR_NO_COPYIN, OMP_CLAUSE_LINEAR_NO_COPYOUT, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_IN_REDUCTION, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_NOGROUP, OMP_CLAUSE_NOHOST, OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_TASKS, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_ORDER, OMP_CLAUSE_ORDERED, OMP_CLAUSE_PRIORITY, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_PRIVATE_DEBUG, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_REDUCTION_INSCAN, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SAFELEN_EXPR, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SELF, OMP_CLAUSE_SEQ, OMP_CLAUSE_SET_CODE, OMP_CLAUSE_SET_MAP_KIND, OMP_CLAUSE_SHARED, OMP_CLAUSE_SHARED_READONLY, OMP_CLAUSE_SIMD, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_SIZE, OMP_CLAUSE_TASK_REDUCTION, OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_THREADS, OMP_CLAUSE_TILE, OMP_CLAUSE_TO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_USE_DEVICE_ADDR, OMP_CLAUSE_USE_DEVICE_PTR, OMP_CLAUSE_VECTOR, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE_WORKER, omp_find_stores_op(), omp_find_stores_stmt(), lang_hooks_for_decls::omp_finish_clause, omp_gather_mapping_groups(), omp_group_last(), omp_index_mapping_groups(), omp_mark_stores(), omp_notice_variable(), lang_hooks_for_decls::omp_private_debug_clause, omp_reorder_mapping_groups(), omp_resolve_clause_dependencies(), omp_segregate_mapping_groups(), omp_shared_to_firstprivate_optimizable_decl_p(), omp_tsort_mapping_groups(), ORT_ACC, ORT_ACC_PARALLEL, ORT_ACC_SERIAL, ORT_COMBINED_PARALLEL, ORT_HOST_TEAMS, ORT_PARALLEL, ORT_SIMD, ORT_TARGET, ORT_TASK, ORT_TASKLOOP, ORT_TEAMS, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, poly_int_tree_p(), gimplify_adjust_omp_clauses_data::pre_p, gimplify_omp_ctx::region_type, size_zero_node, strip_array_types(), gimplify_omp_ctx::target_firstprivatize_array_bases, TREE_CODE, TREE_OPERAND, tree_to_shwi(), TREE_TYPE, TYPE_ATOMIC, TYPE_SIZE_UNIT, UNKNOWN_LOCATION, splay_tree_node< T >::value(), gimplify_omp_ctx::variables, walk_gimple_seq(), and warning_at().

Referenced by gimplify_expr(), gimplify_oacc_cache(), gimplify_oacc_declare(), gimplify_omp_for(), gimplify_omp_parallel(), gimplify_omp_target_update(), gimplify_omp_task(), and gimplify_omp_workshare().

◆ gimplify_adjust_omp_clauses_1()

static int gimplify_adjust_omp_clauses_1 ( splay_tree_node n,
void * data )
static
For all variables that were not actually used within the context,
remove PRIVATE, SHARED, and FIRSTPRIVATE clauses.   

References build2(), build_fold_indirect_ref_loc(), build_int_cst(), build_omp_clause(), build_pointer_type(), build_simple_mem_ref, char_type_node, gimplify_omp_ctx::code, DECL_ATTRIBUTES, DECL_IN_CONSTANT_POOL, DECL_P, DECL_SIZE, DECL_SIZE_UNIT, DECL_VALUE_EXPR, lang_hooks::decls, error(), fb_rvalue, g, gcc_assert, gcc_unreachable, varpool_node::get(), get_identifier(), gimple_add_tmp_var(), gimplify_expr(), gimplify_omp_ctxp, GOVD_ALIGNED, GOVD_CONDTEMP, GOVD_DATA_SHARE_CLASS, GOVD_DEBUG_PRIVATE, GOVD_EXPLICIT, GOVD_FIRSTPRIVATE, GOVD_LASTPRIVATE, GOVD_LASTPRIVATE_CONDITIONAL, GOVD_LINEAR, GOVD_LOCAL, GOVD_MAP, GOVD_MAP_0LEN_ARRAY, GOVD_MAP_ALLOC_ONLY, GOVD_MAP_FORCE, GOVD_MAP_FORCE_PRESENT, GOVD_MAP_FROM_ONLY, GOVD_MAP_TO_ONLY, GOVD_NONTEMPORAL, GOVD_PRIVATE, GOVD_PRIVATE_OUTER_REF, GOVD_REDUCTION, GOVD_SEEN, GOVD_SHARED, GOVD_WRITTEN, gimplify_omp_ctx::has_depend, gcc::context::have_offload, INDIRECT_REF_P, input_location, is_gimple_val(), is_global_var(), gimplify_adjust_omp_clauses_data::list_p, lookup_attribute(), NULL, NULL_TREE, symtab_node::offloadable, OMP_CLAUSE__CONDTEMP_, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION, OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_PRIVATE_DEBUG, OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_SET_MAP_KIND, OMP_CLAUSE_SHARED, OMP_CLAUSE_SHARED_READONLY, OMP_CLAUSE_SIZE, lang_hooks_for_decls::omp_finish_clause, omp_mark_stores(), omp_notice_variable(), lang_hooks_for_decls::omp_private_debug_clause, omp_privatize_by_reference(), omp_shared_to_firstprivate_optimizable_decl_p(), ORT_ACC, ORT_COMBINED_PARALLEL, ORT_SIMD, ORT_TARGET, gimplify_omp_ctx::outer_context, gimplify_adjust_omp_clauses_data::pre_p, gimplify_omp_ctx::region_type, size_zero_node, strip_array_types(), gimplify_omp_ctx::target_firstprivatize_array_bases, TREE_CODE, tree_cons(), TREE_OPERAND, TREE_TYPE, TYPE_ATOMIC, TYPE_SIZE_UNIT, unshare_expr(), splay_tree_node< T >::value(), VAR_P, and gimplify_omp_ctx::variables.

Referenced by gimplify_adjust_omp_clauses().

◆ gimplify_and_add()

◆ gimplify_and_return_first()

static gimple * gimplify_and_return_first ( tree t,
gimple_seq * seq_p )
static
Gimplify statement T into sequence *SEQ_P, and return the first
tuple in the sequence of generated tuples for this statement.
Return NULL if gimplifying T produced no tuples.   

References gimple_seq_first_stmt(), gimplify_and_add(), gsi_end_p(), gsi_last(), gsi_next(), gsi_stmt(), and last.

Referenced by gimplify_call_expr(), gimplify_omp_for(), gimplify_omp_parallel(), gimplify_omp_task(), gimplify_omp_workshare(), and gimplify_transaction().

◆ gimplify_arg()

enum gimplify_status gimplify_arg ( tree * arg_p,
gimple_seq * pre_p,
location_t call_location,
bool allow_ssa )
Helper for gimplify_call_expr.  Gimplify a single argument *ARG_P
Store any side-effects in PRE_P.  CALL_LOCATION is the location of
the CALL_EXPR.  If ALLOW_SSA is set the actual parameter may be
gimplified to an SSA name.   

References bool, fb_either, fb_rvalue, gimplify_expr(), is_gimple_lvalue(), is_gimple_reg_type(), is_gimple_val(), maybe_with_size_expr(), NULL, protected_set_expr_location(), TARGET_EXPR_INITIAL, TREE_CODE, TREE_TYPE, and VOID_TYPE_P.

Referenced by gimplify_call_expr(), gimplify_expr(), gimplify_modify_expr(), gimplify_modify_expr_to_memcpy(), and gimplify_modify_expr_to_memset().

◆ gimplify_asm_expr()

◆ gimplify_assign()

gimple * gimplify_assign ( tree dst,
tree src,
gimple_seq * seq_p )

◆ gimplify_bind_expr()

static enum gimplify_status gimplify_bind_expr ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify a BIND_EXPR.  Just voidify and recurse.   

References gimplify_omp_ctx::add_safelen1, asan_poison_variable(), asan_poisoned_variables, BIND_EXPR_BLOCK, BIND_EXPR_BODY, BIND_EXPR_VARS, BLOCK_SOURCE_END_LOCATION, BLOCK_SOURCE_LOCATION, build_call_expr_loc(), build_clobber(), build_fold_indirect_ref, build_int_cst(), build_pointer_type(), build_stack_save_restore(), build_tree_list(), build_zero_cst(), builtin_decl_explicit(), cfun, CLOBBER_STORAGE_END, hash_set< KeyId, Lazy, Traits >::contains(), create_tmp_var, current_function_decl, DECL_ALIGN_UNIT, DECL_ARTIFICIAL, DECL_ATTRIBUTES, DECL_CHAIN, DECL_CONTEXT, DECL_EXTERNAL, DECL_HARD_REGISTER, DECL_HAS_VALUE_EXPR_P, DECL_IGNORED_P, DECL_P, DECL_SEEN_IN_BIND_EXPR_P, DECL_SIZE_UNIT, DECL_SOURCE_LOCATION, DECL_VALUE_EXPR, error_at(), errorcount, EXPR_LOCATION, fold_build2_loc(), fold_convert, g, gcc_assert, cgraph_node::get(), hash_map< KeyId, Value, Traits >::get(), varpool_node::get(), get_identifier(), get_name(), GF_OMP_TARGET_KIND_OACC_DECLARE, gimple_bind_body(), gimple_bind_set_body(), gimple_build_assign(), gimple_build_bind(), gimple_build_omp_target(), gimple_build_try(), gimple_pop_bind_expr(), gimple_push_bind_expr(), gimple_set_location(), GIMPLE_TRY_FINALLY, gimplify_and_add(), gimplify_ctxp, gimplify_omp_ctxp, gimplify_seq_add_stmt(), gimplify_stmt(), GOVD_LOCAL, GOVD_PRIVATE, GOVD_SEEN, GS_ALL_DONE, GS_OK, gsi_insert_seq_before_without_update(), GSI_NEW_STMT, gsi_start(), gcc::context::have_offload, INDIRECT_REF_P, integer_onep(), hash_map< KeyId, Value, Traits >::is_empty(), is_gimple_reg(), is_global_var(), gimplify_ctx::keep_stack, lang_GNU_Fortran(), gimplify_ctx::live_switch_vars, lookup_attribute(), MAX, NULL, NULL_TREE, oacc_declare_returns, offload_vars, symtab_node::offloadable, omp_add_variable(), OMP_CLAUSE_CHAIN, OMP_REQUIRES_DYNAMIC_ALLOCATORS, omp_requires_mask, ORT_NONE, ORT_SIMD, ORT_TARGET, gimplify_omp_ctx::outer_context, POINTER_TYPE_P, ptr_type_node, gimplify_omp_ctx::region_type, hash_map< KeyId, Value, Traits >::remove(), hash_set< KeyId, Lazy, Traits >::remove(), remove_attribute(), gimplify_ctx::save_stack, SET_DECL_VALUE_EXPR, si, size_type_node, sl, SR_NONE, TREE_ADDRESSABLE, TREE_CHAIN, TREE_CODE, tree_cons(), TREE_OPERAND, TREE_PURPOSE, TREE_STATIC, TREE_THIS_NOTRAP, TREE_THIS_VOLATILE, tree_to_uhwi(), TREE_TYPE, TREE_USED, TREE_VALUE, tsi_end_p(), tsi_last(), tsi_link_after(), tsi_link_before(), TSI_SAME_STMT, tsi_start(), TYPE_SIZE_UNIT, unshare_expr(), VAR_P, gimplify_omp_ctx::variables, vec_safe_push(), void_type_node, and voidify_wrapper_expr().

Referenced by gimplify_expr().

◆ gimplify_body()

◆ gimplify_call_expr()

static enum gimplify_status gimplify_call_expr ( tree * expr_p,
gimple_seq * pre_p,
bool want_value )
static
Gimplify the CALL_EXPR node *EXPR_P into the GIMPLE sequence PRE_P.
WANT_VALUE is true if the result of the call is desired.   

References boolean_type_node, build1(), build2(), build3(), build_call_array_loc(), build_call_expr_loc(), build_empty_stmt(), build_omp_clause(), build_zero_cst(), BUILT_IN_NORMAL, builtin_decl_explicit(), CALL_ALLOCA_FOR_VAR_P, CALL_EXPR_ARG, CALL_EXPR_ARGP, call_expr_flags(), CALL_EXPR_FN, CALL_EXPR_IFN, call_expr_nargs, CALL_EXPR_RETURN_SLOT_OPT, CALL_EXPR_STATIC_CHAIN, CALL_EXPR_TAILCALL, CALL_EXPR_VA_ARG_PACK, CALL_FROM_THUNK_P, CASE_BUILT_IN_ALLOCA, cfun, gimplify_omp_ctx::clauses, gimplify_omp_ctx::code, create_tmp_var, DECL_ARGUMENTS, DECL_ATTRIBUTES, DECL_FUNCTION_CODE(), DECL_NAME, DECL_P, DECL_SOURCE_LOCATION, DECL_STATIC_CHAIN, ECF_CONST, ECF_LOOPING_CONST_OR_PURE, ECF_PURE, ECF_RETURNS_TWICE, wi::eq_p(), error(), error_at(), error_mark_node, EXPR_HAS_LOCATION, EXPR_LOCATION, EXPR_P, fb_rvalue, fndecl_built_in_p(), fold_builtin_next_arg(), fold_call_expr(), g, gcc_assert, gcc_checking_assert, get_callee_fndecl(), gimple_boolify(), gimple_build_assume(), gimple_build_call(), gimple_build_call_from_tree(), gimple_build_call_internal_vec(), gimple_call_return_type(), gimple_call_set_lhs(), gimple_call_set_nothrow(), gimple_set_location(), gimplify_and_return_first(), gimplify_arg(), gimplify_ctxp, gimplify_expr(), gimplify_omp_ctxp, gimplify_seq_add_stmt(), GS_ALL_DONE, GS_ERROR, GS_OK, gsi_last(), i, gimplify_omp_ctx::in_call_args, inform(), input_location, integer_zerop(), is_gimple_call_addr(), gimplify_ctx::keep_stack, gimplify_omp_ctx::location, lookup_attribute(), maybe_fold_stmt(), notice_special_calls(), NULL, NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_DEVICE, OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_HAS_DEVICE_ADDR, OMP_CLAUSE_INTEROP, OMP_CLAUSE_IS_DEVICE_PTR, OMP_CLAUSE_LOCATION, omp_find_clause(), omp_resolve_declare_variant(), pop_gimplify_context(), PROP_gimple_any, PUSH_ARGS_REVERSED, push_gimplify_context(), gimplify_ctx::save_stack, seen_error(), SET_EXPR_LOCATION, simple_condition_p(), sorry_at(), wi::to_wide(), TREE_CHAIN, TREE_CODE, TREE_NOTHROW, TREE_OPERAND, TREE_PURPOSE, TREE_SIDE_EFFECTS, tree_strip_nop_conversions(), TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, VAR_P, void_node, void_type_node, VOID_TYPE_P, and warning_at().

Referenced by gimplify_expr().

◆ gimplify_case_label_expr()

◆ gimplify_cleanup_point_expr()

static enum gimplify_status gimplify_cleanup_point_expr ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify a CLEANUP_POINT_EXPR.  Currently this works by adding
GIMPLE_WITH_CLEANUP_EXPRs to the prequeue as we encounter cleanups while
gimplifying the body, and converting them to TRY_FINALLY_EXPRs when we
return to this function.

FIXME should we complexify the prequeue handling instead?  Or use flags
for all the cleanups and let the optimizer tighten them up?  The current
code seems pretty fragile; it will break on a cleanup within any
non-conditional nesting.  But any such nesting would be broken, anyway;
we can't write a TRY_FINALLY_EXPR that starts inside a nesting construct
and continues out of it.  We can do that at the RTL level, though, so
having an optimizer to tighten up try/finally regions would be a Good
Thing.   

References gimplify_ctx::conditional_cleanups, gimplify_ctx::conditions, gtry::eval, gimple_build_try(), GIMPLE_TRY_CATCH, GIMPLE_TRY_FINALLY, gimple_wce_cleanup(), gimple_wce_cleanup_eh_only(), gimplify_ctxp, gimplify_seq_add_seq(), gimplify_stmt(), GS_ALL_DONE, GS_OK, gsi_end_p(), gsi_insert_seq_before_without_update(), gsi_next(), gsi_one_before_end_p(), gsi_remove(), GSI_SAME_STMT, gsi_set_stmt(), gsi_split_seq_after(), gsi_start(), gsi_stmt(), gimplify_ctx::in_cleanup_point_expr, NULL, TREE_OPERAND, and voidify_wrapper_expr().

Referenced by gimplify_expr().

◆ gimplify_compound_expr()

static enum gimplify_status gimplify_compound_expr ( tree * expr_p,
gimple_seq * pre_p,
bool want_value )
static
Forward declaration.   
Gimplify an expression sequence.  This function gimplifies each
expression and rewrites the original expression with the last
expression of the sequence in GIMPLE form.

PRE_P points to the list where the side effects for all the
    expressions in the sequence will be emitted.

WANT_VALUE is true when the result of the last COMPOUND_EXPR is used.   

References gimplify_compound_expr(), gimplify_stmt(), GS_ALL_DONE, GS_OK, TREE_CODE, and TREE_OPERAND.

Referenced by gimplify_compound_expr(), gimplify_cond_expr(), gimplify_expr(), and gimplify_modify_expr_rhs().

◆ gimplify_compound_literal_expr()

static enum gimplify_status gimplify_compound_literal_expr ( tree * expr_p,
gimple_seq * pre_p,
bool(* gimple_test_f )(tree),
fallback_t fallback )
static
Gimplify a C99 compound literal expression.  This just means adding
the DECL_EXPR before the current statement and using its anonymous
decl instead.   

References COMPOUND_LITERAL_EXPR_DECL_EXPR, DECL_EXPR_DECL, DECL_INITIAL, DECL_NAME, DECL_SEEN_IN_BIND_EXPR_P, fb_lvalue, gimple_add_tmp_var(), gimplify_and_add(), GS_OK, NULL_TREE, TREE_ADDRESSABLE, TREE_READONLY, and TREE_THIS_VOLATILE.

Referenced by gimplify_expr().

◆ gimplify_compound_lval()

static enum gimplify_status gimplify_compound_lval ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
fallback_t fallback )
static
Gimplify the COMPONENT_REF, ARRAY_REF, REALPART_EXPR or IMAGPART_EXPR
node *EXPR_P.

   compound_lval
           : min_lval '[' val ']'
           | min_lval '.' ID
           | compound_lval '[' val ']'
           | compound_lval '.' ID

This is not part of the original SIMPLE definition, which separates
array and member references, but it seems reasonable to handle them
together.  Also, this way we don't run into problems with union
aliasing; gcc requires that for accesses through a union to alias, the
union reference must be explicit, which was not always the case when we
were splitting up array and member refs.

PRE_P points to the sequence where side effects that must happen before
  *EXPR_P should be stored.

POST_P points to the sequence where side effects that must happen after
  *EXPR_P should be stored.   

References array_ref_element_size(), array_ref_low_bound(), canonicalize_component_ref(), component_ref_field_offset(), DECL_OFFSET_ALIGN, error_operand_p(), EXPR_LOCATION, fb_lvalue, fb_rvalue, fold_indirect_ref_loc(), gcc_assert, gimplify_expr(), gimplify_var_or_parm_decl(), GS_ALL_DONE, GS_ERROR, GS_OK, handled_component_p(), i, is_gimple_min_invariant(), is_gimple_min_lval(), is_gimple_reg(), is_gimple_reg_type(), is_gimple_val(), MIN, NULL_TREE, offset, prepare_gimple_addressable(), recalculate_side_effects(), size_binop_loc(), size_int, STRIP_USELESS_TYPE_CONVERSION, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_ALIGN_UNIT, unshare_expr(), and VAR_P.

Referenced by gimplify_expr().

◆ gimplify_cond_expr()

static enum gimplify_status gimplify_cond_expr ( tree * expr_p,
gimple_seq * pre_p,
fallback_t fallback )
static
Convert the conditional expression pointed to by EXPR_P '(p) ? a : b;'
into

if (p)                  if (p)
  t1 = a;                         a;
else            or      else
  t1 = b;                         b;
t1;

The second form is used when *EXPR_P is of type void.

PRE_P points to the list where side effects that must happen before
  *EXPR_P should be stored.   

References gimplify_ctx::allow_rhs_cond_expr, build2(), build3(), build_fold_addr_expr_loc(), build_pointer_type(), build_simple_mem_ref_loc(), cfun, COND_EXPR_COND, cond_uids, copy_warning(), create_artificial_label(), create_tmp_var, current_function_decl, DECL_CONTEXT, expr, EXPR_HAS_LOCATION, EXPR_LOCATION, fb_lvalue, fb_rvalue, find_goto_label(), g, gcc_assert, generic_expr_could_trap_p(), hash_map< KeyId, Value, Traits >::get(), gimple_associate_condition_with_expr(), gimple_boolify(), gimple_build_cond(), gimple_build_goto(), gimple_build_label(), gimple_cond_get_ops_from_tree(), gimple_pop_condition(), gimple_push_condition(), gimple_seq_add_seq(), gimple_seq_may_fallthru(), gimple_set_do_not_emit_location(), gimple_set_location(), gimplify_compound_expr(), gimplify_ctxp, gimplify_expr(), gimplify_pure_cond_expr(), gimplify_seq_add_stmt(), gimplify_stmt(), GOTO_DESTINATION, GS_ALL_DONE, GS_ERROR, gsi_last(), integer_nonzerop(), integer_zerop(), is_gimple_condexpr_for_cond(), maybe_fold_stmt(), next_cond_uid(), NULL, NULL_TREE, recalculate_side_effects(), rexpr_has_location(), rexpr_location(), shortcut_cond_expr(), STRIP_TYPE_NOPS, TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_SIDE_EFFECTS, TREE_TYPE, UNKNOWN_LOCATION, UNUSED_LABEL_P, void_type_node, and VOID_TYPE_P.

Referenced by gimplify_expr().

◆ gimplify_conversion()

static enum gimplify_status gimplify_conversion ( tree * expr_p)
static
*EXPR_P is a NOP_EXPR or CONVERT_EXPR.  Remove it and/or other conversions
underneath as appropriate.   

References canonicalize_addr_expr(), canonicalize_component_ref(), CONVERT_EXPR_P, EXPR_LOCATION, fold_build1_loc(), gcc_assert, GS_OK, is_gimple_reg_type(), STRIP_SIGN_NOPS, TREE_CODE, TREE_OPERAND, TREE_SET_CODE, tree_ssa_useless_type_conversion(), and TREE_TYPE.

Referenced by gimplify_expr().

◆ gimplify_decl_expr()

◆ gimplify_exit_expr()

static enum gimplify_status gimplify_exit_expr ( tree * expr_p)
static
Gimplify an EXIT_EXPR by converting to a GOTO_EXPR inside a COND_EXPR.
This also involves building a label to jump to and communicating it to
gimplify_loop_expr through gimplify_ctxp->exit_label.   

References build3(), build_and_jump(), gimplify_ctx::exit_label, expr, gimplify_ctxp, GS_OK, NULL_TREE, TREE_OPERAND, and void_type_node.

Referenced by gimplify_expr().

◆ gimplify_expr() [1/2]

static enum gimplify_status gimplify_expr ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
bool(* gimple_test_f )(tree),
fallback_t fallback,
bool allow_ssa )
static

◆ gimplify_expr() [2/2]

enum gimplify_status gimplify_expr ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
bool(* gimple_test_f )(tree),
fallback_t fallback )
Convert the GENERIC expression tree *EXPR_P to GIMPLE.  If the
expression produces a value to be used as an operand inside a GIMPLE
statement, the value will be stored back in *EXPR_P.  This value will
be a tree of class tcc_declaration, tcc_constant, tcc_reference or
an SSA_NAME.  The corresponding sequence of GIMPLE statements is
emitted in PRE_P and POST_P.

Additionally, this process may overwrite parts of the input
expression during gimplification.  Ideally, it should be
possible to do non-destructive gimplification.

EXPR_P points to the GENERIC expression to convert to GIMPLE.  If
   the expression needs to evaluate to a value to be used as
   an operand in a GIMPLE statement, this value will be stored in
   *EXPR_P on exit.  This happens when the caller specifies one
   of fb_lvalue or fb_rvalue fallback flags.

PRE_P will contain the sequence of GIMPLE statements corresponding
    to the evaluation of EXPR and all the side-effects that must
    be executed before the main expression.  On exit, the last
    statement of PRE_P is the core statement being gimplified.  For
    instance, when gimplifying 'if (++a)' the last statement in
    PRE_P will be 'if (t.1)' where t.1 is the result of
    pre-incrementing 'a'.

POST_P will contain the sequence of GIMPLE statements corresponding
    to the evaluation of all the side-effects that must be executed
    after the main expression.  If this is NULL, the post
    side-effects are stored at the end of PRE_P.

    The reason why the output is split in two is to handle post
    side-effects explicitly.  In some cases, an expression may have
    inner and outer post side-effects which need to be emitted in
    an order different from the one given by the recursive
    traversal.  For instance, for the expression (*p--)++ the post
    side-effects of '--' must actually occur *after* the post
    side-effects of '++'.  However, gimplification will first visit
    the inner expression, so if a separate POST sequence was not
    used, the resulting sequence would be:

            1   t.1 = *p
            2   p = p - 1
            3   t.2 = t.1 + 1
            4   *p = t.2

    However, the post-decrement operation in line #2 must not be
    evaluated until after the store to *p at line #4, so the
    correct sequence should be:

            1   t.1 = *p
            2   t.2 = t.1 + 1
            3   *p = t.2
            4   p = p - 1

    So, by specifying a separate post queue, it is possible
    to emit the post side-effects in the correct order.
    If POST_P is NULL, an internal queue will be used.  Before
    returning to the caller, the sequence POST_P is appended to
    the main output sequence PRE_P.

GIMPLE_TEST_F points to a function that takes a tree T and
    returns nonzero if T is in the GIMPLE form requested by the
    caller.  The GIMPLE predicates are in gimple.cc.

FALLBACK tells the function what sort of a temporary we want if
    gimplification cannot produce an expression that complies with
    GIMPLE_TEST_F.

    fb_none means that no temporary should be generated
    fb_rvalue means that an rvalue is OK to generate
    fb_lvalue means that an lvalue is OK to generate
    fb_either means that either is OK, but an lvalue is preferable.
    fb_mayfail means that gimplification may fail (in which case
    GS_ERROR will be returned)

The return value is either GS_ERROR or GS_ALL_DONE, since this
function iterates until EXPR is completely gimplified or an error
occurs.   

References AGGREGATE_TYPE_P, gimplify_ctx::allow_rhs_cond_expr, annotate_all_with_location(), annotate_all_with_location_after(), append_to_statement_list(), asan_poison_variables(), asan_poisoned_variables, asan_used_labels, boolean_false_node, boolean_true_node, build1_loc(), build2(), build2_loc(), build3_loc(), build_aligned_type(), build_fold_addr_expr_loc(), build_int_cst(), build_zero_cst(), builtin_decl_explicit(), CASE_CONVERT, CATCH_BODY, CATCH_TYPES, cfun, gimplify_omp_ctx::code, COMPLETE_TYPE_P, CONSTRUCTOR_ELTS, hash_set< KeyId, Lazy, Traits >::contains(), copy_warning(), create_tmp_var, create_tmp_var_raw(), current_function_decl, debug_tree(), decl_function_context(), DECL_INITIAL, drop_tree_overflow(), EH_FILTER_FAILURE, EH_FILTER_TYPES, error_mark_node, error_operand_p(), EXPR_HAS_LOCATION, EXPR_LOCATION, failure, fb_either, fb_lvalue, fb_mayfail, fb_none, fb_rvalue, fold_binary, fold_build2_loc(), fold_convert_loc(), fold_indirect_ref_loc(), FOR_EACH_CONSTRUCTOR_VALUE, FORCED_LABEL, g, gcc_assert, gcc_unreachable, get_formal_tmp_var(), get_initialized_tmp_var(), get_object_alignment(), gimple_add_tmp_var(), gimple_boolify(), gimple_build_call(), gimple_build_call_internal(), gimple_build_catch(), gimple_build_debug_begin_stmt(), gimple_build_eh_else(), gimple_build_eh_filter(), gimple_build_goto(), gimple_build_omp_critical(), gimple_build_omp_masked(), gimple_build_omp_master(), gimple_build_omp_scan(), gimple_build_omp_section(), gimple_build_omp_structured_block(), gimple_build_omp_taskgroup(), gimple_build_predict(), gimple_build_try(), gimple_call_set_lhs(), gimple_in_ssa_p(), gimple_omp_ordered_standalone(), gimple_seq_add_seq(), gimple_seq_add_stmt(), gimple_seq_empty_p(), gimple_set_location(), GIMPLE_TRY_CATCH, GIMPLE_TRY_FINALLY, gimple_try_set_catch_is_cleanup(), gimplify_addr_expr(), gimplify_adjust_omp_clauses(), gimplify_and_add(), gimplify_arg(), gimplify_asm_expr(), gimplify_assign(), gimplify_bind_expr(), gimplify_call_expr(), gimplify_case_label_expr(), gimplify_cleanup_point_expr(), gimplify_compound_expr(), gimplify_compound_literal_expr(), gimplify_compound_lval(), gimplify_cond_expr(), gimplify_conversion(), gimplify_ctxp, gimplify_decl_expr(), gimplify_exit_expr(), gimplify_expr(), lang_hooks::gimplify_expr, gimplify_label_expr(), gimplify_loop_expr(), gimplify_modify_expr(), gimplify_oacc_cache(), gimplify_oacc_declare(), gimplify_omp_atomic(), gimplify_omp_ctxp, gimplify_omp_dispatch(), gimplify_omp_for(), gimplify_omp_loop(), gimplify_omp_ordered(), gimplify_omp_parallel(), gimplify_omp_target_update(), gimplify_omp_task(), gimplify_omp_workshare(), gimplify_return_expr(), gimplify_save_expr(), gimplify_scalar_mode_aggregate_compare(), gimplify_scan_omp_clauses(), gimplify_self_mod_expr(), gimplify_seq_add_seq(), gimplify_seq_add_stmt(), gimplify_statement_list(), gimplify_switch_expr(), gimplify_target_expr(), gimplify_transaction(), gimplify_va_arg_expr(), gimplify_var_or_parm_decl(), gimplify_variable_sized_compare(), GOTO_DESTINATION, GS_ALL_DONE, GS_ERROR, GS_OK, GS_UNHANDLED, gsi_last(), gimplify_ctx::in_handler_expr, in_omp_construct, input_location, INTEGRAL_TYPE_P, internal_error(), gimplify_ctx::into_ssa, IS_EMPTY_STMT, is_empty_type(), is_gimple_addressable(), is_gimple_asm_val(), is_gimple_call_addr(), is_gimple_condexpr_for_cond(), is_gimple_lvalue(), is_gimple_mem_ref_addr(), is_gimple_mem_rhs(), is_gimple_mem_rhs_or_call(), is_gimple_min_lval(), is_gimple_reg(), is_gimple_reg_rhs(), is_gimple_reg_rhs_or_call(), is_gimple_reg_type(), is_gimple_stmt(), is_gimple_val(), LABEL_EXPR_LABEL, gimplify_ctx::live_switch_vars, LOCATION_LOCUS, mark_addressable(), MIN, NULL, NULL_TREE, OBJ_TYPE_REF_EXPR, OBJ_TYPE_REF_OBJECT, OMP_BODY, OMP_CRITICAL_CLAUSES, OMP_CRITICAL_NAME, OMP_MASKED_CLAUSES, omp_notice_variable(), OMP_SCAN_CLAUSES, OMP_TASKGROUP_CLAUSES, ORT_TASKGROUP, ORT_WORKSHARE, PREDICT_EXPR_OUTCOME, PREDICT_EXPR_PREDICTOR, print_generic_expr(), recalculate_side_effects(), REF_REVERSE_STORAGE_ORDER, reference_alias_ptr_type(), gimplify_ctx::return_temp, save_expr(), SCALAR_INT_MODE_P, sorry_at(), STRIP_USELESS_TYPE_CONVERSION, tcc_binary, tcc_comparison, tcc_constant, tcc_declaration, tcc_unary, TMR_BASE, TMR_INDEX, TMR_INDEX2, TREE_BLOCK, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_OVERFLOW_P, TREE_SET_CODE, TREE_SIDE_EFFECTS, TREE_THIS_NOTRAP, TREE_THIS_VOLATILE, TREE_TYPE, TRY_CATCH_IS_CLEANUP, TYPE_ALIGN, TYPE_MAIN_VARIANT, TYPE_MODE, TYPE_PRECISION, UNKNOWN_LOCATION, useless_type_conversion_p(), and VOID_TYPE_P.

◆ gimplify_function_tree()

◆ gimplify_init_constructor()

static enum gimplify_status gimplify_init_constructor ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
bool want_value,
bool notify_temp_creation )
static
A subroutine of gimplify_modify_expr.  Break out elements of a
CONSTRUCTOR used as an initializer into separate MODIFY_EXPRs.

Note that we still need to clear any elements that don't have explicit
initializers, so if not all elements are initialized we keep the
original MODIFY_EXPR, we just remove all of the constructor elements.

If NOTIFY_TEMP_CREATION is true, do not gimplify, just return
GS_ERROR if we would have to create a temporary when gimplifying
this constructor.  Otherwise, return GS_OK.

If NOTIFY_TEMP_CREATION is false, just do the gimplification.   

References AGGREGATE_TYPE_P, build1(), build2(), build_complex(), build_vector_from_ctor(), build_zero_cst(), can_move_by_pieces(), categorize_ctor_elements(), cfun, clear_padding_type_may_have_padding_p(), CONSTANT_CLASS_P, CONSTRUCTOR_ELTS, CONSTRUCTOR_NO_CLEARING, create_tmp_var, create_tmp_var_name(), DECL_ALIGN, DECL_INITIAL, DECL_MERGEABLE, DECL_NAME, DECL_NAMELESS, DECL_P, DECL_REGISTER, fb_lvalue, fb_rvalue, FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_VEC_SAFE_ELT, force_labels_r(), gcc_assert, gcc_unreachable, get_alias_set(), get_base_address(), get_formal_tmp_var(), gimple_add_padding_init_for_auto_var(), gimple_build_assign(), gimplify_expr(), gimplify_init_ctor_eval(), gimplify_init_ctor_preeval(), gimplify_seq_add_stmt(), gimplify_stmt(), GS_ALL_DONE, GS_ERROR, GS_OK, GS_UNHANDLED, i, initializer_constant_valid_p(), int_size_in_bytes(), is_empty_type(), is_gimple_lvalue(), is_gimple_reg(), is_gimple_val(), is_var_need_auto_init(), lhd_set_decl_assembler_name(), gimplify_init_ctor_preeval_data::lhs_alias_set, gimplify_init_ctor_preeval_data::lhs_base_decl, NULL, NULL_TREE, optimize_compound_literals_in_ctor(), optimize_function_for_speed_p(), r, recompute_constructor_flags(), rhs_predicate_for(), TREE_ADDRESSABLE, TREE_CODE, TREE_CONSTANT, TREE_OPERAND, tree_output_constant_def(), TREE_READONLY, TREE_SIDE_EFFECTS, TREE_STATIC, TREE_THIS_VOLATILE, TREE_TYPE, type(), TYPE_ALIGN, TYPE_MAIN_VARIANT, TYPE_MODE, TYPE_NO_FORCE_BLK, unshare_expr(), useless_type_conversion_p(), constructor_elt::value, VAR_P, vec_safe_is_empty(), vec_safe_length(), void_type_node, and walk_tree.

Referenced by gimplify_modify_expr_rhs().

◆ gimplify_init_ctor_eval()

static void gimplify_init_ctor_eval ( tree object,
vec< constructor_elt, va_gc > * elts,
gimple_seq * pre_p,
bool cleared )
static
A subroutine of gimplify_init_ctor_eval.  Create a loop for
a RANGE_EXPR in a CONSTRUCTOR for an array.

   var = lower;
 loop_entry:
   object[var] = value;
   if (var == upper)
     goto loop_exit;
   var = var + 1;
   goto loop_entry;
 loop_exit:

We increment var _after_ the loop exit check because we might otherwise
fail if upper == TYPE_MAX_VALUE (type for upper).

Note that we never have to deal with SAVE_EXPRs here, because this has
already been taken care of for us, in gimplify_init_ctor_preeval().   
A subroutine of gimplify_init_constructor.  Generate individual
MODIFY_EXPRs for a CONSTRUCTOR.  OBJECT is the LHS against which the
assignments should happen.  ELTS is the CONSTRUCTOR_ELTS of the
CONSTRUCTOR.  CLEARED is true if the entire LHS object has been
zeroed first.   

References bitsize_zero_node, build1(), build2(), build3(), build4(), build_array_type_nelts(), build_constructor_single(), build_fold_addr_expr, build_int_cst(), CONSTRUCTOR_ELTS, fb_lvalue, fold_build2, fold_convert, FOR_EACH_CONSTRUCTOR_ELT, gcc_assert, ggc_free(), gimple_build_assign(), gimplify_and_add(), gimplify_expr(), gimplify_init_ctor_eval(), gimplify_init_ctor_eval_range(), gimplify_seq_add_stmt(), GS_ERROR, i, initializer_zerop(), is_empty_type(), is_gimple_lvalue(), lower(), NULL, NULL_TREE, ptr_type_node, RAW_DATA_LENGTH, RAW_DATA_POINTER, RAW_DATA_UCHAR_ELT, simple_cst_equal(), TREE_CODE, TREE_OPERAND, tree_output_constant_def(), TREE_SIDE_EFFECTS, TREE_TYPE, TYPE_DOMAIN, TYPE_MAIN_VARIANT, unshare_expr(), and useless_type_conversion_p().

Referenced by gimplify_init_constructor(), gimplify_init_ctor_eval(), and gimplify_init_ctor_eval_range().

◆ gimplify_init_ctor_eval_range()

◆ gimplify_init_ctor_preeval()

static void gimplify_init_ctor_preeval ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
struct gimplify_init_ctor_preeval_data * data )
static

◆ gimplify_init_ctor_preeval_1()

static tree gimplify_init_ctor_preeval_1 ( tree * tp,
int * walk_subtrees,
void * xdata )
static

◆ gimplify_label_expr()

◆ gimplify_loop_expr()

static enum gimplify_status gimplify_loop_expr ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify a LOOP_EXPR.  Normally this just involves gimplifying the body
and replacing the LOOP_EXPR with goto, but if the loop contains an
EXIT_EXPR, we need to append a label for it to jump to.   

References create_artificial_label(), gimplify_ctx::exit_label, gimple_build_goto(), gimple_build_label(), gimplify_and_add(), gimplify_ctxp, gimplify_seq_add_stmt(), GS_ALL_DONE, LOOP_EXPR_BODY, NULL, NULL_TREE, and UNKNOWN_LOCATION.

Referenced by gimplify_expr().

◆ gimplify_modify_expr()

static enum gimplify_status gimplify_modify_expr ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
bool want_value )
static
Gimplify the MODIFY_EXPR node pointed to by EXPR_P.

  modify_expr
          : varname '=' rhs
          | '*' ID '=' rhs

PRE_P points to the list where side effects that must happen before
    *EXPR_P should be stored.

POST_P points to the list where side effects that must happen after
    *EXPR_P should be stored.

WANT_VALUE is nonzero iff we want to use the value of this expression
    in another expression.   

References ADDR_SPACE_GENERIC_P, ap, build_call_expr_internal_loc(), build_fold_addr_expr, build_simple_mem_ref_loc(), CALL_EXPR_ARG, call_expr_flags(), CALL_EXPR_FN, CALL_EXPR_IFN, call_expr_nargs, cfun, COMPARISON_CLASS_P, CONSTRUCTOR_NELTS, copy_warning(), create_tmp_var_name(), current_function_decl, decl_function_context(), DECL_HAS_DEBUG_EXPR_P, DECL_IGNORED_P, DECL_NAME, DECL_P, ECF_RETURNS_TWICE, error_mark_node, error_operand_p(), EXPR_LOCATION, fb_lvalue, fb_rvalue, fndecl_built_in_p(), fold_convert_loc(), gcc_assert, get_callee_fndecl(), get_initialized_tmp_var(), gimple_build_assign(), gimple_build_call_from_tree(), gimple_build_call_internal(), gimple_build_call_internal_vec(), gimple_build_nop(), gimple_call_noreturn_p(), gimple_call_set_lhs(), gimple_call_set_nothrow(), gimple_in_ssa_p(), gimple_set_location(), gimplify_arg(), gimplify_ctxp, gimplify_expr(), gimplify_modify_expr_complex_part(), gimplify_modify_expr_rhs(), gimplify_modify_expr_to_memcpy(), gimplify_modify_expr_to_memset(), gimplify_seq_add_stmt(), gimplify_stmt(), GS_ALL_DONE, GS_ERROR, GS_OK, GS_UNHANDLED, gsi_last(), i, IDENTIFIER_POINTER, initial_rhs_predicate_for(), gimplify_ctx::into_ssa, is_empty_type(), is_gimple_addressable(), is_gimple_lvalue(), is_gimple_reg(), maybe_fold_stmt(), maybe_with_size_expr(), notice_special_calls(), NULL, NULL_TREE, POINTER_TYPE_P, poly_int_tree_p(), rhs_predicate_for(), SET_DECL_DEBUG_EXPR, should_remove_lhs_p(), SSA_NAME_DEF_STMT, STRIP_USELESS_TYPE_CONVERSION, TREE_ADDRESSABLE, TREE_CLOBBER_P, TREE_CODE, TREE_NOTHROW, TREE_OPERAND, TREE_THIS_VOLATILE, TREE_TYPE, TYPE_ADDR_SPACE, TYPE_SIZE_UNIT, unshare_expr(), useless_type_conversion_p(), and VAR_P.

Referenced by gimplify_expr().

◆ gimplify_modify_expr_complex_part()

static enum gimplify_status gimplify_modify_expr_complex_part ( tree * expr_p,
gimple_seq * pre_p,
bool want_value )
static
Promote partial stores to COMPLEX variables to total stores.  *EXPR_P is
a MODIFY_EXPR with a lhs of a REAL/IMAGPART_EXPR of a gimple register.

IMPORTANT NOTE: This promotion is performed by introducing a load of the
other, unmodified part of the complex object just before the total store.
As a consequence, if the object is still uninitialized, an undefined value
will be loaded into a register, which may result in a spurious exception
if the register is floating-point and the value happens to be a signaling
NaN for example.  Then the fully-fledged complex operations lowering pass
followed by a DCE pass are necessary in order to fix things up.   

References build1(), build2(), build_complex(), get_formal_tmp_var(), gimple_build_assign(), gimplify_seq_add_stmt(), GS_ALL_DONE, NULL_TREE, suppress_warning(), TREE_CODE, TREE_CONSTANT, TREE_OPERAND, and TREE_TYPE.

Referenced by gimplify_modify_expr().

◆ gimplify_modify_expr_rhs()

◆ gimplify_modify_expr_to_memcpy()

◆ gimplify_modify_expr_to_memset()

static enum gimplify_status gimplify_modify_expr_to_memset ( tree * expr_p,
tree size,
bool want_value,
gimple_seq * seq_p )
static
A subroutine of gimplify_modify_expr.  Replace a MODIFY_EXPR with
a call to __builtin_memset.  In this case we know that the RHS is
a CONSTRUCTOR with an empty element list.   

References ADDR_SPACE_GENERIC_P, build1(), build_fold_addr_expr_loc(), builtin_decl_implicit(), CONSTRUCTOR_ELTS, create_tmp_var, EXPR_LOCATION, gcc_assert, gimple_build_call(), gimple_call_set_lhs(), gimplify_arg(), gimplify_seq_add_stmt(), GS_ALL_DONE, integer_zero_node, NULL, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_ADDR_SPACE, and vec_safe_is_empty().

Referenced by gimplify_modify_expr().

◆ gimplify_oacc_cache()

static void gimplify_oacc_cache ( tree * expr_p,
gimple_seq * pre_p )
static

◆ gimplify_oacc_declare()

◆ gimplify_oacc_declare_1()

static tree gimplify_oacc_declare_1 ( tree clause)
static
Helper function of gimplify_oacc_declare.  The helper's purpose is to,
if required, translate 'kind' in CLAUSE into an 'entry' kind and 'exit'
kind.  The entry kind will replace the one in CLAUSE, while the exit
kind will be used in a new omp_clause and returned to the caller.   

References build_omp_clause(), gcc_unreachable, NULL, OMP_CLAUSE_DECL, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_KIND, and OMP_CLAUSE_SET_MAP_KIND.

Referenced by gimplify_oacc_declare().

◆ gimplify_omp_affinity()

◆ gimplify_omp_atomic()

◆ gimplify_omp_depend()

static int gimplify_omp_depend ( tree * list_p,
gimple_seq * pre_p )
static
If *LIST_P contains any OpenMP depend clauses with iterators,
lower all the depend clauses by populating corresponding depend
array.  Returns 0 if there are no such depend clauses, or
2 if all depend clauses should be removed, 1 otherwise.   

References append_to_statement_list(), append_to_statement_list_force(), begin(), BIND_EXPR_BODY, BLOCK_VARS, boolean_false_node, boolean_type_node, build1(), build2(), build2_loc(), build3(), build3_loc(), build4(), build_and_jump(), build_array_type(), build_call_expr_loc(), build_fold_addr_expr, build_fold_addr_expr_with_type, build_index_type(), build_int_cst(), build_omp_clause(), builtin_decl_explicit(), create_artificial_label(), create_tmp_var, create_tmp_var_raw(), DECL_SOURCE_LOCATION, end(), error_operand_p(), fb_rvalue, fold_build1_loc(), fold_build2_loc(), fold_build3_loc(), fold_convert, fold_convert_loc(), g, gcc_unreachable, gimple_add_tmp_var(), gimple_build_assign(), gimple_seq_add_stmt(), gimplify_and_add(), gimplify_expr(), gimplify_omp_ctxp, gimplify_type_sizes(), gimplify_vla_decl(), GOVD_LOCAL, GOVD_SEEN, GS_ERROR, i, is_gimple_val(), NULL, null_pointer_node, NULL_TREE, omp_add_variable(), OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_DEPEND, OMP_CLAUSE_DEPEND_DEPOBJ, OMP_CLAUSE_DEPEND_IN, OMP_CLAUSE_DEPEND_INOUT, OMP_CLAUSE_DEPEND_INOUTSET, OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_DEPEND_LAST, OMP_CLAUSE_DEPEND_MUTEXINOUTSET, OMP_CLAUSE_DEPEND_OUT, OMP_CLAUSE_LOCATION, ORT_ACC, ORT_SIMD, ORT_TASKGROUP, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, POINTER_TYPE_P, poly_int_tree_p(), ptr_type_node, r, gimplify_omp_ctx::region_type, SET_EXPR_LOCATION, size_binop, size_binop_loc(), size_int, size_one_node, size_zero_node, sizetype, TREE_ADDRESSABLE, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_PURPOSE, TREE_SIDE_EFFECTS, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TYPE_SIZES_GIMPLIFIED, TYPE_UNSIGNED, UNKNOWN_LOCATION, unshare_expr(), void_node, and void_type_node.

Referenced by gimplify_scan_omp_clauses().

◆ gimplify_omp_dispatch()

static enum gimplify_status gimplify_omp_dispatch ( tree * expr_p,
gimple_seq * pre_p )
static

◆ gimplify_omp_for()

static enum gimplify_status gimplify_omp_for ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify the gross structure of an OMP_FOR statement.   

References hash_set< KeyId, Lazy, Traits >::add(), append_to_statement_list_force(), BIND_EXPR_BODY, BITMAP_ALLOC, bitmap_bit_p, BITMAP_FREE, bitmap_set_bit, build2(), build3(), build_array_type_nelts(), build_int_cst(), build_omp_clause(), gimplify_omp_ctx::combined_loop, COMPARISON_CLASS_P, hash_set< KeyId, Lazy, Traits >::contains(), copy_node(), create_tmp_var, create_tmp_var_raw(), DECL_EXPR_DECL, DECL_P, DECL_THREAD_LOCAL_P, DECL_UID, lang_hooks::decls, gimplify_omp_ctx::distribute, error_at(), EXPR_LOCATION, fb_rvalue, find_combined_omp_for(), find_standalone_omp_ordered(), fold_build1, fold_convert, g, gcc_assert, gcc_unreachable, get_name(), GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_KIND_FOR, GF_OMP_FOR_KIND_OACC_LOOP, GF_OMP_FOR_KIND_SIMD, GF_OMP_FOR_KIND_TASKLOOP, gimple_build_assign(), gimple_build_bind(), gimple_build_omp_for(), gimple_build_omp_task(), gimple_omp_for_clauses(), gimple_omp_for_clauses_ptr(), gimple_omp_for_collapse(), gimple_omp_for_cond(), gimple_omp_for_final(), gimple_omp_for_incr(), gimple_omp_for_index(), gimple_omp_for_initial(), gimple_omp_for_pre_body(), gimple_omp_for_set_clauses(), gimple_omp_for_set_combined_into_p(), gimple_omp_for_set_combined_p(), gimple_omp_for_set_cond(), gimple_omp_for_set_final(), gimple_omp_for_set_incr(), gimple_omp_for_set_index(), gimple_omp_for_set_initial(), gimple_omp_for_set_pre_body(), gimple_omp_task_set_taskloop_p(), gimple_seq_empty_p(), gimple_set_location(), gimplify_adjust_omp_clauses(), gimplify_and_add(), gimplify_and_return_first(), gimplify_assign(), gimplify_ctxp, gimplify_expr(), gimplify_omp_ctxp, gimplify_omp_loop_xform(), gimplify_omp_taskloop_expr(), gimplify_scan_omp_clauses(), gimplify_seq_add_seq(), gimplify_seq_add_stmt(), GOVD_CONDTEMP, GOVD_DATA_SHARE_CLASS, GOVD_EXPLICIT, GOVD_LASTPRIVATE, GOVD_LASTPRIVATE_CONDITIONAL, GOVD_LINEAR, GOVD_LINEAR_LASTPRIVATE_NO_OUTER, GOVD_LOCAL, GOVD_PRIVATE, GOVD_SEEN, GS_ALL_DONE, GS_ERROR, GS_OK, i, gimplify_omp_ctx::in_for_exprs, input_location, INTEGRAL_TYPE_P, is_gimple_reg(), is_gimple_val(), is_global_var(), omp_for_data::iter_type, lang_GNU_Fortran(), last, omp_for_data::lastprivate_conditional, list_length(), gimplify_omp_ctx::loop_iter_var, make_node(), MIN, NULL, NULL_TREE, omp_add_variable(), OMP_BODY, OMP_CLAUSE__CONDTEMP_, OMP_CLAUSE_ALLOCATE, OMP_CLAUSE_ALLOCATE_ALLOCATOR, OMP_CLAUSE_BIND, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_COLLAPSE_EXPR, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_FINAL, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE, OMP_CLAUSE_GRAINSIZE, OMP_CLAUSE_IF, OMP_CLAUSE_IN_REDUCTION, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_CONDITIONAL, OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ, OMP_CLAUSE_LASTPRIVATE_LOOP_IV, OMP_CLAUSE_LINEAR, OMP_CLAUSE_LINEAR_GIMPLE_SEQ, OMP_CLAUSE_LINEAR_NO_COPYIN, OMP_CLAUSE_LINEAR_NO_COPYOUT, OMP_CLAUSE_LINEAR_STEP, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_NOGROUP, OMP_CLAUSE_NUM_TASKS, OMP_CLAUSE_ORDERED, OMP_CLAUSE_ORDERED_DOACROSS, OMP_CLAUSE_PRIORITY, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_PRIVATE_TASKLOOP_IV, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SHARED, OMP_CLAUSE_SHARED_FIRSTPRIVATE, OMP_CLAUSE_TILE, OMP_CLAUSE_TILE_LIST, OMP_CLAUSE_UNTIED, omp_extract_for_data(), omp_find_clause(), lang_hooks_for_decls::omp_finish_clause, OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_COND, OMP_FOR_INCR, OMP_FOR_INIT, OMP_FOR_NON_RECTANGULAR, OMP_FOR_ORIG_DECLS, OMP_FOR_PRE_BODY, omp_is_private(), omp_lastprivate_for_combined_outer_constructs(), omp_maybe_apply_loop_xforms(), omp_notice_variable(), OMP_PARALLEL_CLAUSES, ORT_ACC, ORT_COMBINED_PARALLEL, ORT_NONE, ORT_PARALLEL, ORT_SIMD, ORT_TARGET_DATA, ORT_TASKGROUP, ORT_TASKLOOP, ORT_UNTIED_TASKLOOP, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, POINTER_TYPE_P, pop_gimplify_context(), push_gimplify_context(), gimplify_omp_ctx::region_type, seen_error(), si, sizetype, gimplify_ctx::temps, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_PRIVATE, TREE_PURPOSE, TREE_SIDE_EFFECTS, tree_to_shwi(), TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, tsi_end_p(), tsi_next(), tsi_start(), tsi_stmt(), tsi_stmt_ptr(), UNKNOWN_LOCATION, unshare_expr(), unsigned_type_for(), splay_tree_node< T >::value(), VAR_P, gimplify_omp_ctx::variables, void_type_node, walk_tree, walk_tree_without_duplicates, and warning_at().

Referenced by gimplify_expr().

◆ gimplify_omp_loop()

static enum gimplify_status gimplify_omp_loop ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify the gross structure of an OMP_LOOP statement.   

References append_to_statement_list(), BIND_EXPR_BODY, build3(), build_omp_clause(), CB_CGE_DUPLICATE, cfun, gimplify_omp_ctx::clauses, copy_decl_no_change(), copy_node(), copy_tree_body_r(), current_function_decl, DECL_CONTEXT, lang_hooks::decls, error_at(), EXPR_LOCATION, fb_none, omp_for_data::for_stmt, gcc_assert, gcc_unreachable, hash_map< KeyId, Value, Traits >::get(), gimplify_expr(), gimplify_omp_ctxp, GS_OK, i, in_omp_construct, is_gimple_stmt(), lang_GNU_Fortran(), last, make_node(), note_no_context_vars(), NULL, NULL_TREE, OMP_CLAUSE_BIND, OMP_CLAUSE_BIND_KIND, OMP_CLAUSE_BIND_PARALLEL, OMP_CLAUSE_BIND_TEAMS, OMP_CLAUSE_BIND_THREAD, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_DECL, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE_LOOP_IV, OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_LOCATION, OMP_CLAUSE_ORDER, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER, OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_INSCAN, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER, OMP_CLAUSE_REDUCTION_TASK, omp_find_clause(), lang_hooks_for_decls::omp_finish_clause, OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_ORIG_DECLS, omp_maybe_apply_loop_xforms(), OMP_PARALLEL_BODY, OMP_PARALLEL_CLAUSES, OMP_PARALLEL_COMBINED, ORT_ACC, ORT_IMPLICIT_TARGET, ORT_NONE, ORT_PARALLEL, ORT_SIMD, ORT_TEAMS, gimplify_omp_ctx::outer_context, hash_map< KeyId, Value, Traits >::put(), gimplify_omp_ctx::region_type, SET_EXPR_LOCATION, TREE_CODE, TREE_OPERAND, TREE_PURPOSE, TREE_SET_CODE, TREE_TYPE, TREE_VALUE, TREE_VEC_ELT, TREE_VEC_LENGTH, UNKNOWN_LOCATION, unshare_expr(), void_type_node, walk_tree, and walk_tree_without_duplicates.

Referenced by gimplify_expr().

◆ gimplify_omp_loop_xform()

◆ gimplify_omp_ordered()

static gimple * gimplify_omp_ordered ( tree expr,
gimple_seq body )
static
Gimplify an OMP_ORDERED construct.  EXPR is the tree version.  BODY
is the OMP_BODY of the original EXPR (which has already been
gimplified so it's not present in the EXPR).

Return the gimplified GIMPLE_OMP_ORDERED tuple.   

References decls, error_at(), gimple_build_nop(), gimple_build_omp_ordered(), gimplify_omp_ctxp, i, gimplify_omp_ctx::loop_iter_var, NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_DOACROSS, OMP_CLAUSE_DOACROSS_DEPEND, OMP_CLAUSE_DOACROSS_KIND, OMP_CLAUSE_DOACROSS_SINK, OMP_CLAUSE_DOACROSS_SOURCE, OMP_CLAUSE_LOCATION, OMP_ORDERED_CLAUSES, TREE_CHAIN, TREE_CODE, and TREE_VALUE.

Referenced by gimplify_expr().

◆ gimplify_omp_parallel()

static void gimplify_omp_parallel ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify the contents of an OMP_PARALLEL statement.  This involves
gimplification of the body, as well as scanning the body for used
variables.  We need to do this scan now, because variable-sized
decls will be decomposed during gimplification.   

References g, GF_OMP_PARALLEL_COMBINED, gimple_build_omp_parallel(), gimple_omp_set_subcode(), gimplify_adjust_omp_clauses(), gimplify_and_return_first(), gimplify_scan_omp_clauses(), gimplify_seq_add_stmt(), NULL, NULL_TREE, OMP_PARALLEL_BODY, OMP_PARALLEL_CLAUSES, OMP_PARALLEL_COMBINED, ORT_COMBINED_PARALLEL, ORT_PARALLEL, pop_gimplify_context(), and push_gimplify_context().

Referenced by gimplify_expr().

◆ gimplify_omp_target_update()

◆ gimplify_omp_task()

static void gimplify_omp_task ( tree * expr_p,
gimple_seq * pre_p )
static

◆ gimplify_omp_taskloop_expr()

static void gimplify_omp_taskloop_expr ( tree type,
tree * tp,
gimple_seq * pre_p,
tree orig_for_stmt )
static
Helper function for gimplify_omp_for.  If *TP is not a gimple constant,
force it into a temporary initialized in PRE_P and add firstprivate clause
to ORIG_FOR_STMT.   

References build2(), build_omp_clause(), create_tmp_var, get_initialized_tmp_var(), gimplify_and_add(), gimplify_save_expr(), input_location, is_gimple_constant(), NULL, OMP_CLAUSE_CHAIN, OMP_CLAUSE_DECL, OMP_CLAUSE_FIRSTPRIVATE, OMP_FOR_CLAUSES, TREE_CODE, TREE_TYPE, and TYPE_MAIN_VARIANT.

Referenced by gimplify_omp_for().

◆ gimplify_omp_workshare()

◆ gimplify_one_sizepos()

void gimplify_one_sizepos ( tree * expr_p,
gimple_seq * stmt_p )
A subroutine of gimplify_type_sizes to make sure that *EXPR_P,
a size or position, has had all of its SAVE_EXPRs evaluated.
We add any required statements to *STMT_P.   

References CONTAINS_PLACEHOLDER_P, fb_rvalue, get_initialized_tmp_var(), gimplify_expr(), is_gimple_constant(), is_gimple_val(), NULL, NULL_TREE, unshare_expr(), and VAR_P.

Referenced by gimplify_parameters(), gimplify_return_expr(), gimplify_type_sizes(), and gimplify_vla_decl().

◆ gimplify_pure_cond_expr()

static enum gimplify_status gimplify_pure_cond_expr ( tree * expr_p,
gimple_seq * pre_p )
static
Given a conditional expression *EXPR_P without side effects, gimplify
its operands.  New statements are inserted to PRE_P.   

References gimplify_omp_ctx::code, COND_EXPR_COND, COND_EXPR_ELSE, COND_EXPR_THEN, fb_rvalue, gimple_boolify(), gimplify_expr(), is_gimple_val(), MIN, NULL, TREE_CODE, and TREE_SET_CODE.

Referenced by gimplify_cond_expr().

◆ gimplify_return_expr()

static enum gimplify_status gimplify_return_expr ( tree stmt,
gimple_seq * pre_p )
static
Gimplify a RETURN_EXPR.  If the expression to be returned is not a
GIMPLE value, it is assigned to a new temporary and the statement is
re-written to return the temporary.

PRE_P points to the sequence where side effects that must happen before
STMT should be stored.   

References aggregate_value_p(), copy_warning(), create_tmp_reg(), current_function_decl, DECL_RESULT, DECL_SIZE, DECL_SIZE_UNIT, error_mark_node, gcc_assert, gimple_build_return(), gimplify_and_add(), gimplify_ctxp, gimplify_one_sizepos(), gimplify_seq_add_stmt(), gimplify_type_sizes(), GS_ALL_DONE, GS_ERROR, INDIRECT_REF_P, maybe_add_early_return_predict_stmt(), NULL_TREE, poly_int_tree_p(), gimplify_ctx::return_temp, suppress_warning(), TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_SIZES_GIMPLIFIED, and VOID_TYPE_P.

Referenced by gimplify_expr().

◆ gimplify_save_expr()

static enum gimplify_status gimplify_save_expr ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p )
static
Gimplify a SAVE_EXPR node.  EXPR_P points to the expression to
gimplify.  After gimplification, EXPR_P will point to a new temporary
that holds the original value of the SAVE_EXPR node.

PRE_P points to the list where side effects that must happen before
*EXPR_P should be stored.   

References cfun, error_mark_node, fb_none, gcc_assert, get_initialized_tmp_var(), gimple_in_ssa_p(), gimplify_expr(), GS_ALL_DONE, GS_ERROR, is_gimple_stmt(), NULL, SAVE_EXPR_RESOLVED_P, TREE_CODE, TREE_OPERAND, TREE_TYPE, and void_type_node.

Referenced by gimplify_expr(), and gimplify_omp_taskloop_expr().

◆ gimplify_scalar_mode_aggregate_compare()

static enum gimplify_status gimplify_scalar_mode_aggregate_compare ( tree * expr_p)
static
Gimplify a comparison between two aggregate objects of integral scalar
mode as a comparison between the bitwise equivalent scalar values.   

References build_call_expr_loc(), builtin_decl_implicit(), EXPR_LOCATION, fold_build1_loc(), fold_build2_loc(), gcc_assert, gcc_unreachable, GS_OK, int_size_in_bytes(), NULL_TREE, TREE_CODE, TREE_OPERAND, TREE_TYPE, lang_hooks_for_types::type_for_mode, TYPE_MODE, and lang_hooks::types.

Referenced by gimplify_expr().

◆ gimplify_scan_omp_clauses()

static void gimplify_scan_omp_clauses ( tree * list_p,
gimple_seq * pre_p,
enum omp_region_type region_type,
enum tree_code code )
static
Scan the OMP clauses in *LIST_P, installing mappings into a new
and previous omp contexts.   

References array_ref_element_size(), array_ref_low_bound(), BIND_EXPR_BODY, build3(), build_fold_addr_expr, gimplify_omp_ctx::clauses, gimplify_omp_ctx::code, gimplify_omp_ctx::combined_loop, component_ref_field_offset(), DECL_HAS_VALUE_EXPR_P, DECL_NAME, DECL_OFFSET_ALIGN, DECL_P, DECL_SIZE_UNIT, DECL_THREAD_LOCAL_P, DECL_VALUE_EXPR, lang_hooks::decls, gimplify_omp_ctx::default_kind, gimplify_omp_ctx::defaultmap, deps, gimplify_omp_ctx::distribute, do_add(), wi::eq_p(), error(), error_at(), error_operand_p(), fb_lvalue, fb_rvalue, find_decl_expr(), gcc_assert, gcc_unreachable, GDMK_AGGREGATE, GDMK_ALLOCATABLE, GDMK_POINTER, GDMK_SCALAR, GDMK_SCALAR_TARGET, get_base_address(), get_initialized_tmp_var(), gimple_boolify(), gimple_seq_first_stmt(), gimplify_and_add(), gimplify_ctxp, gimplify_expr(), gimplify_omp_affinity(), gimplify_omp_ctxp, gimplify_omp_depend(), GOVD_ALIGNED, GOVD_DATA_SHARE_CLASS, GOVD_EXPLICIT, GOVD_FIRSTPRIVATE, GOVD_FIRSTPRIVATE_IMPLICIT, GOVD_LASTPRIVATE, GOVD_LASTPRIVATE_CONDITIONAL, GOVD_LINEAR, GOVD_LINEAR_LASTPRIVATE_NO_OUTER, GOVD_LOCAL, GOVD_MAP, GOVD_MAP_0LEN_ARRAY, GOVD_MAP_ALLOC_ONLY, GOVD_MAP_ALWAYS_TO, GOVD_MAP_FORCE_PRESENT, GOVD_MAP_FROM_ONLY, GOVD_MAP_TO_ONLY, GOVD_NONTEMPORAL, GOVD_PRIVATE, GOVD_PRIVATE_OUTER_REF, GOVD_REDUCTION, GOVD_REDUCTION_INSCAN, GOVD_SEEN, GOVD_SHARED, GS_ERROR, handled_component_p(), gimplify_omp_ctx::has_depend, i, gimplify_ctx::into_ssa, is_gimple_lvalue(), is_gimple_min_invariant(), is_gimple_reg(), is_gimple_val(), is_global_var(), lang_GNU_Fortran(), new_omp_context(), NULL, null_pointer_node, NULL_TREE, offset, omp_add_variable(), omp_check_private(), OMP_CLAUSE__CACHE_, OMP_CLAUSE_AFFINITY, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_ALIGNED_ALIGNMENT, OMP_CLAUSE_ALLOCATE, OMP_CLAUSE_ALLOCATE_ALLOCATOR, OMP_CLAUSE_ASYNC, OMP_CLAUSE_AUTO, OMP_CLAUSE_BIND, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, omp_clause_code_name, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_DEFAULT_KIND, OMP_CLAUSE_DEFAULTMAP, OMP_CLAUSE_DEFAULTMAP_ALLOC, OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_CATEGORY, OMP_CLAUSE_DEFAULTMAP_CATEGORY_AGGREGATE, OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALL, OMP_CLAUSE_DEFAULTMAP_CATEGORY_ALLOCATABLE, OMP_CLAUSE_DEFAULTMAP_CATEGORY_POINTER, OMP_CLAUSE_DEFAULTMAP_CATEGORY_SCALAR, OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED, OMP_CLAUSE_DEFAULTMAP_DEFAULT, OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP_FROM, OMP_CLAUSE_DEFAULTMAP_NONE, OMP_CLAUSE_DEFAULTMAP_PRESENT, OMP_CLAUSE_DEFAULTMAP_TO, OMP_CLAUSE_DEFAULTMAP_TOFROM, OMP_CLAUSE_DEPEND, OMP_CLAUSE_DETACH, OMP_CLAUSE_DEVICE, OMP_CLAUSE_DEVICE_ANCESTOR, OMP_CLAUSE_DEVICE_ID, OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_DOACROSS, OMP_CLAUSE_DOACROSS_KIND, OMP_CLAUSE_DOACROSS_SINK, OMP_CLAUSE_DOACROSS_SOURCE, OMP_CLAUSE_EXCLUSIVE, OMP_CLAUSE_FILTER, OMP_CLAUSE_FINAL, OMP_CLAUSE_FINALIZE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT, OMP_CLAUSE_FROM, OMP_CLAUSE_GANG, OMP_CLAUSE_GRAINSIZE, OMP_CLAUSE_HAS_DEVICE_ADDR, OMP_CLAUSE_HINT, OMP_CLAUSE_IF, OMP_CLAUSE_IF_MODIFIER, OMP_CLAUSE_IF_PRESENT, OMP_CLAUSE_IN_REDUCTION, OMP_CLAUSE_INCLUSIVE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_INTEROP, OMP_CLAUSE_IS_DEVICE_PTR, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_LASTPRIVATE_CONDITIONAL, OMP_CLAUSE_LASTPRIVATE_GIMPLE_SEQ, OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_LINEAR, OMP_CLAUSE_LINEAR_GIMPLE_SEQ, OMP_CLAUSE_LINEAR_NO_COPYIN, OMP_CLAUSE_LINEAR_NO_COPYOUT, OMP_CLAUSE_LINEAR_STEP, OMP_CLAUSE_LINEAR_STMT, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_IN_REDUCTION, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_NOCONTEXT, OMP_CLAUSE_NOCONTEXT_EXPR, OMP_CLAUSE_NOGROUP, OMP_CLAUSE_NOHOST, OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_NOVARIANTS, OMP_CLAUSE_NOVARIANTS_EXPR, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_TASKS, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_OPERAND, OMP_CLAUSE_ORDER, OMP_CLAUSE_ORDERED, OMP_CLAUSE_PRIORITY, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER, OMP_CLAUSE_REDUCTION_GIMPLE_INIT, OMP_CLAUSE_REDUCTION_GIMPLE_MERGE, OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_INSCAN, OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER, OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_RELEASE_DESCRIPTOR, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_SELF, OMP_CLAUSE_SEQ, OMP_CLAUSE_SHARED, OMP_CLAUSE_SIMD, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_SIZE, OMP_CLAUSE_TASK_REDUCTION, OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_THREADS, OMP_CLAUSE_TILE, OMP_CLAUSE_TO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_USE_DEVICE_ADDR, OMP_CLAUSE_USE_DEVICE_PTR, OMP_CLAUSE_VECTOR, OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_WAIT, OMP_CLAUSE_WORKER, omp_find_clause(), omp_firstprivatize_variable(), omp_gather_mapping_groups(), omp_index_mapping_groups(), omp_lastprivate_for_combined_outer_constructs(), omp_map_clause_descriptor_p(), omp_mapped_by_containing_struct(), omp_member_access_dummy_var(), omp_notice_variable(), omp_parse_expr(), lang_hooks_for_decls::omp_private_outer_ref, lang_hooks_for_decls::omp_scalar_p, gimplify_omp_ctx::order_concurrent, ORT_ACC, ORT_ACC_HOST_DATA, ORT_COMBINED_PARALLEL, ORT_COMBINED_TARGET, ORT_COMBINED_TEAMS, ORT_PARALLEL, ORT_SIMD, ORT_TASK, ORT_TASKLOOP, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, pop_gimplify_context(), push_gimplify_context(), gimplify_omp_ctx::region_type, size_binop, size_int, gimplify_omp_ctx::target_firstprivatize_array_bases, wi::to_widest(), TREE_ADDRESSABLE, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_PURPOSE, TREE_SIDE_EFFECTS, TREE_TYPE, TYPE_ALIGN_UNIT, TYPE_DOMAIN, TYPE_MAX_VALUE, TYPE_SIZE_UNIT, unshare_expr(), splay_tree_node< T >::value(), gimplify_omp_ctx::variables, void_type_node, walk_tree, and warning_at().

Referenced by gimplify_expr(), gimplify_oacc_cache(), gimplify_oacc_declare(), gimplify_omp_dispatch(), gimplify_omp_for(), gimplify_omp_parallel(), gimplify_omp_target_update(), gimplify_omp_task(), and gimplify_omp_workshare().

◆ gimplify_self_mod_expr()

enum gimplify_status gimplify_self_mod_expr ( tree * expr_p,
gimple_seq * pre_p,
gimple_seq * post_p,
bool want_value,
tree arith_type )
Gimplify the self modifying expression pointed to by EXPR_P
(++, --, +=, -=).

PRE_P points to the list where side effects that must happen before
    *EXPR_P should be stored.

POST_P points to the list where side effects that must happen after
    *EXPR_P should be stored.

WANT_VALUE is nonzero iff we want to use the value of this expression
    in another expression.

ARITH_TYPE is the type the computation should be performed in.   

References build2(), convert_to_ptrofftype_loc(), EXPR_LOCATION, fb_lvalue, fb_rvalue, fold_build1_loc(), fold_build2, fold_convert, gcc_assert, get_initialized_tmp_var(), gimplify_assign(), gimplify_expr(), gimplify_seq_add_seq(), GS_ALL_DONE, GS_ERROR, GS_OK, is_gimple_lvalue(), is_gimple_val(), NULL, POINTER_TYPE_P, TREE_CODE, TREE_OPERAND, and TREE_TYPE.

Referenced by gimplify_expr().

◆ gimplify_seq_add_seq()

static void gimplify_seq_add_seq ( gimple_seq * dst_p,
gimple_seq src )
static
Append sequence SRC to the end of sequence *DST_P.  If *DST_P is
NULL, a new sequence is allocated.   This function is
similar to gimple_seq_add_seq, but does not scan the operands.
During gimplification, we need to manipulate statement sequences
before the def/use vectors have been constructed.   

References gsi_insert_seq_after_without_update(), gsi_last(), GSI_NEW_STMT, NULL, and si.

Referenced by gimple_pop_condition(), gimplify_body(), gimplify_cleanup_point_expr(), gimplify_expr(), gimplify_omp_for(), gimplify_omp_loop_xform(), gimplify_self_mod_expr(), and gimplify_switch_expr().

◆ gimplify_seq_add_stmt()

◆ gimplify_statement_list()

static enum gimplify_status gimplify_statement_list ( tree * expr_p,
gimple_seq * pre_p )
static
Gimplify a statement list onto a sequence.  These may be created either
by an enlightened front-end, or by shortcut_cond_expr.   

References gimplify_stmt(), GS_ALL_DONE, GS_OK, i, NULL, tsi_delink(), tsi_end_p(), tsi_start(), tsi_stmt_ptr(), and voidify_wrapper_expr().

Referenced by gimplify_expr().

◆ gimplify_stmt()

bool gimplify_stmt ( tree * stmt_p,
gimple_seq * seq_p )
Gimplification of expression trees.   
Gimplify an expression which appears at statement context.  The
corresponding GIMPLE statements are added to *SEQ_P.  If *SEQ_P is
NULL, a new sequence is allocated.

Return true if we actually added a statement to the queue.   

References fb_none, gimple_seq_last(), gimplify_expr(), is_gimple_stmt(), last, and NULL.

Referenced by gimple_push_cleanup(), gimplify_and_add(), gimplify_bind_expr(), gimplify_body(), gimplify_cleanup_point_expr(), gimplify_compound_expr(), gimplify_cond_expr(), gimplify_init_constructor(), gimplify_modify_expr(), gimplify_statement_list(), gimplify_switch_expr(), goa_stabilize_expr(), and lower_omp_task_reductions().

◆ gimplify_switch_expr()

◆ gimplify_target_expr()

◆ gimplify_transaction()

◆ gimplify_type_sizes()

◆ gimplify_va_arg_expr()

◆ gimplify_var_or_parm_decl()

static enum gimplify_status gimplify_var_or_parm_decl ( tree * expr_p)
static
Gimplify a VAR_DECL or PARM_DECL.  Return GS_OK if we expanded a
DECL_VALUE_EXPR, and it's worth re-examining things.   

References current_function_decl, DECL_EXTERNAL, decl_function_context(), DECL_HAS_VALUE_EXPR_P, DECL_SEEN_IN_BIND_EXPR_P, DECL_VALUE_EXPR, gcc_assert, gimplify_omp_ctxp, GS_ALL_DONE, GS_ERROR, GS_OK, omp_notice_variable(), seen_error(), TREE_STATIC, unshare_expr(), and VAR_P.

Referenced by gimplify_compound_lval(), and gimplify_expr().

◆ gimplify_variable_sized_compare()

static enum gimplify_status gimplify_variable_sized_compare ( tree * expr_p)
static
Gimplify a comparison between two variable-sized objects.  Do this
with a call to BUILT_IN_MEMCMP.   

References build2(), build_call_expr_loc(), build_fold_addr_expr_loc(), builtin_decl_implicit(), expr, EXPR_LOCATION, GS_OK, integer_zero_node, SET_EXPR_LOCATION, SUBSTITUTE_PLACEHOLDER_IN_EXPR, TREE_CODE, TREE_OPERAND, TREE_TYPE, TYPE_SIZE_UNIT, and unshare_expr().

Referenced by gimplify_expr().

◆ gimplify_vla_decl()

◆ goa_lhs_expr_p()

static bool goa_lhs_expr_p ( tree expr,
tree addr )
static
A subroutine of gimplify_omp_atomic.  The front end is supposed to have
stabilized the lhs of the atomic operation as *ADDR.  Return true if
EXPR is this stabilized form.   

References CONVERT_EXPR_P, INDIRECT_REF_P, STRIP_USELESS_TYPE_CONVERSION, TREE_CODE, TREE_OPERAND, TREE_TYPE, and types_compatible_p().

Referenced by goa_stabilize_expr().

◆ goa_stabilize_expr()

static int goa_stabilize_expr ( tree * expr_p,
gimple_seq * pre_p,
tree lhs_addr,
tree lhs_var,
tree & target_expr,
bool rhs,
int depth )
static
Walk *EXPR_P and replace appearances of *LHS_ADDR with LHS_VAR.  If an
expression does not involve the lhs, evaluate it into a temporary.
Return 1 if the lhs appeared as a subexpression, 0 if it did not,
or -1 if an error was encountered.   

References CALL_EXPR_ARG, call_expr_nargs, expr, fb_lvalue, fb_rvalue, fndecl_built_in_p(), get_callee_fndecl(), gimplify_expr(), gimplify_stmt(), goa_lhs_expr_p(), goa_stabilize_expr(), GS_ALL_DONE, i, is_gimple_lvalue(), is_gimple_val(), NULL, NULL_TREE, TARGET_EXPR_INITIAL, tcc_binary, tcc_comparison, tcc_expression, tcc_reference, tcc_unary, tcc_vl_exp, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_TYPE, and VOID_TYPE_P.

Referenced by gimplify_omp_atomic(), and goa_stabilize_expr().

◆ initial_rhs_predicate_for()

static gimple_predicate initial_rhs_predicate_for ( tree lhs)
static
Return the initial guess for an appropriate RHS predicate for this LHS,
before the LHS has been gimplified.   

References is_gimple_mem_rhs_or_call(), is_gimple_reg_rhs_or_call(), is_gimple_reg_type(), and TREE_TYPE.

Referenced by gimplify_modify_expr().

◆ internal_get_tmp_var()

◆ is_gimple_mem_rhs()

static bool is_gimple_mem_rhs ( tree t)
static
Returns true iff T is a valid RHS for an assignment to an un-renamed
LHS, or for a call argument.   

References is_gimple_lvalue(), is_gimple_reg_type(), is_gimple_val(), and TREE_TYPE.

Referenced by gimplify_expr(), and gimplify_init_ctor_preeval().

◆ is_gimple_mem_rhs_or_call()

static bool is_gimple_mem_rhs_or_call ( tree t)
static
Return true if T is a valid memory RHS or a CALL_EXPR.  Note that
this predicate should only be used during gimplification.  See the
rationale for this in gimplify_modify_expr.   

References is_gimple_lvalue(), is_gimple_reg_type(), is_gimple_val(), TREE_CLOBBER_P, TREE_CODE, and TREE_TYPE.

Referenced by gimplify_expr(), initial_rhs_predicate_for(), and rhs_predicate_for().

◆ is_gimple_reg_rhs_or_call()

static bool is_gimple_reg_rhs_or_call ( tree t)
static
Return true if T is a CALL_EXPR or an expression that can be
assigned to a temporary.  Note that this predicate should only be
used during gimplification.  See the rationale for this in
gimplify_modify_expr.   

References get_gimple_rhs_class(), GIMPLE_INVALID_RHS, and TREE_CODE.

Referenced by gimplify_expr(), initial_rhs_predicate_for(), internal_get_tmp_var(), and rhs_predicate_for().

◆ is_gimple_stmt()

static bool is_gimple_stmt ( tree t)
static
Return true if T looks like a valid GIMPLE statement.   

References IS_EMPTY_STMT, NULL, TREE_CODE, TREE_TYPE, and VOID_TYPE_P.

Referenced by gimplify_expr(), gimplify_omp_loop(), gimplify_save_expr(), gimplify_stmt(), and gimplify_target_expr().

◆ is_oacc_declared()

static bool is_oacc_declared ( tree decl)
static
Return true if DECL has an ACC DECLARE attribute.   

References DECL_ATTRIBUTES, lookup_attribute(), NULL_TREE, TREE_CODE, and TREE_OPERAND.

Referenced by gimplify_oacc_declare(), and oacc_default_clause().

◆ is_var_need_auto_init()

static bool is_var_need_auto_init ( tree decl)
static
Return true if the DECL need to be automaticly initialized by the
compiler.   

References AUTO_INIT_UNINITIALIZED, auto_var_p(), DECL_ATTRIBUTES, DECL_HARD_REGISTER, is_empty_type(), lookup_attribute(), OPAQUE_TYPE_P, TREE_CODE, and TREE_TYPE.

Referenced by gimplify_decl_expr(), and gimplify_init_constructor().

◆ last_stmt_in_scope()

◆ lookup_tmp_var()

static tree lookup_tmp_var ( tree val,
bool is_formal,
bool not_gimple_reg )
static
Create a temporary to hold the value of VAL.  If IS_FORMAL, try to reuse
an existing expression temporary.  If NOT_GIMPLE_REG, mark it as such.   

References create_tmp_from_val(), DECL_NOT_GIMPLE_REG_P, hash_table< Descriptor, Lazy, Allocator >::find_slot(), gcc_assert, gimplify_ctxp, NULL, gimple_temp_hash_elt::temp, gimplify_ctx::temp_htab, TREE_SIDE_EFFECTS, and gimple_temp_hash_elt::val.

Referenced by internal_get_tmp_var().

◆ maybe_add_early_return_predict_stmt()

static void maybe_add_early_return_predict_stmt ( gimple_seq * pre_p)
static
Maybe add early return predict statement to PRE_P sequence.   

References gimple_build_predict(), gimple_conditional_context(), gimplify_seq_add_stmt(), and NOT_TAKEN.

Referenced by gimplify_return_expr().

◆ maybe_fold_stmt()

static bool maybe_fold_stmt ( gimple_stmt_iterator * gsi)
static
Don't fold inside offloading or taskreg regions: it can break code by
adding decl references that weren't in the source.  We'll do it during
omplower pass instead.   

References fold_stmt(), gimple_call_builtin_p(), gimplify_omp_ctxp, gsi_stmt(), ORT_HOST_TEAMS, ORT_PARALLEL, ORT_TARGET, ORT_TASK, gimplify_omp_ctx::outer_context, and gimplify_omp_ctx::region_type.

Referenced by gimplify_call_expr(), gimplify_cond_expr(), and gimplify_modify_expr().

◆ maybe_warn_implicit_fallthrough()

static void maybe_warn_implicit_fallthrough ( gimple_seq seq)
static
Warn when a switch case falls through.   

References lang_GNU_C(), lang_GNU_CXX(), lang_GNU_OBJC(), NULL, walk_gimple_seq(), and warn_implicit_fallthrough_r().

Referenced by gimplify_switch_expr().

◆ maybe_warn_switch_unreachable_and_auto_init()

static void maybe_warn_switch_unreachable_and_auto_init ( gimple_seq seq)
static
Possibly warn about unreachable statements between switch's controlling
expression and the first case.  Also warn about -ftrivial-auto-var-init
cannot initialize the auto variable under such situation.
SEQ is the body of a switch expression.   

References lang_GNU_Fortran(), NULL, walk_gimple_seq(), and warn_switch_unreachable_and_auto_init_r().

Referenced by gimplify_switch_expr().

◆ maybe_with_size_expr()

static void maybe_with_size_expr ( tree * expr_p)
static
If *EXPR_P has a variable sized type, wrap it in a WITH_SIZE_EXPR.   

References build2(), error_mark_node, poly_int_tree_p(), SUBSTITUTE_PLACEHOLDER_IN_EXPR, TREE_CODE, TREE_TYPE, TYPE_SIZE_UNIT, and unshare_expr().

Referenced by gimplify_arg(), gimplify_init_ctor_preeval(), and gimplify_modify_expr().

◆ mostly_copy_tree_r()

static tree mostly_copy_tree_r ( tree * tp,
int * walk_subtrees,
void * data )
static
This page contains routines to unshare tree nodes, i.e. to duplicate tree
 nodes that are referenced more than once in GENERIC functions.  This is
 necessary because gimplification (translation into GIMPLE) is performed
 by modifying tree nodes in-place, so gimplication of a shared node in a
 first context could generate an invalid GIMPLE form in a second context.

 This is achieved with a simple mark/copy/unmark algorithm that walks the
 GENERIC representation top-down, marks nodes with TREE_VISITED the first
 time it encounters them, duplicates them if they already have TREE_VISITED
 set, and finally removes the TREE_VISITED marks it has set.

 The algorithm works only at the function level, i.e. it generates a GENERIC
 representation of a function with no nodes shared within the function when
 passed a GENERIC function (except for nodes that are allowed to be shared).

 At the global level, it is also necessary to unshare tree nodes that are
 referenced in more than one function, for the same aforementioned reason.
 This requires some cooperation from the front-end.  There are 2 strategies:

   1. Manual unsharing.  The front-end needs to call unshare_expr on every
      expression that might end up being shared across functions.

   2. Deep unsharing.  This is an extension of regular unsharing.  Instead
      of calling unshare_expr on expressions that might be shared across
      functions, the front-end pre-marks them with TREE_VISITED.  This will
      ensure that they are unshared on the first reference within functions
      when the regular unsharing algorithm runs.  The counterpart is that
      this algorithm must look deeper than for manual unsharing, which is
      specified by LANG_HOOKS_DEEP_UNSHARING.

If there are only few specific cases of node sharing across functions, it is
probably easier for a front-end to unshare the expressions manually.  On the
contrary, if the expressions generated at the global level are as widespread
as expressions generated within functions, deep unsharing is very likely the
way to go.   
Similar to copy_tree_r but do not copy SAVE_EXPR or TARGET_EXPR nodes.
These nodes model computations that must be done once.  If we were to
unshare something like SAVE_EXPR(i++), the gimplification process would
create wrong code.  However, if DATA is non-null, it must hold a pointer
set that is used to unshare the subtrees of these nodes.   

References gimplify_omp_ctx::code, copy_tree_r(), NULL, NULL_TREE, tcc_constant, tcc_declaration, tcc_type, TREE_CODE, and TREE_CODE_CLASS.

Referenced by copy_if_shared_r(), unshare_expr(), and unshare_expr_without_location().

◆ new_omp_context()

◆ next_cond_uid()

static unsigned next_cond_uid ( )
static
Get a fresh identifier for a new condition expression.  This is used for
condition coverage.   

References nextconduid.

Referenced by gimplify_cond_expr().

◆ note_no_context_vars()

static tree note_no_context_vars ( tree * tp,
int * ,
void * data )
static
Helper for gimplify_omp_loop, called through walk_tree.   

References current_function_decl, DECL_CONTEXT, is_global_var(), NULL_TREE, and VAR_P.

Referenced by gimplify_omp_loop().

◆ oacc_default_clause()

◆ oacc_region_type_name()

static const char * oacc_region_type_name ( enum omp_region_type region_type)
static
Return string name for types of OpenACC constructs from ORT_* values.   

References gcc_unreachable, ORT_ACC_DATA, ORT_ACC_KERNELS, ORT_ACC_PARALLEL, ORT_ACC_SERIAL, and gimplify_omp_ctx::region_type.

Referenced by oacc_default_clause().

◆ oacc_resolve_clause_dependencies()

void oacc_resolve_clause_dependencies ( vec< omp_mapping_group > * groups,
hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap )
Similar to omp_resolve_clause_dependencies, but for OpenACC.  The only
clause dependencies we handle for now are struct element mappings and
whole-struct mappings on the same directive, and duplicate clause
detection.   

References hash_set< KeyId, Lazy, Traits >::add(), hash_set< KeyId, Lazy, Traits >::contains(), DECL_P, omp_mapping_group::deleted, error_at(), FOR_EACH_VEC_ELT, gcc_assert, omp_mapping_group::grp_end, omp_mapping_group::grp_start, i, NULL, omp_check_mapping_compatibility(), OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, omp_mapped_by_containing_struct(), TREE_CODE, and TREE_OPERAND.

Referenced by gimplify_adjust_omp_clauses().

◆ omp_accumulate_sibling_list()

static tree * omp_accumulate_sibling_list ( enum omp_region_type region_type,
enum tree_code code,
hash_map< tree_operand_hash, tree > *& struct_map_to_clause,
hash_map< tree_operand_hash_no_se, omp_mapping_group * > * group_map,
tree * grp_start_p,
tree grp_end,
vec< omp_addr_token * > & addr_tokens,
tree ** inner,
bool * fragile_p,
bool reprocessing_struct,
tree ** added_tail )
static
Mapping struct members causes an additional set of nodes to be created,
starting with GOMP_MAP_STRUCT followed by a number of mappings equal to the
number of members being mapped, in order of ascending position (address or
bitwise).

We scan through the list of mapping clauses, calling this function for each
struct member mapping we find, and build up the list of mappings after the
initial GOMP_MAP_STRUCT node.  For pointer members, these will be
newly-created ALLOC nodes.  For non-pointer members, the existing mapping is
moved into place in the sorted list.

  struct {
    int *a;
    int *b;
    int c;
    int *d;
  };

  #pragma (acc|omp directive) copy(struct.a[0:n], struct.b[0:n], struct.c,
                              struct.d[0:n])

  GOMP_MAP_STRUCT (4)
  [GOMP_MAP_FIRSTPRIVATE_REFERENCE -- for refs to structs]
  GOMP_MAP_ALLOC  (struct.a)
  GOMP_MAP_ALLOC  (struct.b)
  GOMP_MAP_TO     (struct.c)
  GOMP_MAP_ALLOC  (struct.d)
  ...

In the case where we are mapping references to pointers, or in Fortran if
we are mapping an array with a descriptor, additional nodes may be created
after the struct node list also.

The return code is either a pointer to the next node to process (if the
list has been rearranged), else NULL to continue with the next node in the
original list.   

References omp_addr_tokenizer::omp_addr_token::access_kind, alloc_node(), build_fold_addr_expr, build_fold_indirect_ref, build_omp_clause(), build_omp_struct_comp_nodes(), gimplify_omp_ctx::code, DECL_P, omp_addr_tokenizer::omp_addr_token::expr, extract_base_bit_offset(), fold_build2_loc(), fold_convert_loc(), gcc_assert, gcc_unreachable, hash_map< KeyId, Value, Traits >::get(), i, INDIRECT_REF_P, integer_zerop(), known_eq, lang_GNU_Fortran(), NULL, NULL_TREE, offset, OMP_CLAUSE_ATTACHMENT_MAPPING_ERASED, OMP_CLAUSE_CHAIN, OMP_CLAUSE_DECL, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION, OMP_CLAUSE_SET_MAP_KIND, OMP_CLAUSE_SIZE, omp_directive_maps_explicitly(), omp_first_chained_access_token(), omp_get_nonfirstprivate_group(), omp_map_clause_descriptor_p(), omp_siblist_insert_node_after(), omp_siblist_move_concat_nodes_after(), omp_siblist_move_node_after(), omp_siblist_move_nodes_after(), operand_equal_p(), ORT_ACC, ORT_TARGET, ptrdiff_type_node, hash_map< KeyId, Value, Traits >::put(), gimplify_omp_ctx::region_type, sc, size_binop, size_int, size_one_node, size_zero_node, TREE_CODE, TREE_OPERAND, tree_to_uhwi(), TREE_TYPE, omp_addr_tokenizer::omp_addr_token::type, TYPE_SIZE_UNIT, omp_addr_tokenizer::omp_addr_token::u, and unshare_expr().

Referenced by omp_build_struct_sibling_lists().

◆ omp_add_variable()

◆ omp_build_struct_sibling_lists()

static bool omp_build_struct_sibling_lists ( enum tree_code code,
enum omp_region_type region_type,
vec< omp_mapping_group > * groups,
hash_map< tree_operand_hash_no_se, omp_mapping_group * > ** grpmap,
tree * list_p )
static

◆ omp_check_mapping_compatibility()

bool omp_check_mapping_compatibility ( location_t loc,
omp_mapping_group * outer,
omp_mapping_group * inner )
If we have mappings INNER and OUTER, where INNER is a component access and
OUTER is a mapping of the whole containing struct, check that the mappings
are compatible.  We'll be deleting the inner mapping, so we need to make
sure the outer mapping does (at least) the same transfers to/from the device
as the inner mapping.   

References error_at(), gcc_assert, omp_mapping_group::grp_start, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_MAP, and OMP_CLAUSE_MAP_KIND.

Referenced by oacc_resolve_clause_dependencies(), and omp_resolve_clause_dependencies().

◆ omp_check_private()

static bool omp_check_private ( struct gimplify_omp_ctx * ctx,
tree decl,
bool copyprivate )
static

◆ omp_construct_selector_matches()

int omp_construct_selector_matches ( enum tree_code * constructs,
int nconstructs,
int * scores )
Return 0 if CONSTRUCTS selectors don't match the OpenMP context,
-1 if unknown yet (simd is involved, won't be known until vectorization)
and 1 if they do.  If SCORES is non-NULL, it should point to an array
of at least 2*NCONSTRUCTS+2 ints, and will be filled with the positions
of the CONSTRUCTS (position -1 if it will never match) followed by
number of constructs in the OpenMP context construct trait.  If the
score depends on whether it will be in a declare simd clone or not,
the function returns 2 and there will be two sets of the scores, the first
one for the case that it is not in a declare simd clone, the other
that it is in a declare simd clone.   

References alloca, gimplify_omp_ctx::code, current_function_decl, DECL_ATTRIBUTES, gcc_assert, gimplify_omp_ctxp, i, list_length(), lookup_attribute(), NULL, OMP_CLAUSE_BIND, omp_construct_traits_to_codes(), omp_find_clause(), omp_has_nocontext(), ORT_ACC, ORT_COMBINED_PARALLEL, ORT_IMPLICIT_TARGET, ORT_PARALLEL, ORT_SIMD, ORT_TARGET, ORT_TEAMS, ORT_WORKSHARE, and TREE_VALUE.

Referenced by omp_context_compute_score(), omp_context_selector_matches(), and omp_maybe_offloaded().

◆ omp_containing_struct()

static tree omp_containing_struct ( tree expr)
static
Find the immediately-containing struct for a component ref (etc.)
expression EXPR.   

References expr, STRIP_NOPS, TREE_CODE, and TREE_OPERAND.

Referenced by omp_mapped_by_containing_struct().

◆ omp_default_clause()

◆ omp_directive_maps_explicitly()

static bool omp_directive_maps_explicitly ( hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap,
tree decl,
omp_mapping_group ** base_group,
bool to_specifically,
bool allow_deleted,
bool contained_in_struct )
static
Return TRUE if the directive (whose clauses are described by the hash table
of mapping groups, GRPMAP) maps DECL explicitly.  If TO_SPECIFICALLY is
true, only count TO mappings.  If ALLOW_DELETED is true, ignore the
"deleted" flag for groups.  If CONTAINED_IN_STRUCT is true, also return
TRUE if DECL is mapped as a member of a whole-struct mapping.   

References omp_mapping_group::grp_start, NULL, OMP_CLAUSE_CHAIN, OMP_CLAUSE_MAP_KIND, omp_get_nonfirstprivate_group(), and omp_mapped_by_containing_struct().

Referenced by omp_accumulate_sibling_list(), and omp_resolve_clause_dependencies().

◆ omp_find_stores_op()

static tree omp_find_stores_op ( tree * tp,
int * walk_subtrees,
void * data )
static
Helper callback for walk_gimple_seq to discover possible stores
to omp_shared_to_firstprivate_optimizable_decl_p decls and set
GOVD_WRITTEN if they are GOVD_SHARED in some outer context
for those.   

References DECL_P, gimplify_omp_ctxp, handled_component_p(), NULL_TREE, omp_mark_stores(), omp_shared_to_firstprivate_optimizable_decl_p(), TREE_CODE, and TREE_OPERAND.

Referenced by gimplify_adjust_omp_clauses(), and omp_find_stores_stmt().

◆ omp_find_stores_stmt()

static tree omp_find_stores_stmt ( gimple_stmt_iterator * gsi_p,
bool * handled_ops_p,
struct walk_stmt_info * wi )
static
Helper callback for walk_gimple_seq to discover possible stores
to omp_shared_to_firstprivate_optimizable_decl_p decls and set
GOVD_WRITTEN if they are GOVD_SHARED in some outer context
for those.   

References gimple_omp_for_pre_body(), gsi_stmt(), NULL_TREE, omp_find_stores_op(), omp_find_stores_stmt(), walk_stmt_info::stmt, and walk_gimple_seq().

Referenced by gimplify_adjust_omp_clauses(), and omp_find_stores_stmt().

◆ omp_first_chained_access_token()

static omp_addr_token * omp_first_chained_access_token ( vec< omp_addr_token * > & addr_tokens)
static

◆ omp_firstprivatize_type_sizes()

◆ omp_firstprivatize_variable()

void omp_firstprivatize_variable ( struct gimplify_omp_ctx * ctx,
tree decl )
Add FIRSTPRIVATE entries for DECL in the OpenMP the surrounding parallels
to CTX.  If entries already exist, force them to be some flavor of private.
If there is no enclosing parallel, do nothing.   

References DECL_P, gimplify_omp_ctx::defaultmap, GDMK_SCALAR, GOVD_FIRSTPRIVATE, GOVD_MAP, GOVD_MAP_TO_ONLY, GOVD_SEEN, GOVD_SHARED, NULL, omp_add_variable(), ORT_ACC, ORT_NONE, ORT_SIMD, ORT_TARGET, ORT_TARGET_DATA, ORT_TASKGROUP, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, gimplify_omp_ctx::region_type, splay_tree_node< T >::value(), and gimplify_omp_ctx::variables.

Referenced by gimplify_scan_omp_clauses(), omp_add_variable(), and omp_firstprivatize_type_sizes().

◆ omp_gather_mapping_groups()

static vec< omp_mapping_group > * omp_gather_mapping_groups ( tree * list_p)
static

◆ omp_gather_mapping_groups_1()

static void omp_gather_mapping_groups_1 ( tree * list_p,
vec< omp_mapping_group > * groups,
tree gather_sentinel )
static
Walk through LIST_P, and return a list of groups of mappings found (e.g.
OMP_CLAUSE_MAP with GOMP_MAP_{TO/FROM/TOFROM} followed by one or two
associated GOMP_MAP_POINTER mappings).  Return a vector of omp_mapping_group
if we have more than one such group, else return NULL.   

References omp_mapping_group::deleted, omp_mapping_group::fragile, omp_mapping_group::grp_end, omp_mapping_group::grp_start, omp_mapping_group::mark, omp_mapping_group::next, NULL, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_MAP, omp_group_last(), omp_mapping_group::reprocess_struct, omp_mapping_group::sibling, and UNVISITED.

Referenced by omp_gather_mapping_groups(), and omp_reindex_mapping_groups().

◆ omp_get_attachment()

static tree omp_get_attachment ( omp_mapping_group * grp)
static
An attach or detach operation depends directly on the address being
attached/detached.  Return that address, or none if there are no
attachments/detachments.   

References error_mark_node, gcc_assert, omp_mapping_group::grp_end, omp_mapping_group::grp_start, internal_error(), NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_DECL, OMP_CLAUSE_MAP_KIND, and omp_map_clause_descriptor_p().

Referenced by omp_tsort_mapping_groups_1().

◆ omp_get_base_pointer()

static tree omp_get_base_pointer ( tree expr)
static
Return the OpenMP "base pointer" of an expression EXPR, or NULL if there
isn't one.   

References expr, INDIRECT_REF_P, integer_zerop(), NULL_TREE, STRIP_NOPS, TREE_CODE, and TREE_OPERAND.

Referenced by omp_resolve_clause_dependencies(), and omp_tsort_mapping_groups_1().

◆ omp_get_nonfirstprivate_group()

static omp_mapping_group * omp_get_nonfirstprivate_group ( hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap,
tree decl,
bool allow_deleted = false )
static
We might have indexed several groups for DECL, e.g. a "TO" mapping and also
a "FIRSTPRIVATE" mapping.  Return the one that isn't firstprivate, etc.   

References omp_mapping_group::deleted, omp_mapping_group::grp_end, NULL, OMP_CLAUSE_MAP_KIND, and omp_mapping_group::sibling.

Referenced by omp_accumulate_sibling_list(), omp_directive_maps_explicitly(), and omp_resolve_clause_dependencies().

◆ omp_group_base()

static tree omp_group_base ( omp_mapping_group * grp,
unsigned int * chained,
tree * firstprivate )
static
A pointer mapping group GRP may define a block of memory starting at some
base address, and maybe also define a firstprivate pointer or firstprivate
reference that points to that block.  The return value is a node containing
the former, and the *FIRSTPRIVATE pointer is set if we have the latter.
If we define several base pointers, i.e. for a GOMP_MAP_STRUCT mapping,
return the number of consecutive chained nodes in CHAINED.   

References error_mark_node, gcc_assert, gcc_unreachable, omp_mapping_group::grp_end, omp_mapping_group::grp_start, internal_error(), NULL_TREE, OMP_CLAUSE_CHAIN, OMP_CLAUSE_DECL, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_SIZE, omp_map_clause_descriptor_p(), seen_error(), and tree_to_uhwi().

Referenced by omp_index_mapping_groups_1().

◆ omp_group_last()

static tree * omp_group_last ( tree * start_p)
static
Given a pointer START_P to the start of a group of related (e.g. pointer)
mappings, return the chain pointer to the end of that group in the list.   

References gcc_assert, i, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_SIZE, omp_map_clause_descriptor_p(), and tree_to_uhwi().

Referenced by gimplify_adjust_omp_clauses(), and omp_gather_mapping_groups_1().

◆ omp_has_nocontext()

static int omp_has_nocontext ( void )
static
Try to evaluate a nocontext clause. Return 1 if true, 0 if false or absent,
* -1 if run-time evaluation is needed.  

References gimplify_omp_ctx::clauses, gimplify_omp_ctx::code, gimplify_omp_ctxp, integer_nonzerop(), integer_zerop(), NULL, NULL_TREE, OMP_CLAUSE_NOCONTEXT, OMP_CLAUSE_NOCONTEXT_EXPR, and omp_find_clause().

Referenced by gimplify_omp_dispatch(), and omp_construct_selector_matches().

◆ omp_has_novariants()

int omp_has_novariants ( void )
Try to evaluate a novariants clause. Return 1 if true, 0 if false or absent,
* -1 if run-time evaluation is needed.  

References gimplify_omp_ctx::clauses, gimplify_omp_ctx::code, gimplify_omp_ctxp, gimplify_omp_ctx::in_call_args, integer_nonzerop(), integer_zerop(), NULL, NULL_TREE, OMP_CLAUSE_NOVARIANTS, OMP_CLAUSE_NOVARIANTS_EXPR, and omp_find_clause().

Referenced by gimplify_omp_dispatch(), and omp_resolve_declare_variant().

◆ omp_index_mapping_groups()

static hash_map< tree_operand_hash_no_se, omp_mapping_group * > * omp_index_mapping_groups ( vec< omp_mapping_group > * groups)
static

◆ omp_index_mapping_groups_1()

static void omp_index_mapping_groups_1 ( hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap,
vec< omp_mapping_group > * groups,
tree reindex_sentinel )
static

◆ omp_is_private()

static bool omp_is_private ( struct gimplify_omp_ctx * ctx,
tree decl,
int simd )
static

◆ omp_lastprivate_for_combined_outer_constructs()

static void omp_lastprivate_for_combined_outer_constructs ( struct gimplify_omp_ctx * octx,
tree decl,
bool implicit_p )
static
DECL is supposed to have lastprivate semantics in the outer contexts
of combined/composite constructs, starting with OCTX.
Add needed lastprivate, shared or map clause if no data sharing or
mapping clause are present.  IMPLICIT_P is true if it is an implicit
clause (IV on simd), in which case the lastprivate will not be
copied to some constructs.   

References gimplify_omp_ctx::combined_loop, GOVD_EXPLICIT, GOVD_FIRSTPRIVATE, GOVD_FIRSTPRIVATE_IMPLICIT, GOVD_LASTPRIVATE, GOVD_MAP, GOVD_SEEN, GOVD_SHARED, NULL, omp_add_variable(), omp_check_private(), omp_notice_variable(), ORT_ACC, ORT_COMBINED_PARALLEL, ORT_COMBINED_TARGET, ORT_COMBINED_TEAMS, ORT_TASK, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, gimplify_omp_ctx::region_type, splay_tree_node< T >::value(), and gimplify_omp_ctx::variables.

Referenced by gimplify_omp_for(), and gimplify_scan_omp_clauses().

◆ omp_map_clause_descriptor_p()

◆ omp_mapped_by_containing_struct()

static bool omp_mapped_by_containing_struct ( hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap,
tree decl,
omp_mapping_group ** mapped_by_group )
static
Return TRUE if DECL describes a component that is part of a whole structure
that is mapped elsewhere in GRPMAP.  *MAPPED_BY_GROUP is set to the group
that maps that structure, if present.   

References build_fold_indirect_ref, integer_zerop(), NULL, NULL_TREE, omp_containing_struct(), TREE_CODE, and TREE_OPERAND.

Referenced by gimplify_scan_omp_clauses(), oacc_resolve_clause_dependencies(), omp_build_struct_sibling_lists(), omp_directive_maps_explicitly(), omp_resolve_clause_dependencies(), and omp_tsort_mapping_groups_1().

◆ omp_mark_stores()

static void omp_mark_stores ( struct gimplify_omp_ctx * ctx,
tree decl )
static
Helper function of omp_find_stores_op and gimplify_adjust_omp_clauses*.
For omp_shared_to_firstprivate_optimizable_decl_p decl mark it as
GOVD_WRITTEN in outer contexts.   

References GOVD_DATA_SHARE_CLASS, GOVD_SHARED, GOVD_WRITTEN, NULL, gimplify_omp_ctx::outer_context, splay_tree_node< T >::value(), and gimplify_omp_ctx::variables.

Referenced by gimplify_adjust_omp_clauses(), gimplify_adjust_omp_clauses_1(), and omp_find_stores_op().

◆ omp_notice_threadprivate_variable()

static bool omp_notice_threadprivate_variable ( struct gimplify_omp_ctx * ctx,
tree decl,
tree decl2 )
static
Notice a threadprivate variable DECL used in OMP context CTX.
This just prints out diagnostics about threadprivate variable uses
in untied tasks.  If DECL2 is non-NULL, prevent this warning
on that variable.   

References DECL_NAME, error(), inform(), gimplify_omp_ctx::location, NULL, gimplify_omp_ctx::order_concurrent, ORT_TARGET, ORT_UNTIED_TASK, gimplify_omp_ctx::outer_context, gimplify_omp_ctx::region_type, and gimplify_omp_ctx::variables.

Referenced by omp_notice_variable().

◆ omp_notice_variable()

static bool omp_notice_variable ( struct gimplify_omp_ctx * ctx,
tree decl,
bool in_code )
static
Record the fact that DECL was used within the OMP context CTX.
IN_CODE is true when real code uses DECL, and false when we should
merely emit default(none) errors.  Return true if DECL is going to
be remapped and thus DECL shouldn't be gimplified into its
DECL_VALUE_EXPR (if any).   

References current_function_decl, DECL_ARTIFICIAL, DECL_ATTRIBUTES, DECL_HAS_VALUE_EXPR_P, DECL_NAME, DECL_P, DECL_SIZE, DECL_SOURCE_LOCATION, DECL_THREAD_LOCAL_P, DECL_VALUE_EXPR, lang_hooks::decls, gimplify_omp_ctx::defaultmap, error(), error_at(), error_operand_p(), gcc_assert, gcc_unreachable, GDMK_AGGREGATE, GDMK_ALLOCATABLE, GDMK_POINTER, GDMK_SCALAR, GDMK_SCALAR_TARGET, get_base_address(), varpool_node::get_create(), gimplify_omp_ctxp, GOVD_DATA_SHARE_CLASS, GOVD_EXPLICIT, GOVD_FIRSTPRIVATE, GOVD_LASTPRIVATE, GOVD_LINEAR, GOVD_LINEAR_LASTPRIVATE_NO_OUTER, GOVD_LOCAL, GOVD_MAP, GOVD_MAP_0LEN_ARRAY, GOVD_MAP_ALLOC_ONLY, GOVD_MAP_FORCE_PRESENT, GOVD_MAP_FROM_ONLY, GOVD_MAP_TO_ONLY, GOVD_PRIVATE, GOVD_PRIVATE_OUTER_REF, GOVD_SEEN, GOVD_SHARED, gimplify_omp_ctx::in_for_exprs, INDIRECT_REF_P, inform(), is_global_var(), gimplify_omp_ctx::location, lookup_attribute(), NULL, NULL_TREE, oacc_default_clause(), oacc_get_fn_attrib(), omp_add_variable(), lang_hooks_for_decls::omp_allocatable_p, OMP_CLAUSE_DEFAULTMAP_CATEGORY_UNSPECIFIED, OMP_CLAUSE_DEFAULTMAP_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP_TO, omp_default_clause(), lang_hooks_for_decls::omp_disregard_value_expr, omp_mappable_type(), omp_notice_threadprivate_variable(), omp_notice_variable(), lang_hooks_for_decls::omp_predetermined_mapping, lang_hooks_for_decls::omp_private_outer_ref, omp_privatize_by_reference(), lang_hooks_for_decls::omp_report_decl, lang_hooks_for_decls::omp_scalar_p, lang_hooks_for_decls::omp_scalar_target_p, ORT_ACC, ORT_ACC_DATA, ORT_ACC_HOST_DATA, ORT_NONE, ORT_SIMD, ORT_TARGET, ORT_TARGET_DATA, ORT_TASKGROUP, ORT_WORKSHARE, gimplify_omp_ctx::outer_context, gimplify_omp_ctx::region_type, gimplify_omp_ctx::target_firstprivatize_array_bases, TREE_CODE, TREE_OPERAND, TREE_TYPE, TREE_VALUE, TYPE_SIZE_UNIT, splay_tree_node< T >::value(), VAR_P, and gimplify_omp_ctx::variables.

Referenced by gimplify_adjust_omp_clauses(), gimplify_adjust_omp_clauses_1(), gimplify_expr(), gimplify_omp_for(), gimplify_scan_omp_clauses(), gimplify_var_or_parm_decl(), omp_add_variable(), omp_default_clause(), omp_lastprivate_for_combined_outer_constructs(), and omp_notice_variable().

◆ omp_reindex_mapping_groups()

static hash_map< tree_operand_hash_no_se, omp_mapping_group * > * omp_reindex_mapping_groups ( tree * list_p,
vec< omp_mapping_group > * groups,
vec< omp_mapping_group > * processed_groups,
tree sentinel )
static
Rebuild group map from partially-processed clause list (during
omp_build_struct_sibling_lists).  We have already processed nodes up until
a high-water mark (HWM).  This is a bit tricky because the list is being
reordered as it is scanned, but we know:

1. The list after HWM has not been touched yet, so we can reindex it safely.

2. The list before and including HWM has been altered, but remains
   well-formed throughout the sibling-list building operation.

so, we can do the reindex operation in two parts, on the processed and
then the unprocessed halves of the list.   

References NULL_TREE, omp_gather_mapping_groups_1(), and omp_index_mapping_groups_1().

Referenced by omp_build_struct_sibling_lists().

◆ omp_reorder_mapping_groups()

static tree * omp_reorder_mapping_groups ( vec< omp_mapping_group > * groups,
omp_mapping_group * head,
tree * list_p )
static
Given a list LIST_P containing groups of mappings given by GROUPS, reorder
  those groups based on the output list of omp_tsort_mapping_groups --
  singly-linked, threaded through each element's NEXT pointer starting at
  HEAD.  Each list element appears exactly once in that linked list.

  Each element of GROUPS may correspond to one or several mapping nodes.
  Node groups are kept together, and in the reordered list, the positions of
  the original groups are reused for the positions of the reordered list.
  Hence if we have e.g.

    {to ptr ptr} firstprivate {tofrom ptr} ...
     ^             ^           ^
     first group  non-"map"    second group

  and say the second group contains a base pointer for the first so must be
  moved before it, the resulting list will contain:

    {tofrom ptr} firstprivate {to ptr ptr} ...
     ^ prev. second group      ^ prev. first group

References FOR_EACH_VEC_ELT, gcc_assert, omp_mapping_group::grp_end, omp_mapping_group::grp_start, i, NULL, and OMP_CLAUSE_CHAIN.

Referenced by gimplify_adjust_omp_clauses().

◆ omp_resolve_clause_dependencies()

void omp_resolve_clause_dependencies ( enum tree_code code,
vec< omp_mapping_group > * groups,
hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap )
This function handles several cases where clauses on a mapping directive
can interact with each other.

If we have a FIRSTPRIVATE_POINTER node and we're also mapping the pointer
on the same directive, change the mapping of the first node to
ATTACH_DETACH.  We should have detected that this will happen already in
c-omp.cc:c_omp_adjust_map_clauses and marked the appropriate decl
as addressable.  (If we didn't, bail out.)

If we have a FIRSTPRIVATE_REFERENCE (for a reference to pointer) and we're
mapping the base pointer also, we may need to change the mapping type to
ATTACH_DETACH and synthesize an alloc node for the reference itself.

If we have an ATTACH_DETACH node, this is an array section with a pointer
base.  If we're mapping the base on the same directive too, we can drop its
mapping.  However, if we have a reference to pointer, make other appropriate
adjustments to the mapping nodes instead.

If we have an ATTACH_DETACH node with a Fortran pointer-set (array
descriptor) mapping for a derived-type component, and we're also mapping the
whole of the derived-type variable on another clause, the pointer-set
mapping is removed.

If we have a component access but we're also mapping the whole of the
containing struct, drop the former access.

If the expression is a component access, and we're also mapping a base
pointer used in that component access in the same expression, change the
mapping type of the latter to ALLOC (ready for processing by
omp_build_struct_sibling_lists).   

References build2(), build_fold_addr_expr, build_fold_indirect_ref, build_int_cst(), build_omp_clause(), build_pointer_type(), char_type_node, gimplify_omp_ctx::code, DECL_P, omp_mapping_group::deleted, FOR_EACH_VEC_ELT, gcc_assert, omp_mapping_group::grp_end, omp_mapping_group::grp_start, i, NULL, NULL_TREE, omp_check_mapping_compatibility(), OMP_CLAUSE_ATTACHMENT_MAPPING_ERASED, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_DECL, OMP_CLAUSE_LOCATION, OMP_CLAUSE_MAP, OMP_CLAUSE_MAP_KIND, OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION, OMP_CLAUSE_SET_MAP_KIND, OMP_CLAUSE_SIZE, omp_directive_maps_explicitly(), omp_get_base_pointer(), omp_get_nonfirstprivate_group(), omp_map_clause_descriptor_p(), omp_mapped_by_containing_struct(), TREE_ADDRESSABLE, TREE_CODE, TREE_OPERAND, TREE_TYPE, and TYPE_SIZE_UNIT.

Referenced by gimplify_adjust_omp_clauses().

◆ omp_segregate_mapping_groups()

static omp_mapping_group * omp_segregate_mapping_groups ( omp_mapping_group * inlist)
static
Split INLIST into three parts:

  - "present" alloc/to/from groups
  - other to/from groups
  - other alloc/release/delete groups

These sub-lists are then concatenated together to form the final list.
Each sub-list retains the order of the original list.
Note that ATTACH nodes are later moved to the end of the list in
gimplify_adjust_omp_clauses, for target regions.   

References gcc_assert, omp_mapping_group::next, NULL, OMP_CLAUSE_CODE, OMP_CLAUSE_MAP, and OMP_CLAUSE_MAP_KIND.

Referenced by gimplify_adjust_omp_clauses().

◆ omp_shared_to_firstprivate_optimizable_decl_p()

static bool omp_shared_to_firstprivate_optimizable_decl_p ( tree decl)
static
Return true if DECL is a candidate for shared to firstprivate
optimization.  We only consider non-addressable scalars, not
too big, and not references.   

References int_size_in_bytes(), is_gimple_reg_type(), omp_privatize_by_reference(), POINTER_SIZE, TREE_ADDRESSABLE, TREE_CODE, and TREE_TYPE.

Referenced by gimplify_adjust_omp_clauses(), gimplify_adjust_omp_clauses_1(), and omp_find_stores_op().

◆ omp_siblist_insert_node_after()

static tree * omp_siblist_insert_node_after ( tree newnode,
tree * insert_at )
static
Link node NEWNODE so it is pointed to by chain INSERT_AT.  NEWNODE's chain
is linked to the previous node pointed to by INSERT_AT.   

References OMP_CLAUSE_CHAIN.

Referenced by omp_accumulate_sibling_list().

◆ omp_siblist_move_concat_nodes_after()

static tree * omp_siblist_move_concat_nodes_after ( tree first_new,
tree * last_new_tail,
tree * first_ptr,
tree last_node,
tree * move_after )
static
Concatenate two lists described by [FIRST_NEW, LAST_NEW_TAIL] and
  [FIRST_PTR, LAST_NODE], and insert them in the OMP clause list after chain
  pointer MOVE_AFTER.

  The latter list was previously part of the OMP clause list, and the former
  (prepended) part is comprised of new nodes.

  We start with a list of nodes starting with a struct mapping node.  We
  rearrange the list so that new nodes starting from FIRST_NEW and whose last
  node's chain is LAST_NEW_TAIL comes directly after MOVE_AFTER, followed by
  the group of mapping nodes we are currently processing (from the chain
  FIRST_PTR to LAST_NODE).  The return value is the pointer to the next chain
  we should continue processing from, or NULL to stay where we were.

  The transformation (in the case where MOVE_AFTER and FIRST_PTR are
  different) is worked through below.  Here we are processing LAST_NODE, and
  FIRST_PTR points at the preceding mapping clause:

 #. mapping node                chain
 ---------------------------------------------------
 A. struct_node         [->B]
 B. comp_1                      [->C]
 C. comp_2                      [->D (move_after)]
 D. map_to_3                    [->E]
 E. attach_3                    [->F (first_ptr)]
 F. map_to_4                    [->G (continue_at)]
 G. attach_4 (last_node)        [->H]
 H. ...

    *last_new_tail = *first_ptr;

 I. new_node (first_new)        [->F (last_new_tail)]

    *first_ptr = OMP_CLAUSE_CHAIN (last_node)

 #. mapping node                chain
 ----------------------------------------------------
 A. struct_node         [->B]
 B. comp_1                      [->C]
 C. comp_2                      [->D (move_after)]
 D. map_to_3                    [->E]
 E. attach_3                    [->H (first_ptr)]
 F. map_to_4                    [->G (continue_at)]
 G. attach_4 (last_node)        [->H]
 H. ...

 I. new_node (first_new)        [->F  (last_new_tail)]

    OMP_CLAUSE_CHAIN (last_node) = *move_after;

 #. mapping node                chain
 ---------------------------------------------------
 A. struct_node         [->B]
 B. comp_1                      [->C]
 C. comp_2                      [->D (move_after)]
 D. map_to_3                    [->E]
 E. attach_3                    [->H (continue_at)]
 F. map_to_4                    [->G]
 G. attach_4 (last_node)        [->D]
 H. ...

 I. new_node (first_new)        [->F  (last_new_tail)]

    *move_after = first_new;

 #. mapping node                chain
 ---------------------------------------------------
 A. struct_node         [->B]
 B. comp_1                      [->C]
 C. comp_2                      [->I (move_after)]
 D. map_to_3                    [->E]
 E. attach_3                    [->H (continue_at)]
 F. map_to_4                    [->G]
 G. attach_4 (last_node)        [->D]
 H. ...
 I. new_node (first_new)        [->F (last_new_tail)]

 or, in order:

 #. mapping node                chain
 ---------------------------------------------------
 A. struct_node         [->B]
 B. comp_1                      [->C]
 C. comp_2                      [->I (move_after)]
 I. new_node (first_new)        [->F (last_new_tail)]
 F. map_to_4                    [->G]
 G. attach_4 (last_node)        [->D]
 D. map_to_3                    [->E]
 E. attach_3                    [->H (continue_at)]
 H. ...

References NULL, and OMP_CLAUSE_CHAIN.

Referenced by omp_accumulate_sibling_list().

◆ omp_siblist_move_node_after()

static void omp_siblist_move_node_after ( tree node,
tree * old_pos,
tree * move_after )
static
Move NODE (which is currently pointed to by the chain OLD_POS) so it is
pointed to by chain MOVE_AFTER instead.   

References gcc_assert, and OMP_CLAUSE_CHAIN.

Referenced by omp_accumulate_sibling_list().

◆ omp_siblist_move_nodes_after()

static tree * omp_siblist_move_nodes_after ( tree * first_ptr,
tree last_node,
tree * move_after )
static
Move nodes from FIRST_PTR (pointed to by previous node's chain) to
LAST_NODE to after MOVE_AFTER chain.  Similar to below function, but no
new nodes are prepended to the list before splicing into the new position.
Return the position we should continue scanning the list at, or NULL to
stay where we were.   

References NULL, and OMP_CLAUSE_CHAIN.

Referenced by omp_accumulate_sibling_list().

◆ omp_tsort_mapping_groups()

static omp_mapping_group * omp_tsort_mapping_groups ( vec< omp_mapping_group > * groups,
hash_map< tree_operand_hash_no_se, omp_mapping_group * > * grpmap,
bool enter_exit_data )
static
Topologically sort GROUPS, so that OMP 5.0-defined base pointers come
  before mappings that use those pointers.  This is an implementation of the
  depth-first search algorithm, described e.g. at:

    https://en.wikipedia.org/wiki/Topological_sorting

References FOR_EACH_VEC_ELT, omp_mapping_group::grp_start, i, omp_mapping_group::mark, NULL, OMP_CLAUSE_MAP_RUNTIME_IMPLICIT_P, omp_tsort_mapping_groups_1(), and PERMANENT.

Referenced by gimplify_adjust_omp_clauses().

◆ omp_tsort_mapping_groups_1()

◆ optimize_compound_literals_in_ctor()

static tree optimize_compound_literals_in_ctor ( tree orig_ctor)
static
Optimize embedded COMPOUND_LITERAL_EXPRs within a CONSTRUCTOR,
return a new CONSTRUCTOR if something changed.   

References COMPOUND_LITERAL_EXPR_DECL_EXPR, CONSTRUCTOR_ELTS, copy_node(), DECL_EXPR_DECL, DECL_INITIAL, optimize_compound_literals_in_ctor(), TREE_ADDRESSABLE, TREE_CODE, vec_safe_copy(), and vec_safe_length().

Referenced by gimplify_init_constructor(), and optimize_compound_literals_in_ctor().

◆ optimize_target_teams()

static void optimize_target_teams ( tree target,
gimple_seq * pre_p )
static
Try to determine if the num_teams and/or thread_limit expressions
can have their values determined already before entering the
target construct.
INTEGER_CSTs trivially are,
integral decls that are firstprivate (explicitly or implicitly)
or explicitly map(always, to:) or map(always, tofrom:) on the target
region too, and expressions involving simple arithmetics on those
too, function calls are not ok, dereferencing something neither etc.
Add NUM_TEAMS and THREAD_LIMIT clauses to the OMP_CLAUSES of
EXPR based on what we find:
0 stands for clause not specified at all, use implementation default
-1 stands for value that can't be determined easily before entering
   the target construct.
-2 means that no explicit teams construct was specified
If teams construct is not present at all, use 1 for num_teams
and 0 for thread_limit (only one team is involved, and the thread
limit is implementation defined.   

References build_int_cst(), build_omp_clause(), computable_teams_clause(), DECL_P, expr, EXPR_LOCATION, fb_rvalue, find_omp_teams(), gimplify_expr(), gimplify_omp_ctxp, GS_ERROR, integer_minus_one_node, integer_type_node, integer_zero_node, is_gimple_val(), NULL, NULL_TREE, OMP_BODY, OMP_CLAUSE_CHAIN, OMP_CLAUSE_CODE, OMP_CLAUSE_LOCATION, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_NUM_TEAMS_LOWER_EXPR, OMP_CLAUSE_NUM_TEAMS_UPPER_EXPR, OMP_CLAUSE_OPERAND, OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_THREAD_LIMIT_EXPR, omp_find_clause(), OMP_TARGET_CLAUSES, OMP_TEAMS_CLAUSES, gimplify_omp_ctx::outer_context, TREE_CODE, and walk_tree.

Referenced by gimplify_omp_workshare().

◆ pop_gimplify_context()

◆ prepare_gimple_addressable()

static void prepare_gimple_addressable ( tree * expr_p,
gimple_seq * seq_p )
static
Prepare the node pointed to by EXPR_P, an is_gimple_addressable expression,
to be marked addressable.

We cannot rely on such an expression being directly markable if a temporary
has been created by the gimplification.  In this case, we create another
temporary and initialize it with a copy, which will become a store after we
mark it addressable.  This can happen if the front-end passed us something
that it could not mark addressable yet, like a Fortran pass-by-reference
parameter (int) floatvar.   

References handled_component_p(), internal_get_tmp_var(), is_gimple_reg(), NULL, and TREE_OPERAND.

Referenced by gimplify_addr_expr(), gimplify_asm_expr(), gimplify_compound_lval(), and gimplify_modify_expr_to_memcpy().

◆ prune_expr_location()

static tree prune_expr_location ( tree * tp,
int * walk_subtrees,
void *  )
static
Worker for unshare_expr_without_location.   

References EXPR_P, NULL_TREE, SET_EXPR_LOCATION, and UNKNOWN_LOCATION.

Referenced by unshare_expr_without_location().

◆ push_gimplify_context()

◆ recalculate_side_effects()

◆ reset_cond_uid()

static void reset_cond_uid ( )
static
Reset the condition uid to the value it should have when compiling a new
function.  0 is already the default/untouched value, so start at non-zero.
A valid and set id should always be > 0.  This is used for condition
coverage.   

References nextconduid.

Referenced by gimplify_function_tree().

◆ rexpr_has_location()

static bool rexpr_has_location ( tree expr)
inlinestatic
Return TRUE iff EXPR (maybe recursively) has a location; see
rexpr_location for the potential recursion.   

References rexpr_location(), and UNKNOWN_LOCATION.

Referenced by gimplify_cond_expr(), and shortcut_cond_expr().

◆ rexpr_location()

static location_t rexpr_location ( tree expr,
location_t or_else = UNKNOWN_LOCATION )
static
Return the EXPR_LOCATION of EXPR, if it (maybe recursively) has
one, OR_ELSE otherwise.  The location of a STATEMENT_LISTs
comprising at least one DEBUG_BEGIN_STMT followed by exactly one
EXPR is the location of the EXPR.   

References EXPR_HAS_LOCATION, EXPR_LOCATION, i, rexpr_location(), TREE_CODE, tsi_end_p(), tsi_next(), tsi_one_before_end_p(), tsi_start(), and tsi_stmt().

Referenced by gimplify_cond_expr(), rexpr_has_location(), rexpr_location(), shortcut_cond_expr(), and shortcut_cond_r().

◆ rhs_predicate_for()

◆ shortcut_cond_expr()

static tree shortcut_cond_expr ( tree expr,
unsigned condition_uid )
static
Given a conditional expression EXPR with short-circuit boolean
predicates using TRUTH_ANDIF_EXPR or TRUTH_ORIF_EXPR, break the
predicate apart into the equivalent sequence of conditionals.  CONDITION_UID
is a the tag/discriminator for this EXPR - all basic conditions in the
expression will be given the same CONDITION_UID.   

References append_to_statement_list(), block_may_fallthru(), build1(), build3(), build_and_jump(), expr, expr_last(), EXPR_LOC_OR_LOC, find_goto_label(), GOTO_DESTINATION, input_location, LABEL_EXPR_LABEL, last, NULL, NULL_TREE, rexpr_has_location(), rexpr_location(), SET_EXPR_LOCATION, shortcut_cond_expr(), shortcut_cond_r(), tag_shortcut_cond(), tree_associate_condition_with_expr(), TREE_CODE, TREE_OPERAND, TREE_SIDE_EFFECTS, and void_type_node.

Referenced by gimplify_cond_expr(), and shortcut_cond_expr().

◆ shortcut_cond_r()

static tree shortcut_cond_r ( tree pred,
tree * true_label_p,
tree * false_label_p,
location_t locus,
unsigned condition_uid )
static
Handle shortcut semantics in the predicate operand of a COND_EXPR by
rewriting it into multiple COND_EXPRs, and possibly GOTO_EXPRs.

TRUE_LABEL_P and FALSE_LABEL_P point to the labels to jump to if the
condition is true or false, respectively.  If null, we should generate
our own to skip over the evaluation of this specific expression.

LOCUS is the source location of the COND_EXPR.

The condition_uid is a discriminator tag for condition coverage used to map
conditions to its corresponding full Boolean function.

This function is the tree equivalent of do_jump.

shortcut_cond_r should only be called by shortcut_cond_expr.   

References append_to_statement_list(), build1(), build3(), build_and_jump(), expr, NULL, NULL_TREE, rexpr_location(), SET_EXPR_LOCATION, shortcut_cond_r(), tree_associate_condition_with_expr(), TREE_CODE, TREE_OPERAND, TREE_TYPE, void_type_node, and VOID_TYPE_P.

Referenced by shortcut_cond_expr(), and shortcut_cond_r().

◆ should_warn_for_implicit_fallthrough()

static bool should_warn_for_implicit_fallthrough ( gimple_stmt_iterator * gsi_p,
tree label )
static
Return true if the switch fallthough warning should occur.  LABEL is
the label statement that we're falling through to.   

References as_a(), case_label_p(), gimplify_ctx::case_labels, FALLTHROUGH_LABEL_P, gimple_label_label(), gimplify_ctxp, gsi_end_p(), gsi_next_nondebug(), gsi_stmt(), and label_entry::label.

Referenced by warn_implicit_fallthrough_r().

◆ sort_by_decl_uid()

static int sort_by_decl_uid ( const void * a,
const void * b )
static
Sort pair of VAR_DECLs A and B by DECL_UID.   

References a, b, and DECL_UID.

Referenced by asan_poison_variables().

◆ splay_tree_compare_decl_uid()

static int splay_tree_compare_decl_uid ( splay_tree_key xa,
splay_tree_key xb )
static
A stable comparison routine for use with splay trees and DECLs.   

References a, b, and DECL_UID.

Referenced by new_omp_context().

◆ tag_shortcut_cond()

static void tag_shortcut_cond ( tree pred,
unsigned condition_uid )
static
Given a multi-term condition (ANDIF, ORIF), walk the predicate PRED and tag
every basic condition with CONDITION_UID.  Two basic conditions share the
CONDITION_UID discriminator when they belong to the same predicate, which is
used by the condition coverage.  Doing this as an explicit step makes for a
simpler implementation than weaving it into the splitting code as the
splitting code eventually calls the entry point gimplfiy_expr which makes
bookkeeping complicated.   

References tag_shortcut_cond(), tree_associate_condition_with_expr(), TREE_CODE, and TREE_OPERAND.

Referenced by shortcut_cond_expr(), and tag_shortcut_cond().

◆ tree_associate_condition_with_expr()

static void tree_associate_condition_with_expr ( tree stmt,
unsigned uid )
static
Associate the condition STMT with the discriminator UID.  STMTs that are
broken down with ANDIF/ORIF from the same Boolean expression should be given
the same UID; 'if (a && b && c) { if (d || e) ... } ...' should yield the
{ a: 1, b: 1, c: 1, d: 2, e: 2 } when gimplification is done.  This is used
for condition coverage.   

References cond_uids, and hash_map< KeyId, Value, Traits >::put().

Referenced by shortcut_cond_expr(), shortcut_cond_r(), and tag_shortcut_cond().

◆ unmark_visited()

static void unmark_visited ( tree * tp)
inlinestatic
Unmark the visited trees rooted at *TP.   

References NULL, unmark_visited_r(), and walk_tree.

Referenced by unvisit_body().

◆ unmark_visited_r()

static tree unmark_visited_r ( tree * tp,
int * walk_subtrees,
void * data )
static
Callback for walk_tree to unmark the visited trees rooted at *TP.
Subtrees are walked until the first unvisited node is encountered.   

References NULL_TREE, and TREE_VISITED.

Referenced by unmark_visited().

◆ unshare_body()

static void unshare_body ( tree fndecl)
static
Unshare all the trees in the body of FNDECL, as well as in the bodies of
any nested functions.   

References copy_if_shared(), symtab_node::decl, DECL_RESULT, DECL_SAVED_TREE, DECL_SIZE, DECL_SIZE_UNIT, lang_hooks::deep_unsharing, first_nested_function(), cgraph_node::get(), next_nested_function(), NULL, unshare_body(), and visited.

Referenced by gimplify_body(), and unshare_body().

◆ unshare_expr()

tree unshare_expr ( tree expr)
Unconditionally make an unshared copy of EXPR.  This is used when using
stored expressions which span multiple functions, such as BINFO_VTABLE,
as the normal unsharing process can't tell that they're shared.   

References expr, mostly_copy_tree_r(), NULL, and walk_tree.

Referenced by access_with_size_object_size(), add_iv_candidate_for_doloop(), add_parent_or_loop_num_clause(), adjust_before_returns_twice_call(), adjust_nested_loop_clauses(), analyze_ref(), build_check_stmt(), build_cltz_expr(), build_debug_ref_for_model(), build_omp_struct_comp_nodes(), build_outer_var_ref(), build_popcount_expr(), build_reconstructed_reference(), build_ref_for_offset(), loop_cand::classify_simple_reduction(), clear_padding_flush(), compute_doloop_base_on_mode(), cond_store_replacement(), convert_scalar_cond_reduction(), copy_tree_body_r(), create_mem_ref(), create_new_iv(), cse_and_gimplify_to_preheader(), determine_exit_conditions(), do_cond(), duplicate_insn_chain(), tree_switch_conversion::jump_table_cluster::emit(), execute_sm(), execute_sm_exit(), execute_sm_if_changed(), expand_complex_move(), expand_omp_atomic_mutex(), expand_omp_for_generic(), expand_omp_for_init_counts(), expand_omp_for_init_vars(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), expand_omp_ordered_sink(), expand_omp_simd(), extract_component(), extract_omp_for_update_vars(), final_value_replacement_loop(), find_interesting_uses_address(), finish_taskreg_remap(), finish_taskreg_scan(), fold_ctor_reference(), ccp_folder::fold_stmt(), fold_truth_andor_for_ifcombine(), forward_propagate_addr_expr_1(), forward_propagate_into_gimple_cond(), gather_mem_refs_stmt(), gen_counter_update(), gen_parallel_loop(), gen_phi_arg_condition(), gen_phi_nest_statement(), get_debug_computation_at(), get_string_length(), get_symbol_constant_value(), gimple_copy(), gimple_fold_stmt_to_constant_1(), gimple_gen_ic_profiler(), gimple_ic(), gimplify_adjust_omp_clauses_1(), gimplify_asm_expr(), gimplify_bind_expr(), gimplify_compound_lval(), gimplify_init_constructor(), gimplify_init_ctor_eval(), gimplify_init_ctor_eval_range(), gimplify_modify_expr(), gimplify_modify_expr_rhs(), gimplify_omp_depend(), gimplify_omp_for(), gimplify_omp_loop(), gimplify_one_sizepos(), gimplify_scan_omp_clauses(), gimplify_var_or_parm_decl(), gimplify_variable_sized_compare(), strlen_pass::handle_builtin_strcat(), strlen_pass::handle_builtin_strchr(), strlen_pass::handle_builtin_strcpy(), strlen_pass::handle_builtin_strlen(), increment_start_addr(), initialize_constant_pool_replacements(), insert_debug_temp_for_var_def(), insert_init_debug_bind(), insert_into_preds_of_block(), instrument_decisions(), instrument_expr(), tree_loop_interchange::interchange_loops(), internal_get_tmp_var(), ipa_simd_modify_function_body(), ipa_simd_modify_stmt_ops(), issue_prefetch_ref(), lower_bitfield(), lower_emutls_1(), lower_lastprivate_clauses(), lower_oacc_reductions(), lower_omp_for_lastprivate(), lower_omp_for_scan(), lower_omp_scan(), lower_omp_target(), lower_omp_task_reductions(), lower_rec_input_clauses(), lower_reduction_clauses(), lower_send_clauses(), lower_send_shared_vars(), make_bit_field_load(), make_region_loop_nest(), make_region_seq(), tree_loop_interchange::map_inductions_to_loop(), maybe_move_debug_stmts_to_successors(), maybe_with_size_expr(), ipa_param_adjustments::modify_call(), move_stmt_op(), omp_accumulate_sibling_list(), omp_mark_declare_variant(), omp_oacc_kernels_decompose_1(), optimize_range_tests_to_bit_test(), optimize_vector_load(), phiprop_insert_phi(), predicate_bbs(), predicate_scalar_phi(), predicate_statements(), pcom_worker::prepare_finalizers_chain(), prepare_target_mem_ref_lvalue(), propagate_tree_value(), record_equivalences_from_stmt(), record_reference(), ref_at_iteration(), remap_decl(), remap_gimple_stmt(), remap_ssa_name(), remove_dead_stmt(), remove_unused_ivs(), replace_block_vars_by_duplicates(), replace_exp(), replace_ref_with(), replace_with_mapped_expr(), rewrite_phi_with_iv(), rewrite_to_non_trapping_overflow(), rewrite_use_compare(), scan_omp_for(), set_mem_attributes_minus_bitpos(), simplify_permutation(), simplify_replace_tree(), split_function(), sra_modify_assign(), std_gimplify_va_arg_expr(), take_address_of(), tm_log_emit_restores(), tm_log_emit_saves(), transform_kernels_loop_clauses(), tree_unswitch_loop(), unshare_aff_combination(), unshare_and_remap(), unshare_and_remap_1(), update_range_test(), vect_analyze_data_refs(), vect_build_loop_niters(), vect_create_addr_base_for_vector_ref(), vect_create_nonlinear_iv_vec_step(), vect_get_loop_niters(), vect_get_strided_load_store_ops(), vect_is_simple_iv_evolution(), vect_loop_versioning(), vect_transform_loop(), vect_update_ivs_after_vectorizer(), vectorizable_induction(), vectorizable_load(), vectorizable_scan_store(), vectorizable_simd_clone_call(), vectorizable_store(), rt_bb_visited::visit(), and rt_bb_visited::vset().

◆ unshare_expr_without_location()

◆ unvisit_body()

static void unvisit_body ( tree fndecl)
static

◆ voidify_wrapper_expr()

tree voidify_wrapper_expr ( tree wrapper,
tree temp )
WRAPPER is a code such as BIND_EXPR or CLEANUP_POINT_EXPR which can both
contain statements and have a value.  Assign its value to a temporary
and give it void_type_node.  Return the temporary, or NULL_TREE if
WRAPPER was already void.   

References BIND_EXPR_BODY, build2(), create_tmp_var, gcc_assert, i, IS_EMPTY_STMT, NULL, NULL_TREE, TRANSACTION_EXPR_BODY, TREE_CODE, TREE_OPERAND, TREE_SIDE_EFFECTS, TREE_TYPE, tsi_end_p(), tsi_last(), tsi_stmt_ptr(), void_type_node, and VOID_TYPE_P.

Referenced by gimplify_bind_expr(), gimplify_cleanup_point_expr(), gimplify_modify_expr_rhs(), gimplify_statement_list(), and gimplify_transaction().

◆ warn_implicit_fallthrough_r()

◆ warn_switch_unreachable_and_auto_init_r()

Variable Documentation

◆ asan_poisoned_variables

hash_set<tree>* asan_poisoned_variables = NULL
static
Hash set of poisoned variables in a bind expr.   

Referenced by gimplify_bind_expr(), gimplify_decl_expr(), gimplify_expr(), gimplify_function_tree(), and gimplify_target_expr().

◆ cond_uids

hash_map<tree, unsigned>* cond_uids
static
Annotated gconds so that basic conditions in the same expression map to
the same uid.  This is used for condition coverage.   

Referenced by gimplify_cond_expr(), gimplify_function_tree(), and tree_associate_condition_with_expr().

◆ ctx_pool

struct gimplify_ctx* ctx_pool = NULL
static
Pointer to a list of allocated gimplify_ctx structs to be used for pushing
and popping gimplify contexts.   

Referenced by ctx_alloc(), ctx_free(), and free_gimplify_stack().

◆ gimplify_ctxp

◆ gimplify_omp_ctxp

◆ in_omp_construct

bool in_omp_construct
static

◆ nextconduid

unsigned nextconduid = 1
static
Tree lowering pass.  This pass converts the GENERIC functions-as-trees
   tree representation into the GIMPLE form.
   Copyright (C) 2002-2024 Free Software Foundation, Inc.
   Major work done by Sebastian Pop <s.pop@laposte.net>,
   Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@redhat.com>.

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/>.   
Identifier for a basic condition, mapping it to other basic conditions of
its Boolean expression.  Basic conditions given the same uid (in the same
function) are parts of the same ANDIF/ORIF expression.  Used for condition
coverage.   

Referenced by next_cond_uid(), and reset_cond_uid().

◆ oacc_declare_returns

hash_map<tree, tree>* oacc_declare_returns
static