[llvm] r213871 - Remove dead code.
Rafael Espindola
rafael.espindola at gmail.com
Thu Jul 24 09:02:28 PDT 2014
Author: rafael
Date: Thu Jul 24 11:02:28 2014
New Revision: 213871
URL: http://llvm.org/viewvc/llvm-project?rev=213871&view=rev
Log:
Remove dead code.
Every user has been switched to using EngineBuilder.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
llvm/trunk/lib/ExecutionEngine/JIT/JIT.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=213871&r1=213870&r2=213871&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Thu Jul 24 11:02:28 2014
@@ -172,39 +172,6 @@ public:
virtual ~ExecutionEngine();
- /// create - This is the factory method for creating an execution engine which
- /// is appropriate for the current machine. This takes ownership of the
- /// module.
- ///
- /// \param GVsWithCode - Allocating globals with code breaks
- /// freeMachineCodeForFunction and is probably unsafe and bad for performance.
- /// However, we have clients who depend on this behavior, so we must support
- /// it. Eventually, when we're willing to break some backwards compatibility,
- /// this flag should be flipped to false, so that by default
- /// freeMachineCodeForFunction works.
- static ExecutionEngine *create(Module *M,
- bool ForceInterpreter = false,
- std::string *ErrorStr = nullptr,
- CodeGenOpt::Level OptLevel =
- CodeGenOpt::Default,
- bool GVsWithCode = true);
-
- /// createJIT - This is the factory method for creating a JIT for the current
- /// machine, it does not fall back to the interpreter. This takes ownership
- /// of the Module and JITMemoryManager if successful.
- ///
- /// Clients should make sure to initialize targets prior to calling this
- /// function.
- static ExecutionEngine *createJIT(Module *M,
- std::string *ErrorStr = nullptr,
- JITMemoryManager *JMM = nullptr,
- CodeGenOpt::Level OptLevel =
- CodeGenOpt::Default,
- bool GVsWithCode = true,
- Reloc::Model RM = Reloc::Default,
- CodeModel::Model CMM =
- CodeModel::JITDefault);
-
/// addModule - Add a Module to the list of modules that we can JIT from.
/// Note that this takes ownership of the Module: when the ExecutionEngine is
/// destroyed, it destroys the Module as well.
Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=213871&r1=213870&r2=213871&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Thu Jul 24 11:02:28 2014
@@ -406,57 +406,6 @@ int ExecutionEngine::runFunctionAsMain(F
return runFunction(Fn, GVArgs).IntVal.getZExtValue();
}
-ExecutionEngine *ExecutionEngine::create(Module *M,
- bool ForceInterpreter,
- std::string *ErrorStr,
- CodeGenOpt::Level OptLevel,
- bool GVsWithCode) {
-
- EngineBuilder EB =
- EngineBuilder(M)
- .setEngineKind(ForceInterpreter ? EngineKind::Interpreter
- : EngineKind::Either)
- .setErrorStr(ErrorStr)
- .setOptLevel(OptLevel)
- .setAllocateGVsWithCode(GVsWithCode);
-
- return EB.create();
-}
-
-/// createJIT - This is the factory method for creating a JIT for the current
-/// machine, it does not fall back to the interpreter. This takes ownership
-/// of the module.
-ExecutionEngine *ExecutionEngine::createJIT(Module *M,
- std::string *ErrorStr,
- JITMemoryManager *JMM,
- CodeGenOpt::Level OL,
- bool GVsWithCode,
- Reloc::Model RM,
- CodeModel::Model CMM) {
- if (!ExecutionEngine::JITCtor) {
- if (ErrorStr)
- *ErrorStr = "JIT has not been linked in.";
- return nullptr;
- }
-
- // Use the defaults for extra parameters. Users can use EngineBuilder to
- // set them.
- EngineBuilder EB(M);
- EB.setEngineKind(EngineKind::JIT);
- EB.setErrorStr(ErrorStr);
- EB.setRelocationModel(RM);
- EB.setCodeModel(CMM);
- EB.setAllocateGVsWithCode(GVsWithCode);
- EB.setOptLevel(OL);
- EB.setJITMemoryManager(JMM);
-
- // TODO: permit custom TargetOptions here
- TargetMachine *TM = EB.selectTarget();
- if (!TM || (ErrorStr && ErrorStr->length() > 0)) return nullptr;
-
- return ExecutionEngine::JITCtor(M, ErrorStr, JMM, GVsWithCode, TM);
-}
-
void EngineBuilder::InitEngine() {
WhichEngine = EngineKind::Either;
ErrorStr = nullptr;
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.h?rev=213871&r1=213870&r2=213871&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.h (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.h Thu Jul 24 11:02:28 2014
@@ -91,21 +91,6 @@ public:
///
TargetJITInfo &getJITInfo() const { return TJI; }
- /// create - Create an return a new JIT compiler if there is one available
- /// for the current target. Otherwise, return null.
- ///
- static ExecutionEngine *create(Module *M,
- std::string *Err,
- JITMemoryManager *JMM,
- CodeGenOpt::Level OptLevel =
- CodeGenOpt::Default,
- bool GVsWithCode = true,
- Reloc::Model RM = Reloc::Default,
- CodeModel::Model CMM = CodeModel::JITDefault) {
- return ExecutionEngine::createJIT(M, Err, JMM, OptLevel, GVsWithCode,
- RM, CMM);
- }
-
void addModule(Module *M) override;
/// removeModule - Remove a Module from the list of modules. Returns true if
More information about the llvm-commits
mailing list