mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 20:27:42 +00:00
Add options to disable simplification with passes, in case one of them crashes
llvm-svn: 5950
This commit is contained in:
parent
1f7fab6047
commit
e05ccb1be2
@ -14,6 +14,19 @@
|
||||
#include "llvm/Analysis/Verifier.h"
|
||||
#include "llvm/Type.h"
|
||||
#include "llvm/Constant.h"
|
||||
#include "Support/CommandLine.h"
|
||||
|
||||
namespace {
|
||||
cl::opt<bool>
|
||||
NoADCE("disable-adce",
|
||||
cl::desc("Do not use the -adce pass to reduce testcases"));
|
||||
cl::opt<bool>
|
||||
NoDCE ("disable-dce",
|
||||
cl::desc("Do not use the -dce pass to reduce testcases"));
|
||||
cl::opt<bool>
|
||||
NoSCFG("disable-simplifycfg",
|
||||
cl::desc("Do not use the -simplifycfg pass to reduce testcases"));
|
||||
}
|
||||
|
||||
/// deleteInstructionFromProgram - This method clones the current Program and
|
||||
/// deletes the specified instruction from the cloned module. It then runs a
|
||||
@ -46,12 +59,12 @@ Module *BugDriver::deleteInstructionFromProgram(Instruction *I,
|
||||
|
||||
// Spiff up the output a little bit.
|
||||
PassManager Passes;
|
||||
if (Simplification > 2)
|
||||
if (Simplification > 2 && !NoADCE)
|
||||
Passes.add(createAggressiveDCEPass()); // Remove dead code...
|
||||
//Passes.add(createInstructionCombiningPass());
|
||||
if (Simplification > 1)
|
||||
if (Simplification > 1 && !NoDCE)
|
||||
Passes.add(createDeadCodeEliminationPass());
|
||||
if (Simplification)
|
||||
if (Simplification && !NoSCFG)
|
||||
Passes.add(createCFGSimplificationPass()); // Delete dead control flow
|
||||
|
||||
Passes.add(createVerifierPass());
|
||||
|
Loading…
x
Reference in New Issue
Block a user