summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp61
1 files changed, 0 insertions, 61 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index 357f02ba5ef..e8fe0a2b218 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -31,31 +31,6 @@
#include "llvm/Target/TargetSubtargetInfo.h"
using namespace llvm;
-const char *TargetMachine::StartAfterOptName = "start-after";
-const char *TargetMachine::StartBeforeOptName = "start-before";
-const char *TargetMachine::StopAfterOptName = "stop-after";
-const char *TargetMachine::StopBeforeOptName = "stop-before";
-
-static cl::opt<std::string>
- StartAfterOpt(StringRef(TargetMachine::StartAfterOptName),
- cl::desc("Resume compilation after a specific pass"),
- cl::value_desc("pass-name"), cl::init(""));
-
-static cl::opt<std::string>
- StartBeforeOpt(StringRef(TargetMachine::StartBeforeOptName),
- cl::desc("Resume compilation before a specific pass"),
- cl::value_desc("pass-name"), cl::init(""));
-
-static cl::opt<std::string>
- StopAfterOpt(StringRef(TargetMachine::StopAfterOptName),
- cl::desc("Stop compilation after a specific pass"),
- cl::value_desc("pass-name"), cl::init(""));
-
-static cl::opt<std::string>
- StopBeforeOpt(StringRef(TargetMachine::StopBeforeOptName),
- cl::desc("Stop compilation before a specific pass"),
- cl::value_desc("pass-name"), cl::init(""));
-
cl::opt<bool> EnableIPRA("enable-ipra", cl::init(false), cl::Hidden,
cl::desc("Enable interprocedural register allocation "
"to reduce load/store at procedure calls."));
@@ -81,42 +56,6 @@ TargetMachine::~TargetMachine() {
delete STI;
}
-AnalysisID TargetMachine::getPassIDForOption(PipelineControlOption Kind,
- bool AbortIfNotRegistered) {
- static cl::opt<std::string> *PassNames[] = {&StartAfterOpt, &StartBeforeOpt,
- &StopAfterOpt, &StopBeforeOpt};
-#define CHECK_OPT(OPTNAME) \
- assert(PassNames[TargetMachine::OPTNAME] == &OPTNAME##Opt && \
- "Static array is messed up for " #OPTNAME);
- CHECK_OPT(StartAfter);
- CHECK_OPT(StartBefore);
- CHECK_OPT(StopAfter);
- CHECK_OPT(StopBefore);
- static_assert(LastPipelineControlOption == 3,
- "The check before needs to be updated");
- return getPassID(*PassNames[Kind], AbortIfNotRegistered);
-}
-
-const PassInfo *TargetMachine::getPassInfo(StringRef PassName,
- bool AbortIfNotRegistered) {
- if (PassName.empty())
- return nullptr;
-
- const PassRegistry &PR = *PassRegistry::getPassRegistry();
- const PassInfo *PI = PR.getPassInfo(PassName);
- if (!PI && AbortIfNotRegistered) {
- errs() << "\"" << PassName << "\" pass is not registered.\n";
- exit(1);
- }
- return PI;
-}
-
-AnalysisID TargetMachine::getPassID(StringRef PassName,
- bool AbortIfNotRegistered) {
- const PassInfo *PI = getPassInfo(PassName, AbortIfNotRegistered);
- return PI ? PI->getTypeInfo() : nullptr;
-}
-
bool TargetMachine::isPositionIndependent() const {
return getRelocationModel() == Reloc::PIC_;
}
OpenPOWER on IntegriCloud