aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-nrv.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2006-12-05 17:26:05 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2006-12-05 17:26:05 +0000
commit07beea0df36b29ef9acb27111eac0b0e92e181a5 (patch)
tree32d3ee1ddfcad180d619d756a84eeb0df779a6a2 /gcc/tree-nrv.c
parent3b8aab767b942e122caf583493d7cd858c091cde (diff)
downloadgcc-07beea0df36b29ef9acb27111eac0b0e92e181a5.zip
gcc-07beea0df36b29ef9acb27111eac0b0e92e181a5.tar.gz
gcc-07beea0df36b29ef9acb27111eac0b0e92e181a5.tar.bz2
Merge gimple-tuples-branch into mainline.
From-SVN: r119546
Diffstat (limited to 'gcc/tree-nrv.c')
-rw-r--r--gcc/tree-nrv.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c
index f51afdb..c33ff0e 100644
--- a/gcc/tree-nrv.c
+++ b/gcc/tree-nrv.c
@@ -133,10 +133,10 @@ tree_nrv (void)
if (ret_expr)
gcc_assert (ret_expr == result);
}
- else if (TREE_CODE (stmt) == MODIFY_EXPR
- && TREE_OPERAND (stmt, 0) == result)
+ else if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT
+ && GIMPLE_STMT_OPERAND (stmt, 0) == result)
{
- ret_expr = TREE_OPERAND (stmt, 1);
+ ret_expr = GIMPLE_STMT_OPERAND (stmt, 1);
/* Now verify that this return statement uses the same value
as any previously encountered return statement. */
@@ -197,9 +197,9 @@ tree_nrv (void)
{
tree *tp = bsi_stmt_ptr (bsi);
/* If this is a copy from VAR to RESULT, remove it. */
- if (TREE_CODE (*tp) == MODIFY_EXPR
- && TREE_OPERAND (*tp, 0) == result
- && TREE_OPERAND (*tp, 1) == found)
+ if (TREE_CODE (*tp) == GIMPLE_MODIFY_STMT
+ && GIMPLE_STMT_OPERAND (*tp, 0) == result
+ && GIMPLE_STMT_OPERAND (*tp, 1) == found)
bsi_remove (&bsi, true);
else
{
@@ -264,7 +264,7 @@ dest_safe_for_nrv_p (tree dest)
}
}
-/* Walk through the function looking for MODIFY_EXPRs with calls that
+/* Walk through the function looking for GIMPLE_MODIFY_STMTs with calls that
return in memory on the RHS. For each of these, determine whether it is
safe to pass the address of the LHS as the return slot, and mark the
call appropriately if so.
@@ -289,15 +289,15 @@ execute_return_slot_opt (void)
tree stmt = bsi_stmt (i);
tree call;
- if (TREE_CODE (stmt) == MODIFY_EXPR
- && (call = TREE_OPERAND (stmt, 1),
+ if (TREE_CODE (stmt) == GIMPLE_MODIFY_STMT
+ && (call = GIMPLE_STMT_OPERAND (stmt, 1),
TREE_CODE (call) == CALL_EXPR)
&& !CALL_EXPR_RETURN_SLOT_OPT (call)
&& aggregate_value_p (call, call))
/* Check if the location being assigned to is
call-clobbered. */
CALL_EXPR_RETURN_SLOT_OPT (call) =
- dest_safe_for_nrv_p (TREE_OPERAND (stmt, 0)) ? 1 : 0;
+ dest_safe_for_nrv_p (GIMPLE_STMT_OPERAND (stmt, 0)) ? 1 : 0;
}
}
return 0;