diff options
Diffstat (limited to 'tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r-- | tools/bugpoint/ExecutionDriver.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp index 103002d915..f1601cdb84 100644 --- a/tools/bugpoint/ExecutionDriver.cpp +++ b/tools/bugpoint/ExecutionDriver.cpp @@ -28,7 +28,8 @@ namespace { // for miscompilation. // enum OutputType { - AutoPick, RunLLI, RunJIT, RunLLC, RunLLCIA, RunCBE, CBE_bug, LLC_Safe,Custom + AutoPick, RunLLI, RunJIT, RunLLC, RunLLCIA, RunCBE, CBE_bug, LLC_Safe, + CompileCustom, Custom }; cl::opt<double> @@ -50,6 +51,9 @@ namespace { clEnumValN(RunCBE, "run-cbe", "Compile with CBE"), clEnumValN(CBE_bug,"cbe-bug", "Find CBE bugs"), clEnumValN(LLC_Safe, "llc-safe", "Use LLC for all"), + clEnumValN(CompileCustom, "compile-custom", + "Use -compile-command to define a command to " + "compile the bitcode. Useful to avoid linking."), clEnumValN(Custom, "run-custom", "Use -exec-command to define a command to execute " "the bitcode. Useful for cross-compilation."), @@ -91,6 +95,11 @@ namespace { cl::desc("Additional arguments to pass to the linker")); cl::opt<std::string> + CustomCompileCommand("compile-command", cl::init("llc"), + cl::desc("Command to compile the bitcode (use with -compile-custom) " + "(default: llc)")); + + cl::opt<std::string> CustomExecCommand("exec-command", cl::init("simulate"), cl::desc("Command to execute the bitcode (use with -run-custom) " "(default: simulate)")); @@ -192,8 +201,13 @@ bool BugDriver::initializeExecutionEnvironment() { GCCBinary, &ToolArgv, &GCCToolArgv); break; + case CompileCustom: + Interpreter = + AbstractInterpreter::createCustomCompiler(Message, CustomCompileCommand); + break; case Custom: - Interpreter = AbstractInterpreter::createCustom(Message, CustomExecCommand); + Interpreter = + AbstractInterpreter::createCustomExecutor(Message, CustomExecCommand); break; default: Message = "Sorry, this back-end is not supported by bugpoint right now!\n"; @@ -272,8 +286,8 @@ bool BugDriver::initializeExecutionEnvironment() { &GCCToolArgv); break; case Custom: - SafeInterpreter = AbstractInterpreter::createCustom(Message, - CustomExecCommand); + SafeInterpreter = + AbstractInterpreter::createCustomExecutor(Message, CustomExecCommand); break; default: Message = "Sorry, this back-end is not supported by bugpoint as the " |