summaryrefslogtreecommitdiff
path: root/tools/bugpoint/Miscompilation.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-11-11 19:05:02 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-11-11 19:05:02 +0000
commitdc31a8a70cab3b4c180ac1a482855e31d3fe8e6b (patch)
tree0498240c96a8648716ff5e96ccd40e856ffe899a /tools/bugpoint/Miscompilation.cpp
parent4952143236afe43b974798c45ed265bb175c9d7f (diff)
downloadllvm-dc31a8a70cab3b4c180ac1a482855e31d3fe8e6b.tar.gz
llvm-dc31a8a70cab3b4c180ac1a482855e31d3fe8e6b.tar.bz2
llvm-dc31a8a70cab3b4c180ac1a482855e31d3fe8e6b.tar.xz
Add a -disable-loop-extraction option to bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/bugpoint/Miscompilation.cpp')
-rw-r--r--tools/bugpoint/Miscompilation.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/bugpoint/Miscompilation.cpp b/tools/bugpoint/Miscompilation.cpp
index 850fb83f84..116e3a5371 100644
--- a/tools/bugpoint/Miscompilation.cpp
+++ b/tools/bugpoint/Miscompilation.cpp
@@ -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.