Do not align loops if optimizing for size.
authorDevang Patel <dpatel@apple.com>
Tue, 25 Mar 2008 21:03:02 +0000 (21:03 +0000)
committerDevang Patel <dpatel@apple.com>
Tue, 25 Mar 2008 21:03:02 +0000 (21:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48794 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LLVMTargetMachine.cpp

index 33cf6b5489156e060b3c6a210b5f595b376a8fe0..04c59107f8ce628d5cbcadab0aff3407bffa761a 100644 (file)
@@ -135,7 +135,7 @@ LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
   if (addPreEmitPass(PM, Fast) && PrintMachineCode)
     PM.add(createMachineFunctionPrinterPass(cerr));
 
-  if (AlignLoops)
+  if (AlignLoops && !OptimizeForSize)
     PM.add(createLoopAlignerPass());
 
   switch (FileType) {