This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;
 }
 
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]