]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/patches/patch-10-llvm-r222562-loop-rotate.diff
Upgrade our copy of clang and llvm to 3.5.1 release. This is a bugfix
[FreeBSD/FreeBSD.git] / contrib / llvm / patches / patch-10-llvm-r222562-loop-rotate.diff
1 Pull in r222562 from upstream llvm trunk (by Roman Divacky):
2
3   Disable header duplication at -Oz in loop-rotate pass.
4
5 This helps to minimize the size of boot2.
6
7 Introduced here: http://svnweb.freebsd.org/changeset/base/274968
8
9 Index: lib/Transforms/IPO/PassManagerBuilder.cpp
10 ===================================================================
11 --- lib/Transforms/IPO/PassManagerBuilder.cpp
12 +++ lib/Transforms/IPO/PassManagerBuilder.cpp
13 @@ -195,7 +195,8 @@ void PassManagerBuilder::populateModulePassManager
14      MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
15    MPM.add(createCFGSimplificationPass());     // Merge & remove BBs
16    MPM.add(createReassociatePass());           // Reassociate expressions
17 -  MPM.add(createLoopRotatePass());            // Rotate Loop
18 +  // Rotate Loop - disable header duplication at -Oz
19 +  MPM.add(createLoopRotatePass(SizeLevel == 2 ? 0 : -1));
20    MPM.add(createLICMPass());                  // Hoist loop invariants
21    MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3));
22    MPM.add(createInstructionCombiningPass());