[llvm] r346701 - [GC] Remove so called PreCall safepoints

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 12 12:15:34 PST 2018


Author: reames
Date: Mon Nov 12 12:15:34 2018
New Revision: 346701

URL: http://llvm.org/viewvc/llvm-project?rev=346701&view=rev
Log:
[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.


Modified:
    llvm/trunk/include/llvm/CodeGen/GCStrategy.h
    llvm/trunk/lib/CodeGen/GCMetadata.cpp
    llvm/trunk/lib/CodeGen/GCRootLowering.cpp

Modified: llvm/trunk/include/llvm/CodeGen/GCStrategy.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GCStrategy.h?rev=346701&r1=346700&r2=346701&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GCStrategy.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GCStrategy.h Mon Nov 12 12:15:34 2018
@@ -66,7 +66,6 @@ namespace GC {
 /// most runtimes, PostCall safepoints are appropriate.
 ///
 enum PointKind {
-  PreCall, ///< Instr is a call instruction.
   PostCall ///< Instr is the return address of a call.
 };
 

Modified: llvm/trunk/lib/CodeGen/GCMetadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCMetadata.cpp?rev=346701&r1=346700&r2=346701&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GCMetadata.cpp (original)
+++ llvm/trunk/lib/CodeGen/GCMetadata.cpp Mon Nov 12 12:15:34 2018
@@ -105,8 +105,6 @@ void Printer::getAnalysisUsage(AnalysisU
 
 static const char *DescKind(GC::PointKind Kind) {
   switch (Kind) {
-  case GC::PreCall:
-    return "pre-call";
   case GC::PostCall:
     return "post-call";
   }

Modified: llvm/trunk/lib/CodeGen/GCRootLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GCRootLowering.cpp?rev=346701&r1=346700&r2=346701&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GCRootLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/GCRootLowering.cpp Mon Nov 12 12:15:34 2018
@@ -263,16 +263,11 @@ MCSymbol *GCMachineCodeAnalysis::InsertL
 }
 
 void GCMachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) {
-  // Find the return address (next instruction), too, so as to bracket the call
-  // instruction.
+  // Find the return address (next instruction), since that's what will be on
+  // the stack when the call is suspended and we need to inspect the stack.
   MachineBasicBlock::iterator RAI = CI;
   ++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)) {
     MCSymbol *Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc());
     FI->addSafePoint(GC::PostCall, Label, CI->getDebugLoc());




More information about the llvm-commits mailing list