summaryrefslogtreecommitdiffstats
path: root/llvm/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-05-04 21:09:16 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-05-04 21:09:16 +0000
commit4a278f0b1b230270d6a542e4321d8d95d158e7b4 (patch)
treeb501c706fae18e939cd3c42b581b17659dd40aa6 /llvm/tools/bugpoint/ExecutionDriver.cpp
parentf2ff5dd442fde39748daeae663001dd19d9c4c3f (diff)
downloadbcm5719-llvm-4a278f0b1b230270d6a542e4321d8d95d158e7b4.tar.gz
bcm5719-llvm-4a278f0b1b230270d6a542e4321d8d95d158e7b4.zip
Add --tool-args flag which lets you pass arguments to llc or lli.
This is intended to address Bug 40. llvm-svn: 13358
Diffstat (limited to 'llvm/tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--llvm/tools/bugpoint/ExecutionDriver.cpp31
1 files changed, 22 insertions, 9 deletions
diff --git a/llvm/tools/bugpoint/ExecutionDriver.cpp b/llvm/tools/bugpoint/ExecutionDriver.cpp
index 4d5c78368f7..73a923b5eb1 100644
--- a/llvm/tools/bugpoint/ExecutionDriver.cpp
+++ b/llvm/tools/bugpoint/ExecutionDriver.cpp
@@ -71,6 +71,10 @@ namespace llvm {
cl::list<std::string>
InputArgv("args", cl::Positional, cl::desc("<program arguments>..."),
cl::ZeroOrMore);
+
+ cl::list<std::string>
+ ToolArgv("tool-args", cl::Positional, cl::desc("<tool arguments>..."),
+ cl::ZeroOrMore);
}
//===----------------------------------------------------------------------===//
@@ -87,21 +91,26 @@ bool BugDriver::initializeExecutionEnvironment() {
// the command line
cbe = 0;
std::string Message;
+
switch (InterpreterSel) {
case AutoPick:
InterpreterSel = RunCBE;
- Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message);
+ Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message,
+ &ToolArgv);
if (!Interpreter) {
InterpreterSel = RunJIT;
- Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createJIT(getToolName(), Message,
+ &ToolArgv);
}
if (!Interpreter) {
InterpreterSel = RunLLC;
- Interpreter = AbstractInterpreter::createLLC(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
+ &ToolArgv);
}
if (!Interpreter) {
InterpreterSel = RunLLI;
- Interpreter = AbstractInterpreter::createLLI(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLI(getToolName(), Message,
+ &ToolArgv);
}
if (!Interpreter) {
InterpreterSel = AutoPick;
@@ -109,16 +118,20 @@ bool BugDriver::initializeExecutionEnvironment() {
}
break;
case RunLLI:
- Interpreter = AbstractInterpreter::createLLI(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLI(getToolName(), Message,
+ &ToolArgv);
break;
case RunLLC:
- Interpreter = AbstractInterpreter::createLLC(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
+ &ToolArgv);
break;
case RunJIT:
- Interpreter = AbstractInterpreter::createJIT(getToolName(), Message);
+ Interpreter = AbstractInterpreter::createJIT(getToolName(), Message,
+ &ToolArgv);
break;
case RunCBE:
- Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message);
+ Interpreter = cbe = AbstractInterpreter::createCBE(getToolName(), Message,
+ &ToolArgv);
break;
default:
Message = "Sorry, this back-end is not supported by bugpoint right now!\n";
@@ -128,7 +141,7 @@ bool BugDriver::initializeExecutionEnvironment() {
// Initialize auxiliary tools for debugging
if (!cbe) {
- cbe = AbstractInterpreter::createCBE(getToolName(), Message);
+ cbe = AbstractInterpreter::createCBE(getToolName(), Message, &ToolArgv);
if (!cbe) { std::cout << Message << "\nExiting.\n"; exit(1); }
}
gcc = GCC::create(getToolName(), Message);
OpenPOWER on IntegriCloud