diff options
author | Quentin Colombet <qcolombet@apple.com> | 2017-04-01 01:26:24 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2017-04-01 01:26:24 +0000 |
commit | 49d70d0529ab6d98a2c0a7c9aa65e9d1a92c2e4d (patch) | |
tree | f60fa846f9aa4e95dd6d1adce48369dff93f7c0c /llvm/lib/Target/TargetMachine.cpp | |
parent | fc8f048c13d9dc1ab1ddc1550cfcbd3f5118fe23 (diff) | |
download | bcm5719-llvm-49d70d0529ab6d98a2c0a7c9aa65e9d1a92c2e4d.tar.gz bcm5719-llvm-49d70d0529ab6d98a2c0a7c9aa65e9d1a92c2e4d.zip |
Revert "Feature generic option to setup start/stop-after/before"
This reverts commit r299282.
Didn't intend to commit this :(
llvm-svn: 299288
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/TargetMachine.cpp | 61 |
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_; } |