summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/ErlangGC.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-01-16 19:33:28 +0000
committerPhilip Reames <listmail@philipreames.com>2015-01-16 19:33:28 +0000
commit7de640a8769fa12a2154c506f5976c43c778268d (patch)
treef029e8c619703b291edf39e3af07ed52e210fe8a /llvm/lib/CodeGen/ErlangGC.cpp
parent7d1f632380477701591682b8a92b289ac5190383 (diff)
downloadbcm5719-llvm-7de640a8769fa12a2154c506f5976c43c778268d.tar.gz
bcm5719-llvm-7de640a8769fa12a2154c506f5976c43c778268d.zip
Remove gc.root's findCustomSafePoints mechanism
Searching all of the existing gc.root implementations I'm aware of (all three of them), there was exactly one use of this mechanism, and that was to implement a performance improvement that should have been applied to the default lowering. Having this function is requiring a dependency on a CodeGen class (MachineFunction), in a class which is otherwise completely independent of CodeGen. I could solve this differently, but given that I see absolutely no value in preserving this mechanism, I going to just get rid of it. Note: Tis is the first time I'm intentionally breaking previously supported gc.root functionality. Given 3.6 has branched, I believe this is a good time to do this. Differential Revision: http://reviews.llvm.org/D7004 llvm-svn: 226305
Diffstat (limited to 'llvm/lib/CodeGen/ErlangGC.cpp')
-rw-r--r--llvm/lib/CodeGen/ErlangGC.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/llvm/lib/CodeGen/ErlangGC.cpp b/llvm/lib/CodeGen/ErlangGC.cpp
index 85b089343ca..5f2b3a09832 100644
--- a/llvm/lib/CodeGen/ErlangGC.cpp
+++ b/llvm/lib/CodeGen/ErlangGC.cpp
@@ -28,12 +28,8 @@ using namespace llvm;
namespace {
class ErlangGC : public GCStrategy {
- MCSymbol *InsertLabel(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MI,
- DebugLoc DL) const;
public:
ErlangGC();
- bool findCustomSafePoints(GCFunctionInfo &FI, MachineFunction &MF) override;
};
}
@@ -48,35 +44,4 @@ ErlangGC::ErlangGC() {
NeededSafePoints = 1 << GC::PostCall;
UsesMetadata = true;
CustomRoots = false;
- CustomSafePoints = true;
-}
-
-MCSymbol *ErlangGC::InsertLabel(MachineBasicBlock &MBB,
- MachineBasicBlock::iterator MI,
- DebugLoc DL) const {
- const TargetInstrInfo *TII = MBB.getParent()->getSubtarget().getInstrInfo();
- MCSymbol *Label = MBB.getParent()->getContext().CreateTempSymbol();
- BuildMI(MBB, MI, DL, TII->get(TargetOpcode::GC_LABEL)).addSym(Label);
- return Label;
-}
-
-bool ErlangGC::findCustomSafePoints(GCFunctionInfo &FI, MachineFunction &MF) {
- for (MachineFunction::iterator BBI = MF.begin(), BBE = MF.end(); BBI != BBE;
- ++BBI)
- for (MachineBasicBlock::iterator MI = BBI->begin(), ME = BBI->end();
- MI != ME; ++MI)
-
- if (MI->getDesc().isCall()) {
-
- // Do not treat tail call sites as safe points.
- if (MI->getDesc().isTerminator())
- continue;
-
- /* Code copied from VisitCallPoint(...) */
- MachineBasicBlock::iterator RAI = MI; ++RAI;
- MCSymbol* Label = InsertLabel(*MI->getParent(), RAI, MI->getDebugLoc());
- FI.addSafePoint(GC::PostCall, Label, MI->getDebugLoc());
- }
-
- return false;
}
OpenPOWER on IntegriCloud