aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-04-16 01:33:10 +0000
committerDevang Patel <dpatel@apple.com>2009-04-16 01:33:10 +0000
commit6bfb20561180e71214d12edd65c768829759b222 (patch)
tree1bbf69eb57cdc54562a97264c8cb4a64b4bf3db3 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent9205f3870d58064a1c9f5d38fc3e35d8e05fa19c (diff)
downloadexternal_llvm-6bfb20561180e71214d12edd65c768829759b222.zip
external_llvm-6bfb20561180e71214d12edd65c768829759b222.tar.gz
external_llvm-6bfb20561180e71214d12edd65c768829759b222.tar.bz2
If FastISel is run and it has known DebugLoc then use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index d7d0efc..7343b83 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -824,6 +824,7 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
R = FuncInfo->CreateRegForValue(BI);
}
+ SDL->setCurDebugLoc(FastIS->getCurDebugLoc());
SelectBasicBlock(LLVMBB, BI, next(BI));
// If the instruction was codegen'd with multiple blocks,
// inform the FastISel object where to resume inserting.
@@ -850,8 +851,12 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
// Run SelectionDAG instruction selection on the remainder of the block
// not handled by FastISel. If FastISel is not run, this is the entire
// block.
- if (BI != End)
+ if (BI != End) {
+ // If FastISel is run and it has known DebugLoc then use it.
+ if (FastIS && !FastIS->getCurDebugLoc().isUnknown())
+ SDL->setCurDebugLoc(FastIS->getCurDebugLoc());
SelectBasicBlock(LLVMBB, BI, End);
+ }
FinishBasicBlock();
}