[llvm-commits] CVS: llvm/tools/bugpoint/ExecutionDriver.cpp

Chris Lattner sabre at nondot.org
Wed Nov 8 21:58:07 PST 2006



Changes in directory llvm/tools/bugpoint:

ExecutionDriver.cpp updated: 1.66 -> 1.67
---
Log message:

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.


---
Diffs of the changes:  (+9 -3)

 ExecutionDriver.cpp |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)


Index: llvm/tools/bugpoint/ExecutionDriver.cpp
diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.66 llvm/tools/bugpoint/ExecutionDriver.cpp:1.67
--- llvm/tools/bugpoint/ExecutionDriver.cpp:1.66	Sun Nov  5 13:31:28 2006
+++ llvm/tools/bugpoint/ExecutionDriver.cpp	Wed Nov  8 23:57:53 2006
@@ -28,7 +28,7 @@
   // 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 @@
                             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 @@
     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 @@
   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);






More information about the llvm-commits mailing list