summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-04-02 19:42:39 +0000
committerChris Lattner <sabre@nondot.org>2010-04-02 19:42:39 +0000
commit915c5f9862503174ee3482543b0f371c888812c3 (patch)
tree4626ed07826ed8b43a0f1c4b243833d34f046ddf /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent61399375a2f9ac1eee25a04c50ccc629d73c7262 (diff)
downloadbcm5719-llvm-915c5f9862503174ee3482543b0f371c888812c3.tar.gz
bcm5719-llvm-915c5f9862503174ee3482543b0f371c888812c3.zip
Switch the code generator (except the JIT) onto the new DebugLoc
representation. This eliminates the 'DILocation' MDNodes for file/line/col tuples from -O0 -g codegen. This remove the old DebugLoc class, making it a typedef for DebugLoc, I'll rename NewDebugLoc next. I didn't update the JIT to use the new apis, so it will continue to work, but be as slow as before. Someone should eventually do this or, better yet, rip out the JIT debug info stuff and build the JIT on top of MC. llvm-svn: 100209
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index ea96b217999..963abd905fe 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -368,21 +368,18 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) {
/// attached with this instruction.
static void SetDebugLoc(Instruction *I, SelectionDAGBuilder *SDB,
FastISel *FastIS, MachineFunction *MF) {
- MDNode *Dbg = I->getDbgMetadata();
- if (Dbg == 0) return;
+ DebugLoc DL = I->getDebugLoc();
+ if (DL.isUnknown()) return;
- DILocation DILoc(Dbg);
- DebugLoc Loc = ExtractDebugLocation(DILoc, MF->getDebugLocInfo());
-
- SDB->setCurDebugLoc(Loc);
+ SDB->setCurDebugLoc(DL);
if (FastIS)
- FastIS->setCurDebugLoc(Loc);
+ FastIS->setCurDebugLoc(DL);
// If the function doesn't have a default debug location yet, set
// it. This is kind of a hack.
if (MF->getDefaultDebugLoc().isUnknown())
- MF->setDefaultDebugLoc(Loc);
+ MF->setDefaultDebugLoc(DL);
}
/// ResetDebugLoc - Set MF's and SDB's DebugLocs to Unknown.
OpenPOWER on IntegriCloud