svn commit: r253192 - stable/9/contrib/llvm/lib/CodeGen/SelectionDAG

Dimitry Andric dim at FreeBSD.org
Thu Jul 11 06:48:54 UTC 2013


Author: dim
Date: Thu Jul 11 06:48:53 2013
New Revision: 253192
URL: http://svnweb.freebsd.org/changeset/base/253192

Log:
  MFC r253042:
  
  Pull in r185616 from llvm trunk:
  
    FastISel can only append to basic blocks.
  
    Compute the insertion point from the end of the basic block instead of
    skipping labels from the front.
  
    This caused failures in landing pads when live-in copies where inserted
    before instruction selection.
  
  I missed this change in r252720; without it, certain compilation flags
  can cause exception labels to not be generated, but still referenced,
  leading to link errors.
  
  Reported by:	zeising

Modified:
  stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
Directory Properties:
  stable/9/contrib/llvm/   (props changed)

Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
==============================================================================
--- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp	Thu Jul 11 05:58:28 2013	(r253191)
+++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp	Thu Jul 11 06:48:53 2013	(r253192)
@@ -75,15 +75,12 @@ STATISTIC(NumFastIselDead, "Number of de
 void FastISel::startNewBlock() {
   LocalValueMap.clear();
 
+  // Instructions are appended to FuncInfo.MBB. If the basic block already
+  // contains labels or copies, use the last instruction as the last local
+  // value.
   EmitStartPt = 0;
-
-  // Advance the emit start point past any EH_LABEL instructions.
-  MachineBasicBlock::iterator
-    I = FuncInfo.MBB->begin(), E = FuncInfo.MBB->end();
-  while (I != E && I->getOpcode() == TargetOpcode::EH_LABEL) {
-    EmitStartPt = I;
-    ++I;
-  }
+  if (!FuncInfo.MBB->empty())
+    EmitStartPt = &FuncInfo.MBB->back();
   LastLocalValue = EmitStartPt;
 }
 


More information about the svn-src-stable-9 mailing list