Add a -disable-loop-extraction option to bugpoint.
authorReid Spencer <rspencer@reidspencer.com>
Sat, 11 Nov 2006 19:05:02 +0000 (19:05 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sat, 11 Nov 2006 19:05:02 +0000 (19:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31683 91177308-0d34-0410-b5e6-96231b3b80d8

tools/bugpoint/Miscompilation.cpp

index 850fb83f848b15c2ca2253f3f0215ecec92dda5e..116e3a53715f4fd3a33b003151d2b782d2b1e243 100644 (file)
@@ -33,6 +33,11 @@ namespace llvm {
 }
 
 namespace {
+  static llvm::cl::opt<bool> 
+    DisableLoopExtraction("disable-loop-extraction", 
+        cl::desc("Don't extract loops when searching for miscompilations"),
+        cl::init(false));
+
   class ReduceMiscompilingPasses : public ListReducer<const PassInfo*> {
     BugDriver &BD;
   public:
@@ -512,8 +517,10 @@ DebugAMiscompilation(BugDriver &BD,
 
   // See if we can rip any loops out of the miscompiled functions and still
   // trigger the problem.
-  if (!BugpointIsInterrupted && 
-      ExtractLoops(BD, TestFn, MiscompiledFunctions)) {
+
+  if (!DisableLoopExtraction)
+    if (!BugpointIsInterrupted && 
+        ExtractLoops(BD, TestFn, MiscompiledFunctions)) {
     // Okay, we extracted some loops and the problem still appears.  See if we
     // can eliminate some of the created functions from being candidates.