[llvm] r222562 - Disable header duplication at -Oz in loop-rotate pass.

Roman Divacky rdivacky at freebsd.org
Fri Nov 21 11:53:24 PST 2014


Author: rdivacky
Date: Fri Nov 21 13:53:24 2014
New Revision: 222562

URL: http://llvm.org/viewvc/llvm-project?rev=222562&view=rev
Log:
Disable header duplication at -Oz in loop-rotate pass.

Modified:
    llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp

Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=222562&r1=222561&r2=222562&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Fri Nov 21 13:53:24 2014
@@ -228,7 +228,8 @@ void PassManagerBuilder::populateModuleP
     MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
   MPM.add(createCFGSimplificationPass());     // Merge & remove BBs
   MPM.add(createReassociatePass());           // Reassociate expressions
-  MPM.add(createLoopRotatePass());            // Rotate Loop
+  // Rotate Loop - disable header duplication at -Oz
+  MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
   MPM.add(createLICMPass());                  // Hoist loop invariants
   MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
   MPM.add(createInstructionCombiningPass());





More information about the llvm-commits mailing list