diff options
author | Devang Patel <dpatel@apple.com> | 2009-04-16 01:33:10 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-04-16 01:33:10 +0000 |
commit | 46b04e4d067456c4964925a714168aac956ae681 (patch) | |
tree | 7da5161518ada2a72249032008dad820c536ed45 /llvm/lib | |
parent | 43fc7e481b9a39e766925d25312b2cbd18b78d1b (diff) | |
download | bcm5719-llvm-46b04e4d067456c4964925a714168aac956ae681.tar.gz bcm5719-llvm-46b04e4d067456c4964925a714168aac956ae681.zip |
If FastISel is run and it has known DebugLoc then use it.
llvm-svn: 69253
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h | 3 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h index a9c3d6a523b..7a76c5f83d2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h @@ -392,6 +392,7 @@ public: SDValue getControlRoot(); DebugLoc getCurDebugLoc() const { return CurDebugLoc; } + void setCurDebugLoc(DebugLoc dl) { CurDebugLoc = dl; } void CopyValueToVirtualRegister(Value *V, unsigned Reg); @@ -542,8 +543,6 @@ private: const char *implVisitBinaryAtomic(CallInst& I, ISD::NodeType Op); const char *implVisitAluOverflow(CallInst &I, ISD::NodeType Op); - - void setCurDebugLoc(DebugLoc dl) { CurDebugLoc = dl; } }; /// AddCatchInfo - Extract the personality and type infos from an eh.selector diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index d7d0efcd292..7343b838b1e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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(); } |