Do not align loops if optimizing for size.
[oota-llvm.git] / 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) {