diff options
author | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2010-09-24 17:27:50 +0000 |
---|---|---|
committer | Nicolas Geoffray <nicolas.geoffray@lip6.fr> | 2010-09-24 17:27:50 +0000 |
commit | cbb421887de951f0d689415522430fcad3c764fd (patch) | |
tree | fa3696a876ae05e105f5e8e1e925fadcbd9211e3 /llvm/lib/CodeGen/GCStrategy.cpp | |
parent | 3aa045491fba7750e18c0ec73f35d4356d5003ea (diff) | |
download | bcm5719-llvm-cbb421887de951f0d689415522430fcad3c764fd.tar.gz bcm5719-llvm-cbb421887de951f0d689415522430fcad3c764fd.zip |
Attach a DebugLoc to a GC point in order to get precise information in the JIT of a GC point.
llvm-svn: 114736
Diffstat (limited to 'llvm/lib/CodeGen/GCStrategy.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GCStrategy.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/GCStrategy.cpp b/llvm/lib/CodeGen/GCStrategy.cpp index 719fa194d8d..087b2857a4a 100644 --- a/llvm/lib/CodeGen/GCStrategy.cpp +++ b/llvm/lib/CodeGen/GCStrategy.cpp @@ -345,13 +345,15 @@ void MachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) { MachineBasicBlock::iterator RAI = CI; ++RAI; - if (FI->getStrategy().needsSafePoint(GC::PreCall)) - FI->addSafePoint(GC::PreCall, InsertLabel(*CI->getParent(), CI, - CI->getDebugLoc())); + if (FI->getStrategy().needsSafePoint(GC::PreCall)) { + MCSymbol* Label = InsertLabel(*CI->getParent(), CI, CI->getDebugLoc()); + FI->addSafePoint(GC::PreCall, Label, CI->getDebugLoc()); + } - if (FI->getStrategy().needsSafePoint(GC::PostCall)) - FI->addSafePoint(GC::PostCall, InsertLabel(*CI->getParent(), RAI, - CI->getDebugLoc())); + if (FI->getStrategy().needsSafePoint(GC::PostCall)) { + MCSymbol* Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc()); + FI->addSafePoint(GC::PostCall, Label, CI->getDebugLoc()); + } } void MachineCodeAnalysis::FindSafePoints(MachineFunction &MF) { |