summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-09 11:00:11 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-09 11:00:11 +0000
commit2f4ec87cdd756787336817e61fd6789d0f195a17 (patch)
tree84d551856d6816f8affe10aae4bb943fb33b73ea /gcc/tree-ssa-operands.c
parent6c8a1d7dd42604be51237bb779c8fd74250dd5fe (diff)
downloadgcc-2f4ec87cdd756787336817e61fd6789d0f195a17.tar.gz
2012-08-09 Richard Guenther <rguenther@suse.de>
* tree.h (SSA_VAR_P): Simplify. * tree-ssanames.c (make_ssa_name_fn): Strengthen assert. * fold-const.c (fold_comparison): Check for default def first before checking for PARM_DECL. * tree-complex.c (get_component_ssa_name): Likewise. * tree-inline.c (remap_ssa_name): Likewise. * tree-ssa-loop-ivopts.c (parm_decl_cost): Likewise. * tree-ssa-structalias.c (get_fi_for_callee): Likewise. (find_what_p_points_to): Likewise. * tree-ssa-operands.c (add_stmt_operand): Simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190250 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 67e6f935972..3a1f989c8b7 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -615,19 +615,11 @@ add_virtual_operand (gimple stmt ATTRIBUTE_UNUSED, int flags)
static void
add_stmt_operand (tree *var_p, gimple stmt, int flags)
{
- tree var, sym;
+ tree var = *var_p;
gcc_assert (SSA_VAR_P (*var_p));
- var = *var_p;
- sym = (TREE_CODE (var) == SSA_NAME ? SSA_NAME_VAR (var) : var);
-
- /* Mark statements with volatile operands. */
- if (!(flags & opf_no_vops)
- && TREE_THIS_VOLATILE (sym))
- gimple_set_has_volatile_ops (stmt, true);
-
- if (is_gimple_reg (sym))
+ if (is_gimple_reg (var))
{
/* The variable is a GIMPLE register. Add it to real operands. */
if (flags & opf_def)
@@ -636,7 +628,15 @@ add_stmt_operand (tree *var_p, gimple stmt, int flags)
append_use (var_p);
}
else
- add_virtual_operand (stmt, flags);
+ {
+ /* Mark statements with volatile operands. */
+ if (!(flags & opf_no_vops)
+ && TREE_THIS_VOLATILE (var))
+ gimple_set_has_volatile_ops (stmt, true);
+
+ /* The variable is a memory access. Add virtual operands. */
+ add_virtual_operand (stmt, flags);
+ }
}
/* Mark the base address of REF as having its address taken.