[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
This commit is contained in:
Philip Reames 2018-11-12 20:15:34 +00:00
parent cc75e77df5
commit c75a0c3f69
3 changed files with 2 additions and 10 deletions

View File

@ -66,7 +66,6 @@ namespace GC {
/// most runtimes, PostCall safepoints are appropriate. /// most runtimes, PostCall safepoints are appropriate.
/// ///
enum PointKind { enum PointKind {
PreCall, ///< Instr is a call instruction.
PostCall ///< Instr is the return address of a call. PostCall ///< Instr is the return address of a call.
}; };

View File

@ -105,8 +105,6 @@ void Printer::getAnalysisUsage(AnalysisUsage &AU) const {
static const char *DescKind(GC::PointKind Kind) { static const char *DescKind(GC::PointKind Kind) {
switch (Kind) { switch (Kind) {
case GC::PreCall:
return "pre-call";
case GC::PostCall: case GC::PostCall:
return "post-call"; return "post-call";
} }

View File

@ -263,16 +263,11 @@ MCSymbol *GCMachineCodeAnalysis::InsertLabel(MachineBasicBlock &MBB,
} }
void GCMachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) { void GCMachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) {
// Find the return address (next instruction), too, so as to bracket the call // Find the return address (next instruction), since that's what will be on
// instruction. // the stack when the call is suspended and we need to inspect the stack.
MachineBasicBlock::iterator RAI = CI; MachineBasicBlock::iterator RAI = CI;
++RAI; ++RAI;
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)) { if (FI->getStrategy().needsSafePoint(GC::PostCall)) {
MCSymbol *Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc()); MCSymbol *Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc());
FI->addSafePoint(GC::PostCall, Label, CI->getDebugLoc()); FI->addSafePoint(GC::PostCall, Label, CI->getDebugLoc());