diff options
author | Richard Biener <rguenther@suse.de> | 2013-12-02 15:13:52 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-12-02 15:13:52 +0000 |
commit | 75fcf2876f2e3746137e939deec4cf2cff602d02 (patch) | |
tree | f779301d102df611bffba5be6472dcc27901adb3 /gcc/tree-ssa-operands.c | |
parent | 1656a814242d64c040c4d638b280fc6405346af9 (diff) | |
download | gcc-75fcf2876f2e3746137e939deec4cf2cff602d02.zip gcc-75fcf2876f2e3746137e939deec4cf2cff602d02.tar.gz gcc-75fcf2876f2e3746137e939deec4cf2cff602d02.tar.bz2 |
tree-ssa-operands.c (opf_implicit): Remove.
2013-12-02 Richard Biener <rguenther@suse.de>
* tree-ssa-operands.c (opf_implicit): Remove.
(opf_address_taken): New flag.
(get_expr_operands): Remove early out, pass down
opf_address_taken for ADDR_EXPRs, add a use operand only
for non-opf_address_taken bases.
(get_indirect_ref_operands): Rename to ...
(get_mem_ref_operands): ... this.
(get_asm_expr_operands): Rename to ...
(get_asm_stmt_operands): ... this.
From-SVN: r205587
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 9a7002c..84ec002 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -105,17 +105,15 @@ along with GCC; see the file COPYING3. If not see VUSE for 'b'. */ #define opf_no_vops (1 << 1) -/* Operand is an implicit reference. This is used to distinguish - explicit assignments in the form of MODIFY_EXPR from - clobbering sites like function calls or ASM_EXPRs. */ -#define opf_implicit (1 << 2) - /* Operand is in a place where address-taken does not imply addressable. */ #define opf_non_addressable (1 << 3) /* Operand is in a place where opf_non_addressable does not apply. */ #define opf_not_non_addressable (1 << 4) +/* Operand is having its address taken. */ +#define opf_address_taken (1 << 5) + /* Array for building all the use operands. */ static vec<tree> build_uses; @@ -597,8 +595,8 @@ mark_address_taken (tree ref) FLAGS is as in get_expr_operands. */ static void -get_indirect_ref_operands (struct function *fn, - gimple stmt, tree expr, int flags) +get_mem_ref_operands (struct function *fn, + gimple stmt, tree expr, int flags) { tree *pptr = &TREE_OPERAND (expr, 0); @@ -664,7 +662,7 @@ maybe_add_call_vops (struct function *fn, gimple stmt) /* Scan operands in the ASM_EXPR stmt referred to in INFO. */ static void -get_asm_expr_operands (struct function *fn, gimple stmt) +get_asm_stmt_operands (struct function *fn, gimple stmt) { size_t i, noutputs; const char **oconstraints; @@ -750,11 +748,6 @@ get_expr_operands (struct function *fn, gimple stmt, tree *expr_p, int flags) && !is_gimple_debug (stmt)) mark_address_taken (TREE_OPERAND (expr, 0)); - /* If the address is invariant, there may be no interesting - variable references inside. */ - if (is_gimple_min_invariant (expr)) - return; - /* Otherwise, there may be variables referenced inside but there should be no VUSEs created, since the referenced objects are not really accessed. The only operands that we should find @@ -762,14 +755,15 @@ get_expr_operands (struct function *fn, gimple stmt, tree *expr_p, int flags) (GIMPLE does not allow non-registers as array indices). */ flags |= opf_no_vops; get_expr_operands (fn, stmt, &TREE_OPERAND (expr, 0), - flags | opf_not_non_addressable); + flags | opf_not_non_addressable | opf_address_taken); return; case SSA_NAME: case VAR_DECL: case PARM_DECL: case RESULT_DECL: - add_stmt_operand (fn, expr_p, stmt, flags); + if (!(flags & opf_address_taken)) + add_stmt_operand (fn, expr_p, stmt, flags); return; case DEBUG_EXPR_DECL: @@ -777,7 +771,7 @@ get_expr_operands (struct function *fn, gimple stmt, tree *expr_p, int flags) return; case MEM_REF: - get_indirect_ref_operands (fn, stmt, expr, flags); + get_mem_ref_operands (fn, stmt, expr, flags); return; case TARGET_MEM_REF: @@ -921,7 +915,7 @@ parse_ssa_operands (struct function *fn, gimple stmt) switch (code) { case GIMPLE_ASM: - get_asm_expr_operands (fn, stmt); + get_asm_stmt_operands (fn, stmt); break; case GIMPLE_TRANSACTION: |