summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/BuiltinGCs.cpp8
-rw-r--r--llvm/lib/CodeGen/GCMetadata.cpp10
-rw-r--r--llvm/lib/CodeGen/GCRootLowering.cpp6
3 files changed, 7 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/BuiltinGCs.cpp b/llvm/lib/CodeGen/BuiltinGCs.cpp
index 5ee2055cff9..93939e573b7 100644
--- a/llvm/lib/CodeGen/BuiltinGCs.cpp
+++ b/llvm/lib/CodeGen/BuiltinGCs.cpp
@@ -28,7 +28,7 @@ namespace {
class ErlangGC : public GCStrategy {
public:
ErlangGC() {
- NeededSafePoints = 1 << GC::PostCall;
+ NeededSafePoints = true;
UsesMetadata = true;
}
};
@@ -39,7 +39,7 @@ public:
class OcamlGC : public GCStrategy {
public:
OcamlGC() {
- NeededSafePoints = 1 << GC::PostCall;
+ NeededSafePoints = true;
UsesMetadata = true;
}
};
@@ -69,7 +69,7 @@ public:
UseStatepoints = true;
// These options are all gc.root specific, we specify them so that the
// gc.root lowering code doesn't run.
- NeededSafePoints = 0;
+ NeededSafePoints = false;
UsesMetadata = false;
}
@@ -101,7 +101,7 @@ public:
UseStatepoints = true;
// These options are all gc.root specific, we specify them so that the
// gc.root lowering code doesn't run.
- NeededSafePoints = 0;
+ NeededSafePoints = false;
UsesMetadata = false;
}
diff --git a/llvm/lib/CodeGen/GCMetadata.cpp b/llvm/lib/CodeGen/GCMetadata.cpp
index 4bf5335f9d7..1c80556dfef 100644
--- a/llvm/lib/CodeGen/GCMetadata.cpp
+++ b/llvm/lib/CodeGen/GCMetadata.cpp
@@ -103,14 +103,6 @@ void Printer::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<GCModuleInfo>();
}
-static const char *DescKind(GC::PointKind Kind) {
- switch (Kind) {
- case GC::PostCall:
- return "post-call";
- }
- llvm_unreachable("Invalid point kind");
-}
-
bool Printer::runOnFunction(Function &F) {
if (F.hasGC())
return false;
@@ -127,7 +119,7 @@ bool Printer::runOnFunction(Function &F) {
for (GCFunctionInfo::iterator PI = FD->begin(), PE = FD->end(); PI != PE;
++PI) {
- OS << "\t" << PI->Label->getName() << ": " << DescKind(PI->Kind)
+ OS << "\t" << PI->Label->getName() << ": " << "post-call"
<< ", live = {";
for (GCFunctionInfo::live_iterator RI = FD->live_begin(PI),
diff --git a/llvm/lib/CodeGen/GCRootLowering.cpp b/llvm/lib/CodeGen/GCRootLowering.cpp
index fff76f540f5..e8ccd84b0b9 100644
--- a/llvm/lib/CodeGen/GCRootLowering.cpp
+++ b/llvm/lib/CodeGen/GCRootLowering.cpp
@@ -268,10 +268,8 @@ void GCMachineCodeAnalysis::VisitCallPoint(MachineBasicBlock::iterator CI) {
MachineBasicBlock::iterator RAI = CI;
++RAI;
- if (FI->getStrategy().needsSafePoint(GC::PostCall)) {
- MCSymbol *Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc());
- FI->addSafePoint(GC::PostCall, Label, CI->getDebugLoc());
- }
+ MCSymbol *Label = InsertLabel(*CI->getParent(), RAI, CI->getDebugLoc());
+ FI->addSafePoint(Label, CI->getDebugLoc());
}
void GCMachineCodeAnalysis::FindSafePoints(MachineFunction &MF) {
OpenPOWER on IntegriCloud