class CBE;
class GCC;
+extern bool DisableSimplifyCFG;
+
class BugDriver {
const std::string ToolName; // Name of bugpoint
std::string ReferenceOutputFile; // Name of `good' output file
// to a return instruction then running simplifycfg, which can potentially
// shrinks the code dramatically quickly
//
- std::vector<BasicBlock*> Blocks;
- for (Module::iterator I = Program->begin(), E = Program->end(); I != E; ++I)
- for (Function::iterator FI = I->begin(), E = I->end(); FI != E; ++FI)
- Blocks.push_back(FI);
- ReduceCrashingBlocks(*this).reduceList(Blocks);
+ if (!DisableSimplifyCFG) {
+ std::vector<BasicBlock*> Blocks;
+ for (Module::iterator I = Program->begin(), E = Program->end(); I != E; ++I)
+ for (Function::iterator FI = I->begin(), E = I->end(); FI != E; ++FI)
+ Blocks.push_back(FI);
+ ReduceCrashingBlocks(*this).reduceList(Blocks);
+ }
// FIXME: This should use the list reducer to converge faster by deleting
// larger chunks of instructions at a time!
#include "llvm/Constant.h"
#include "Support/CommandLine.h"
+bool DisableSimplifyCFG = false;
+
namespace {
cl::opt<bool>
NoADCE("disable-adce",
cl::opt<bool>
NoDCE ("disable-dce",
cl::desc("Do not use the -dce pass to reduce testcases"));
- cl::opt<bool>
- NoSCFG("disable-simplifycfg",
+ cl::opt<bool, true>
+ NoSCFG("disable-simplifycfg", cl::location(DisableSimplifyCFG),
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
cl::opt<bool>
NoFinalCleanup("disable-final-cleanup",
//Passes.add(createInstructionCombiningPass());
if (Simplification > 1 && !NoDCE)
Passes.add(createDeadCodeEliminationPass());
- if (Simplification && !NoSCFG)
+ if (Simplification && !DisableSimplifyCFG)
Passes.add(createCFGSimplificationPass()); // Delete dead control flow
Passes.add(createVerifierPass());