summaryrefslogtreecommitdiff
path: root/lib/CodeGen/GCStrategy.cpp
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2010-09-24 17:27:50 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2010-09-24 17:27:50 +0000
commit946e3c9f9db2d0ab5bd75ad0283c224366807fa6 (patch)
tree155349bddfb41c51ce30499dfe24c3a0f583298c /lib/CodeGen/GCStrategy.cpp
parentfacb34b41cea284b5a0b4992ff619e5cfd5e6a22 (diff)
downloadllvm-946e3c9f9db2d0ab5bd75ad0283c224366807fa6.tar.gz
llvm-946e3c9f9db2d0ab5bd75ad0283c224366807fa6.tar.bz2
llvm-946e3c9f9db2d0ab5bd75ad0283c224366807fa6.tar.xz
Attach a DebugLoc to a GC point in order to get precise information in the JIT of a GC point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114736 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/GCStrategy.cpp')
-rw-r--r--lib/CodeGen/GCStrategy.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/CodeGen/GCStrategy.cpp b/lib/CodeGen/GCStrategy.cpp
index 719fa194d8..087b2857a4 100644
--- a/lib/CodeGen/GCStrategy.cpp
+++ b/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) {