summaryrefslogtreecommitdiff
path: root/tools/bugpoint/ExecutionDriver.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-09 05:57:53 +0000
committerChris Lattner <sabre@nondot.org>2006-11-09 05:57:53 +0000
commitcd6f46e2ac4c1d64067237c0b28eccfae22bd9f4 (patch)
treecb0e1106d69c3fe50ff37aadc9545a385ebfaf83 /tools/bugpoint/ExecutionDriver.cpp
parentb324bd735ff5c99a52cd3c3f5d01c0e1398a2d3a (diff)
downloadllvm-cd6f46e2ac4c1d64067237c0b28eccfae22bd9f4.tar.gz
llvm-cd6f46e2ac4c1d64067237c0b28eccfae22bd9f4.tar.bz2
llvm-cd6f46e2ac4c1d64067237c0b28eccfae22bd9f4.tar.xz
add a new bugpoint mode -llc-safe. This uses LLC for both halves of a
miscompilation. This is useful for working around GCC+CBE bugs or for handling programs that CBE doesn't support (e.g. inline asm) when searching for optimizer bugs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31588 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/ExecutionDriver.cpp')
-rw-r--r--tools/bugpoint/ExecutionDriver.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/bugpoint/ExecutionDriver.cpp b/tools/bugpoint/ExecutionDriver.cpp
index dedf91eb03..93135efb81 100644
--- a/tools/bugpoint/ExecutionDriver.cpp
+++ b/tools/bugpoint/ExecutionDriver.cpp
@@ -28,7 +28,7 @@ namespace {
// for miscompilation.
//
enum OutputType {
- AutoPick, RunLLI, RunJIT, RunLLC, RunCBE, CBE_bug
+ AutoPick, RunLLI, RunJIT, RunLLC, RunCBE, CBE_bug, LLC_Safe
};
cl::opt<double>
@@ -47,6 +47,7 @@ namespace {
clEnumValN(RunLLC, "run-llc", "Compile with LLC"),
clEnumValN(RunCBE, "run-cbe", "Compile with CBE"),
clEnumValN(CBE_bug,"cbe-bug", "Find CBE bugs"),
+ clEnumValN(LLC_Safe, "llc-safe", "Use LLC for all"),
clEnumValEnd),
cl::init(AutoPick));
@@ -133,6 +134,10 @@ bool BugDriver::initializeExecutionEnvironment() {
Interpreter = AbstractInterpreter::createJIT(getToolName(), Message,
&ToolArgv);
break;
+ case LLC_Safe:
+ Interpreter = AbstractInterpreter::createLLC(getToolName(), Message,
+ &ToolArgv);
+ break;
case RunCBE:
case CBE_bug:
Interpreter = AbstractInterpreter::createCBE(getToolName(), Message,
@@ -148,8 +153,9 @@ bool BugDriver::initializeExecutionEnvironment() {
if (InterpreterSel == RunCBE) {
// We already created a CBE, reuse it.
cbe = Interpreter;
- } else if (InterpreterSel == CBE_bug) {
- // We want to debug the CBE itself. Use LLC as the 'known-good' compiler.
+ } else if (InterpreterSel == CBE_bug || InterpreterSel == LLC_Safe) {
+ // We want to debug the CBE itself or LLC is known-good. Use LLC as the
+ // 'known-good' compiler.
std::vector<std::string> ToolArgs;
ToolArgs.push_back("--relocation-model=pic");
cbe = AbstractInterpreter::createLLC(getToolName(), Message, &ToolArgs);