From 2f4ec87cdd756787336817e61fd6789d0f195a17 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 9 Aug 2012 11:00:11 +0000 Subject: 2012-08-09 Richard Guenther * 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 --- gcc/tree-ssa-operands.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'gcc/tree-ssa-operands.c') 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. -- cgit v1.2.1