[llvm-commits] [llvm] r66826 - in /llvm/trunk: lib/Transforms/Scalar/CodeGenPrepare.cpp test/CodeGen/X86/split-eh-lpad-edges.ll

Duncan Sands baldrick at free.fr
Thu Mar 12 14:13:42 PDT 2009


Author: baldrick
Date: Thu Mar 12 16:13:42 2009
New Revision: 66826

URL: http://llvm.org/viewvc/llvm-project?rev=66826&view=rev
Log:
Revert commit 66140 since it caused several failures
in the Ada testcase.  Reverting this only covers up
the real problem, which is a nasty conceptual difficulty
in the phi elimination pass: when eliminating phi nodes
in landing pads, the register copies need to come before
the invoke, not at the end of the basic block which is
too late...  See PR3784.

Modified:
    llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
    llvm/trunk/test/CodeGen/X86/split-eh-lpad-edges.ll

Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=66826&r1=66825&r2=66826&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Thu Mar 12 16:13:42 2009
@@ -327,12 +327,6 @@
   assert(isa<PHINode>(Dest->begin()) &&
          "This should only be called if Dest has a PHI!");
 
-  // Do not split edges to EH landing pads.
-  if (InvokeInst *Invoke = dyn_cast<InvokeInst>(TI)) {
-    if (Invoke->getSuccessor(1) == Dest)
-      return;
-  }
-
   // As a hack, never split backedges of loops.  Even though the copy for any
   // PHIs inserted on the backedge would be dead for exits from the loop, we
   // assume that the cost of *splitting* the backedge would be too high.

Modified: llvm/trunk/test/CodeGen/X86/split-eh-lpad-edges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/split-eh-lpad-edges.ll?rev=66826&r1=66825&r2=66826&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/split-eh-lpad-edges.ll (original)
+++ llvm/trunk/test/CodeGen/X86/split-eh-lpad-edges.ll Thu Mar 12 16:13:42 2009
@@ -1,5 +1,6 @@
 ; RUN: llvm-as < %s | llc -mtriple=x86_64-apple-darwin | not grep jmp
 ; rdar://6647639
+; XFAIL: *
 
 	%struct.FetchPlanHeader = type { i8*, i8*, i32, i8*, i8*, i8*, i8*, i8*, %struct.NSObject* (%struct.NSObject*, %struct.objc_selector*, ...)*, %struct.__attributeDescriptionFlags }
 	%struct.NSArray = type { %struct.NSObject }





More information about the llvm-commits mailing list