Skip to content

Commit c75a0c3

Browse files
committed
[GC] Remove so called PreCall safepoints
Remove another bit of unused configuration potential from GCStrategy. It's not entirely clear what the intention here was, but from the docs, it sounds like this may have been subsumed by patchable call support. Note: This change is deliberately small to make it clear that while implemented, there's nothing using the option. A following NFC will do most of the simplifications. llvm-svn: 346701
1 parent cc75e77 commit c75a0c3

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

llvm/include/llvm/CodeGen/GCStrategy.h

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ namespace GC {
6666
/// most runtimes, PostCall safepoints are appropriate.
6767
///
6868
enum PointKind {
69-
PreCall, ///< Instr is a call instruction.
7069
PostCall ///< Instr is the return address of a call.
7170
};
7271

llvm/lib/CodeGen/GCMetadata.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,6 @@ void Printer::getAnalysisUsage(AnalysisUsage &AU) const {
105105

106106
static const char *DescKind(GC::PointKind Kind) {
107107
switch (Kind) {
108-
case GC::PreCall:
109-
return "pre-call";
110108
case GC::PostCall:
111109
return "post-call";
112110
}

llvm/lib/CodeGen/GCRootLowering.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -263,16 +263,11 @@ MCSymbol *GCMachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB,
263263
}
264264

265265
void GCMachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) {
266-
// Find the return address (next instruction), too, so as to bracket the call
267-
// instruction.
266+
// Find the return address (next instruction), since that's what will be on
267+
// the stack when the call is suspended and we need to inspect the stack.
268268
MachineBasicBlock::iterator RAI = CI;
269269
++RAI;
270270

271-
if (FI->getStrategy().needsSafePoint(GC::PreCall)) {
272-
MCSymbol *Label = InsertLabel(*CI->getParent(), CI, CI->getDebugLoc());
273-
FI->addSafePoint(GC::PreCall, Label, CI->getDebugLoc());
274-
}
275-
276271
if (FI->getStrategy().needsSafePoint(GC::PostCall)) {
277272
MCSymbol *Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc());
278273
FI->addSafePoint(GC::PostCall, Label, CI->getDebugLoc());

0 commit comments

Comments
 (0)