When optimizing with debug info, don't keep the
authorDale Johannesen <dalej@apple.com>
Wed, 25 Mar 2009 17:36:08 +0000 (17:36 +0000)
committerDale Johannesen <dalej@apple.com>
Wed, 25 Mar 2009 17:36:08 +0000 (17:36 +0000)
stoppoint nodes around until Legalize; doing this
imposed an ordering on a sequence of loads that
came from different lines, interfering with scheduling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67692 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp

index 8457bc35f5024fbd889f50f7c8960a67e1b268ba..a5d4caf824e15350c3b139694c6305ddf84c85b1 100644 (file)
@@ -3895,10 +3895,11 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
     DbgStopPointInst &SPI = cast<DbgStopPointInst>(I);
     if (DW && DW->ValidDebugInfo(SPI.getContext())) {
       MachineFunction &MF = DAG.getMachineFunction();
-      DAG.setRoot(DAG.getDbgStopPoint(getRoot(),
-                                      SPI.getLine(),
-                                      SPI.getColumn(),
-                                      SPI.getContext()));
+      if (Fast)
+        DAG.setRoot(DAG.getDbgStopPoint(getRoot(),
+                                        SPI.getLine(),
+                                        SPI.getColumn(),
+                                        SPI.getContext()));
       DICompileUnit CU(cast<GlobalVariable>(SPI.getContext()));
       std::string Dir, FN;
       unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(Dir),