summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT/JITEmitter.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/ExecutionEngine/JIT/JITEmitter.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/ExecutionEngine/JIT/JITEmitter.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
index 83acb5df976..a2df2d09b85 100644
--- a/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
@@ -821,21 +821,20 @@ void *JITEmitter::getPointerToGVIndirectSym(GlobalValue *V, void *Reference) {
}
void JITEmitter::processDebugLoc(DebugLoc DL, bool BeforePrintingInsn) {
- if (!DL.isUnknown()) {
- DILocation CurDLT = EmissionDetails.MF->getDILocation(DL);
-
- if (BeforePrintingInsn) {
- if (CurDLT.getScope().getNode() != 0
- && PrevDLT.getNode() != CurDLT.getNode()) {
- JITEvent_EmittedFunctionDetails::LineStart NextLine;
- NextLine.Address = getCurrentPCValue();
- NextLine.Loc = DL;
- EmissionDetails.LineStarts.push_back(NextLine);
- }
+ if (DL.isUnknown()) return;
+ if (!BeforePrintingInsn) return;
- PrevDLT = CurDLT;
- }
+ // FIXME: This is horribly inefficient.
+ DILocation CurDLT(DL.getAsMDNode(CurFn->getContext()));
+
+ if (CurDLT.getScope().getNode() != 0 && PrevDLT.getNode() !=CurDLT.getNode()){
+ JITEvent_EmittedFunctionDetails::LineStart NextLine;
+ NextLine.Address = getCurrentPCValue();
+ NextLine.Loc = DL;
+ EmissionDetails.LineStarts.push_back(NextLine);
}
+
+ PrevDLT = CurDLT;
}
static unsigned GetConstantPoolSizeInBytes(MachineConstantPool *MCP,
OpenPOWER on IntegriCloud