[llvm-commits] [llvm] r101443 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Dan Gohman
gohman at apple.com
Thu Apr 15 22:06:56 PDT 2010
Author: djg
Date: Fri Apr 16 00:06:56 2010
New Revision: 101443
URL: http://llvm.org/viewvc/llvm-project?rev=101443&view=rev
Log:
Refine further the scope where the global DebugLoc value is active.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=101443&r1=101442&r2=101443&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Fri Apr 16 00:06:56 2010
@@ -256,15 +256,13 @@
SDB->setCurrentBasicBlock(BB);
// Lower all of the non-terminator instructions. If a call is emitted
- // as a tail call, cease emitting nodes for this block.
+ // as a tail call, cease emitting nodes for this block. Terminators
+ // are handled below.
for (BasicBlock::const_iterator I = Begin;
- I != End && !SDB->HasTailCall; ++I) {
+ I != End && !SDB->HasTailCall && !isa<TerminatorInst>(I);
+ ++I) {
SetDebugLoc(I, SDB, 0, MF);
-
- // Visit the instruction. Terminators are handled below.
- if (!isa<TerminatorInst>(I))
- SDB->visit(*I);
-
+ SDB->visit(*I);
ResetDebugLoc(SDB, 0);
}
More information about the llvm-commits
mailing list