summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-04-28 20:53:48 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-04-28 20:53:48 +0000
commitc53565c479a8fe13a014ba6ff2bffec5cd822862 (patch)
treef9f714b392d203dc6db4e2acdde15743bbc17c3f /llvm/tools/bugpoint/ExecutionDriver.cpp
parentf06226f506893aaced97c19a38a667324e8fa1f2 (diff)
downloadbcm5719-llvm-c53565c479a8fe13a014ba6ff2bffec5cd822862.tar.gz
bcm5719-llvm-c53565c479a8fe13a014ba6ff2bffec5cd822862.zip
Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen! llvm-svn: 50373
Diffstat (limited to 'llvm/tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index c65d97607e2..49480efb636 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -28,7 +28,7 @@ namespace {
// for miscompilation.
//
enum OutputType {
- AutoPick, RunLLI, RunJIT, RunLLC, RunCBE, CBE_bug, LLC_Safe
+ AutoPick, RunLLI, RunJIT, RunLLC, RunCBE, CBE_bug, LLC_Safe, Custom
};
cl::opt<double>
@@ -48,6 +48,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(Custom, "run-custom",
+ "Use -exec-command to define a command to execute "
+ "the bitcode. Useful for cross-compilation."),
clEnumValEnd),
cl::init(AutoPick));
@@ -71,8 +74,13 @@ namespace {
"into executing programs"));
cl::list<std::string>
- AdditionalLinkerArgs("Xlinker",
+ AdditionalLinkerArgs("Xlinker",
cl::desc("Additional arguments to pass to the linker"));
+
+ cl::opt<std::string>
+ CustomExecCommand("exec-command", cl::init("simulate"),
+ cl::desc("Command to execute the bitcode (use with -run-custom) "
+ "(default: simulate)"));
}
namespace llvm {
@@ -148,6 +156,10 @@ bool BugDriver::initializeExecutionEnvironment() {
Interpreter = AbstractInterpreter::createCBE(getToolName(), Message,
&ToolArgv);
break;
+ case Custom:
+ Interpreter = AbstractInterpreter::createCustom(getToolName(), Message,
+ CustomExecCommand);
+ break;
default:
Message = "Sorry, this back-end is not supported by bugpoint right now!\n";
break;
OpenPOWER on IntegriCloud