Added option -align-loops=<true/false> to disable loop aligner pass.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47736 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index 5611b03..32fbc15 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -37,6 +37,9 @@
 EnableSinking("enable-sinking", cl::init(false), cl::Hidden,
               cl::desc("Perform sinking on machine code"));
 static cl::opt<bool>
+AlignLoops("align-loops", cl::init(true), cl::Hidden,
+              cl::desc("Align loop headers"));
+static cl::opt<bool>
 PerformLICM("machine-licm",
             cl::init(false), cl::Hidden,
             cl::desc("Perform loop-invariant code motion on machine code"));
@@ -132,6 +135,9 @@
   if (addPreEmitPass(PM, Fast) && PrintMachineCode)
     PM.add(createMachineFunctionPrinterPass(cerr));
 
+  if (AlignLoops)
+    PM.add(createLoopAlignerPass());
+
   switch (FileType) {
   default:
     break;