diff options
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 2c776836ce6..a594d4d5dab 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -1050,12 +1050,12 @@ access_can_touch_variable (tree ref, tree alias, HOST_WIDE_INT offset, /* If ALIAS is .GLOBAL_VAR then the memory reference REF must be using a call-clobbered memory tag. By definition, call-clobbered memory tags can always touch .GLOBAL_VAR. */ - if (alias == global_var) + if (alias == gimple_global_var (cfun)) return true; /* We cannot prune nonlocal aliases because they are not type specific. */ - if (alias == nonlocal_all) + if (alias == gimple_nonlocal_all (cfun)) return true; /* If ALIAS is an SFT, it can't be touched if the offset @@ -1317,7 +1317,7 @@ add_virtual_operand (tree var, stmt_ann_t s_ann, int flags, set on it, or else we will get the wrong answer on clobbers. */ if (none_added - && !updating_used_alone && aliases_computed_p + && !updating_used_alone && gimple_aliases_computed_p (cfun) && TREE_CODE (var) == SYMBOL_MEMORY_TAG) gcc_assert (SMT_USED_ALONE (var)); @@ -1552,9 +1552,10 @@ add_call_clobber_ops (tree stmt, tree callee) /* If we created .GLOBAL_VAR earlier, just use it. See compute_may_aliases for the heuristic used to decide whether to create .GLOBAL_VAR or not. */ - if (global_var) + if (gimple_global_var (cfun)) { - add_stmt_operand (&global_var, s_ann, opf_is_def); + tree var = gimple_global_var (cfun); + add_stmt_operand (&var, s_ann, opf_is_def); return; } @@ -1564,7 +1565,7 @@ add_call_clobber_ops (tree stmt, tree callee) not_read_b = callee ? ipa_reference_get_not_read_global (callee) : NULL; not_written_b = callee ? ipa_reference_get_not_written_global (callee) : NULL; /* Add a V_MAY_DEF operand for every call clobbered variable. */ - EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, u, bi) + EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, u, bi) { tree var = referenced_var_lookup (u); unsigned int escape_mask = var_ann (var)->escape_mask; @@ -1633,16 +1634,17 @@ add_call_read_ops (tree stmt, tree callee) /* if the function is not pure, it may reference memory. Add a VUSE for .GLOBAL_VAR if it has been created. See add_referenced_var for the heuristic used to decide whether to create .GLOBAL_VAR. */ - if (global_var) + if (gimple_global_var (cfun)) { - add_stmt_operand (&global_var, s_ann, opf_none); + tree var = gimple_global_var (cfun); + add_stmt_operand (&var, s_ann, opf_none); return; } not_read_b = callee ? ipa_reference_get_not_read_global (callee) : NULL; /* Add a VUSE for each call-clobbered variable. */ - EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, u, bi) + EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, u, bi) { tree var = referenced_var (u); tree real_var = var; @@ -1688,8 +1690,8 @@ get_call_expr_operands (tree stmt, tree expr) computed. By not bothering with virtual operands for CALL_EXPRs we avoid adding superfluous virtual operands, which can be a significant compile time sink (See PR 15855). */ - if (aliases_computed_p - && !bitmap_empty_p (call_clobbered_vars) + if (gimple_aliases_computed_p (cfun) + && !bitmap_empty_p (gimple_call_clobbered_vars (cfun)) && !(call_flags & ECF_NOVOPS)) { /* A 'pure' or a 'const' function never call-clobbers anything. @@ -1776,17 +1778,20 @@ get_asm_expr_operands (tree stmt) /* Clobber all call-clobbered variables (or .GLOBAL_VAR if we decided to group them). */ - if (global_var) - add_stmt_operand (&global_var, s_ann, opf_is_def); + if (gimple_global_var (cfun)) + { + tree var = gimple_global_var (cfun); + add_stmt_operand (&var, s_ann, opf_is_def); + } else - EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi) + EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi) { tree var = referenced_var (i); add_stmt_operand (&var, s_ann, opf_is_def | opf_non_specific); } /* Now clobber all addressables. */ - EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i, bi) + EXECUTE_IF_SET_IN_BITMAP (gimple_addressable_vars (cfun), 0, i, bi) { tree var = referenced_var (i); |