From 471bcb750edb2ab67cf82611ff9494e1e26e40b2 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 11 Nov 2006 19:05:02 +0000 Subject: Add a -disable-loop-extraction option to bugpoint. llvm-svn: 31683 --- llvm/tools/bugpoint/Miscompilation.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'llvm/tools/bugpoint/Miscompilation.cpp') diff --git a/llvm/tools/bugpoint/Miscompilation.cpp b/llvm/tools/bugpoint/Miscompilation.cpp index 850fb83f848..116e3a53715 100644 --- a/llvm/tools/bugpoint/Miscompilation.cpp +++ b/llvm/tools/bugpoint/Miscompilation.cpp @@ -33,6 +33,11 @@ namespace llvm { } namespace { + static llvm::cl::opt + DisableLoopExtraction("disable-loop-extraction", + cl::desc("Don't extract loops when searching for miscompilations"), + cl::init(false)); + class ReduceMiscompilingPasses : public ListReducer { 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. -- cgit v1.2.3