This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[TUPLES][PATCH] Fix bugs in walk_gimple_stmt callbacks.
- From: "=?big5?b?RG91ZyBLd2FuICjD9q62vHcp?=" <dougkwan at google dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>, "Diego Novillo" <dnovillo at google dot com>
- Date: Fri, 13 Jun 2008 00:45:15 -0700
- Subject: [TUPLES][PATCH] Fix bugs in walk_gimple_stmt callbacks.
Hi Deigo,
I am going to check in this trivial patch. I am mistakes when I
converted some tree_walk callbacks. The walk_subtrees parameter in a
tree_walk callback and the handle_ops_p paramater in a
walk_gimple_stmt callback have reversed semantics. I used the old
semantics in a few places.
-Doug
2008-06-13 Doug Kwan <dougkwan@google.com>
* ipa-reference.c (scan_stmt_for_static_refs): Rename walk_subtrees
parameter to handled_ops_p and correct bug of using walk_tree callback
semantics.
* ipa-pure-const.c (scan_function_stmt): Likewise.
* tree-inline.c (mark_local_labes_stmt): Rename walk_subtrees
parameter to handle_ops_p.
(replace_locals_stmt): Likewise.
-------------
Index: gcc/gcc/ipa-reference.c
===================================================================
--- gcc/gcc/ipa-reference.c (revision 136737)
+++ gcc/gcc/ipa-reference.c (working copy)
@@ -480,7 +480,7 @@ check_call (ipa_reference_local_vars_inf
should be converted to use the operand scanner. */
static tree
-scan_stmt_for_static_refs (gimple_stmt_iterator *gsip, bool *walk_subtrees,
+scan_stmt_for_static_refs (gimple_stmt_iterator *gsip, bool *handled_ops_p,
struct walk_stmt_info *data)
{
struct cgraph_node *fn = (struct cgraph_node *) data->info;
@@ -531,7 +531,7 @@ scan_stmt_for_static_refs (gimple_stmt_i
default:
break;
}
- *walk_subtrees = false;
+ *handled_ops_p = true;
}
break;
@@ -546,12 +546,12 @@ scan_stmt_for_static_refs (gimple_stmt_i
case GIMPLE_CALL:
check_call (local, stmt);
- *walk_subtrees = false;
+ *handled_ops_p = true;
break;
case GIMPLE_ASM:
get_asm_stmt_operands (local, stmt);
- *walk_subtrees = false;
+ *handled_ops_p = true;
break;
default:
Index: gcc/gcc/ipa-pure-const.c
===================================================================
--- gcc/gcc/ipa-pure-const.c (revision 136737)
+++ gcc/gcc/ipa-pure-const.c (working copy)
@@ -443,7 +443,7 @@ scan_function_op (tree *tp, int *walk_su
static tree
scan_function_stmt (gimple_stmt_iterator *gsi_p,
- bool *walk_subtrees,
+ bool *handled_ops_p,
struct walk_stmt_info *wi)
{
struct cgraph_node *fn = (struct cgraph_node *) wi->info;
@@ -498,7 +498,7 @@ scan_function_stmt (gimple_stmt_iterator
default:
break;
}
- *walk_subtrees = false;
+ *handled_ops_p = true;
}
break;
@@ -513,12 +513,12 @@ scan_function_stmt (gimple_stmt_iterator
case GIMPLE_CALL:
check_call (local, stmt);
- *walk_subtrees = false;
+ *handled_ops_p = true;
break;
case GIMPLE_ASM:
get_asm_expr_operands (local, stmt);
- *walk_subtrees = false;
+ *handled_ops_p = true;
break;
default:
Index: gcc/gcc/tree-inline.c
===================================================================
--- gcc/gcc/tree-inline.c (revision 136737)
+++ gcc/gcc/tree-inline.c (working copy)
@@ -3765,7 +3765,7 @@ unsave_expr_now (tree expr)
static tree
mark_local_labels_stmt (gimple_stmt_iterator *gsip,
- bool *walk_subtrees ATTRIBUTE_UNUSED,
+ bool *handled_ops_p ATTRIBUTE_UNUSED,
struct walk_stmt_info *wi)
{
copy_body_data *id = (copy_body_data *) wi->info;
@@ -3839,7 +3839,7 @@ replace_locals_op (tree *tp, int *walk_s
static tree
replace_locals_stmt (gimple_stmt_iterator *gsip,
- bool *walk_subtrees ATTRIBUTE_UNUSED,
+ bool *handled_ops_p ATTRIBUTE_UNUSED,
struct walk_stmt_info *wi)
{
copy_body_data *id = (copy_body_data *) wi->info;