[Polly] Run early cse + memory SSA to remove redundancies in the input code

This allows us to get rid of many identical loads as they commonly appear in
Fortran code.

llvm-svn: 311231
This commit is contained in:
Tobias Grosser 2017-08-19 08:44:46 +00:00
parent 59dc64f3af
commit d5f1fad77c
1 changed files with 2 additions and 0 deletions

View File

@ -28,8 +28,10 @@ static cl::opt<bool>
cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory));
void polly::registerCanonicalicationPasses(llvm::legacy::PassManagerBase &PM) {
bool UseMemSSA = true;
PM.add(polly::createRewriteByrefParamsPass());
PM.add(llvm::createPromoteMemoryToRegisterPass());
PM.add(llvm::createEarlyCSEPass(UseMemSSA));
PM.add(llvm::createInstructionCombiningPass());
PM.add(llvm::createCFGSimplificationPass());
PM.add(llvm::createTailCallEliminationPass());