This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
set SSA_NAME_DEF_STMT on gimple_assign_set_lhs
- From: "Rafael Espindola" <espindola at google dot com>
- To: GCC <gcc-patches at gcc dot gnu dot org>
- Cc: "Diego Novillo" <dnovillo at google dot com>
- Date: Fri, 25 Apr 2008 18:36:35 +0100
- Subject: set SSA_NAME_DEF_STMT on gimple_assign_set_lhs
This doesn't fix or introduces any regressions. It just makes the API
a bit easier to use.
OK for tuples if it bootstraps
Cheers,
--
Rafael Avila de Espindola
Google Ireland Ltd.
Gordon House
Barrow Street
Dublin 4
Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Index: gcc/gimple.c
===================================================================
--- gcc/gimple.c (revision 134669)
+++ gcc/gimple.c (working copy)
@@ -414,9 +414,6 @@
gimple_assign_set_rhs2 (p, op2);
}
- if (lhs && TREE_CODE (lhs) == SSA_NAME)
- SSA_NAME_DEF_STMT (lhs) = p;
-
return p;
}
Index: gcc/gimple.h
===================================================================
--- gcc/gimple.h (revision 134669)
+++ gcc/gimple.h (working copy)
@@ -1252,6 +1252,9 @@
GIMPLE_CHECK (gs, GIMPLE_ASSIGN);
gcc_assert (is_gimple_operand (lhs));
gimple_set_op (gs, 0, lhs);
+
+ if (lhs && TREE_CODE (lhs) == SSA_NAME)
+ SSA_NAME_DEF_STMT (lhs) = gs;
}