forked from OSchip/llvm-project
Remove redundant SCCP pass
Add new DSE pass. Add a temporary option to disable it in case we need it This is going in after the July 22 nightly tester run, so we'll wait until the 23rd to see it :) llvm-svn: 15104
This commit is contained in:
parent
1a876fab64
commit
7ba1be09b3
|
@ -46,6 +46,9 @@ namespace {
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
DisableOptimizations("disable-opt",
|
DisableOptimizations("disable-opt",
|
||||||
cl::desc("Do not run any optimization passes"));
|
cl::desc("Do not run any optimization passes"));
|
||||||
|
|
||||||
|
cl::opt<bool>
|
||||||
|
DisableDSE("disable-dse", cl::desc("Do not run dead store elimination"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -99,11 +102,12 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
|
||||||
addPass(PM, createLoadValueNumberingPass()); // GVN for load instructions
|
addPass(PM, createLoadValueNumberingPass()); // GVN for load instructions
|
||||||
addPass(PM, createGCSEPass()); // Remove common subexprs
|
addPass(PM, createGCSEPass()); // Remove common subexprs
|
||||||
addPass(PM, createSCCPPass()); // Constant prop with SCCP
|
addPass(PM, createSCCPPass()); // Constant prop with SCCP
|
||||||
addPass(PM, createSCCPPass()); // Constant prop with SCCP
|
|
||||||
|
|
||||||
// Run instcombine after redundancy elimination to exploit opportunities
|
// Run instcombine after redundancy elimination to exploit opportunities
|
||||||
// opened up by them.
|
// opened up by them.
|
||||||
addPass(PM, createInstructionCombiningPass());
|
addPass(PM, createInstructionCombiningPass());
|
||||||
|
if (!DisableDSE)
|
||||||
|
addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores
|
||||||
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
|
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
|
||||||
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
||||||
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types
|
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types
|
||||||
|
|
Loading…
Reference in New Issue