[llvm-commits] [dragonegg] r155113 - /dragonegg/trunk/src/Convert.cpp
Duncan Sands
baldrick at free.fr
Thu Apr 19 03:03:56 PDT 2012
Author: baldrick
Date: Thu Apr 19 05:03:56 2012
New Revision: 155113
URL: http://llvm.org/viewvc/llvm-project?rev=155113&view=rev
Log:
In gcc-4.7, to indicate that a variable is dead from that point on, a
constructor with TREE_CLOBBER_P is written to it. Turn this into a
no-op (another possibility is to output an llvm.lifetime.end intrinsic).
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=155113&r1=155112&r2=155113&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Thu Apr 19 05:03:56 2012
@@ -8145,6 +8145,16 @@
void TreeToLLVM::RenderGIMPLE_ASSIGN(gimple stmt) {
tree lhs = gimple_assign_lhs(stmt);
+
+#if (GCC_MINOR > 6)
+ // Assigning a right-hand side with TREE_CLOBBER_P says that the left-hand
+ // side is dead from this point on.
+ // TODO: Consider outputting an llvm.lifetime.end intrinsic to indicate this.
+ if (get_gimple_rhs_class(gimple_expr_code(stmt)) == GIMPLE_SINGLE_RHS &&
+ TREE_CLOBBER_P(gimple_assign_rhs1(stmt)))
+ return;
+#endif
+
if (isa<AGGREGATE_TYPE>(TREE_TYPE(lhs))) {
assert(get_gimple_rhs_class(gimple_expr_code(stmt)) == GIMPLE_SINGLE_RHS &&
"Aggregate type but rhs not simple!");
More information about the llvm-commits
mailing list