diff options
author | Richard Guenther <rguenther@suse.de> | 2012-08-09 11:00:11 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-08-09 11:00:11 +0000 |
commit | 6738604187ed4202c2e042ec2cbf625bfa3e5f2b (patch) | |
tree | 84d551856d6816f8affe10aae4bb943fb33b73ea /gcc/tree-ssa-operands.c | |
parent | 4531d13af5d28054528cad273fc1eee41104b0e3 (diff) | |
download | gcc-6738604187ed4202c2e042ec2cbf625bfa3e5f2b.zip gcc-6738604187ed4202c2e042ec2cbf625bfa3e5f2b.tar.gz gcc-6738604187ed4202c2e042ec2cbf625bfa3e5f2b.tar.bz2 |
tree.h (SSA_VAR_P): Simplify.
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.
From-SVN: r190250
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 67e6f93..3a1f989 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. |