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

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 19 01:44:46 PDT 2017


Author: grosser
Date: Sat Aug 19 01:44:46 2017
New Revision: 311231

URL: http://llvm.org/viewvc/llvm-project?rev=311231&view=rev
Log:
[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.

Modified:
    polly/trunk/lib/Transform/Canonicalization.cpp

Modified: polly/trunk/lib/Transform/Canonicalization.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/Canonicalization.cpp?rev=311231&r1=311230&r2=311231&view=diff
==============================================================================
--- polly/trunk/lib/Transform/Canonicalization.cpp (original)
+++ polly/trunk/lib/Transform/Canonicalization.cpp Sat Aug 19 01:44:46 2017
@@ -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());




More information about the llvm-commits mailing list