From 9f1363cd0d72667eac019840e929e64431ee5d4e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 16 Dec 2013 09:09:05 +0100 Subject: re PR middle-end/58956 (wrong code at -O1 and above (affecting gcc 4.6 to trunk)) PR middle-end/58956 PR middle-end/59470 * gimple-walk.h (walk_stmt_load_store_addr_fn): New typedef. (walk_stmt_load_store_addr_ops, walk_stmt_load_store_ops): Use it for callback params. * gimple-walk.c (walk_stmt_load_store_ops): Likewise. (walk_stmt_load_store_addr_ops): Likewise. Adjust all callback calls to supply the gimple operand containing the base tree as an extra argument. * tree-ssa-ter.c: Include gimple-walk.h. (find_ssaname, find_ssaname_in_store): New helper functions. (find_replaceable_in_bb): For calls or GIMPLE_ASM, only set same_root_var if USE is used somewhere in the stores of the stmt. * ipa-prop.c (visit_ref_for_mod_analysis): Remove name of the stmt argument and ATTRIBUTE_UNUSED, add another unnamed tree argument. * ipa-pure-const.c (check_load, check_store, check_ipa_load, check_ipa_store): Likewise. * gimple.c (gimple_ior_addresses_taken_1, check_loadstore): Likewise. * ipa-split.c (test_nonssa_use, mark_nonssa_use): Likewise. (verify_non_ssa_vars, visit_bb): Adjust their callers. * cfgexpand.c (add_scope_conflicts_1): Use walk_stmt_load_store_addr_fn type for visit variable. (visit_op, visit_conflict): Remove name of the stmt argument and ATTRIBUTE_UNUSED, add another unnamed tree argument. * tree-sra.c (asm_visit_addr): Likewise. Remove name of the data argument and ATTRIBUTE_UNUSED. * cgraphbuild.c (mark_address, mark_load, mark_store): Add another unnamed tree argument. * gimple-ssa-isolate-paths.c (check_loadstore): Likewise. Remove ATTRIBUTE_UNUSED from stmt parameter. * gcc.target/i386/pr59470.c: New test. From-SVN: r206009 --- gcc/cgraphbuild.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/cgraphbuild.c') diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index f1595fd..bf790b0 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -224,7 +224,7 @@ compute_call_stmt_bb_frequency (tree decl, basic_block bb) /* Mark address taken in STMT. */ static bool -mark_address (gimple stmt, tree addr, void *data) +mark_address (gimple stmt, tree addr, tree, void *data) { addr = get_base_address (addr); if (TREE_CODE (addr) == FUNCTION_DECL) @@ -251,7 +251,7 @@ mark_address (gimple stmt, tree addr, void *data) /* Mark load of T. */ static bool -mark_load (gimple stmt, tree t, void *data) +mark_load (gimple stmt, tree t, tree, void *data) { t = get_base_address (t); if (t && TREE_CODE (t) == FUNCTION_DECL) @@ -279,7 +279,7 @@ mark_load (gimple stmt, tree t, void *data) /* Mark store of T. */ static bool -mark_store (gimple stmt, tree t, void *data) +mark_store (gimple stmt, tree t, tree, void *data) { t = get_base_address (t); if (t && TREE_CODE (t) == VAR_DECL -- cgit v1.1