This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tuples] change walk_gimple_stmt interface
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: dnovillo at google dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 4 Mar 2008 07:48:45 -0400
- Subject: Re: [tuples] change walk_gimple_stmt interface
- References: <20080304111432.GA19079@redhat.com>
And... I forgot to update the function comments.
Fixed thusly.
* gimple.c (walk_gimple_op): Update comment.
(walk_gimple_stmt): Same.
Index: gimple.c
===================================================================
--- gimple.c (revision 132856)
+++ gimple.c (working copy)
@@ -1177,8 +1177,18 @@ walk_gimple_asm (gimple stmt, walk_tree_
/* Helper function of WALK_GIMPLE_STMT. Walk every tree operand in
STMT. CALLBACK_OP and WI are as in WALK_GIMPLE_STMT.
- If the callback returns non-NULL for any operand, the remaining
- operands are not scanned. */
+ CALLBACK_OP is called on each operand of STMT via walk_tree.
+ Additional parameters to walk_tree must be stored in WI. For each operand
+ OP, walk_tree is called as:
+
+ walk_tree (&OP, CALLBACK_OP, WI, WI->PSET)
+
+ If CALLBACK_OP returns non-NULL for an operand, the remaining operands are
+ not scanned.
+
+ The return value is that returned by the last call to walk_tree, or
+ NULL_TREE if no CALLBACK_OP is specified. */
+
inline tree
walk_gimple_op (gimple stmt, walk_tree_fn callback_op,
struct walk_stmt_info *wi)
@@ -1362,23 +1372,18 @@ walk_gimple_op (gimple stmt, walk_tree_f
}
-/* Walk GIMPLE statement STMT (optionally using traversal state stored
- in WI). If WI is NULL, no state is kept during traversal.
- The callback CALLBACK_STMT is called. If CALLBACK_STMT returns
- true, it means that the callback function has handled all the
- operands of STMT and it is not necessary to walk STMT's operands.
+/* Walk the current statement in GSI (optionally using traversal state stored
+ in WI). If WI is NULL, no state is kept during traversal. The callback
+ CALLBACK_STMT is called. If CALLBACK_STMT returns true, it means that the
+ callback function has handled all the operands of the statement and it is
+ not necessary to walk its operands.
If CALLBACK_STMT is NULL or it returns false, CALLBACK_OP is called
- on each operand of STMT via walk_tree. Additional parameters to
- walk_tree must be stored in WI. For each operand OP, walk_tree is
- called as:
-
- walk_tree (&OP, CALLBACK_OP, WI, WI->PSET)
+ on each operand of the statement via walk_gimple_op. If walk_gimple_op
+ returns non-NULL for any operand, the remaining operands are not
+ scanned.
- If CALLBACK_OP returns non-NULL for an operand, the remaining
- operands are not scanned.
-
- The return value is that returned by the last call to walk_tree, or
+ The return value is that returned by the last call to walk_gimple_op, or
NULL_TREE if no CALLBACK_OP is specified. */
tree