[llvm-commits] [llvm] r59967 - /llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Dan Gohman gohman at apple.com
Mon Nov 24 09:22:52 PST 2008


Author: djg
Date: Mon Nov 24 11:22:52 2008
New Revision: 59967

URL: http://llvm.org/viewvc/llvm-project?rev=59967&view=rev
Log:
Run post-RA scheduling after branch folding, as it tends to
obscure tail-merging opportunities.

Modified:
    llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp

Modified: llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp?rev=59967&r1=59966&r2=59967&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp (original)
+++ llvm/trunk/lib/CodeGen/LLVMTargetMachine.cpp Mon Nov 24 11:22:52 2008
@@ -225,6 +225,13 @@
   if (PrintMachineCode)
     PM.add(createMachineFunctionPrinterPass(cerr));
 
+  // Branch folding must be run after regalloc and prolog/epilog insertion.
+  if (!Fast)
+    PM.add(createBranchFoldingPass(getEnableTailMergeDefault()));
+
+  if (PrintMachineCode)
+    PM.add(createMachineFunctionPrinterPass(cerr));
+
   // Second pass scheduler.
   if (!Fast && !DisablePostRAScheduler) {
     PM.add(createPostRAScheduler());
@@ -233,10 +240,6 @@
       PM.add(createMachineFunctionPrinterPass(cerr));
   }
 
-  // Branch folding must be run after regalloc and prolog/epilog insertion.
-  if (!Fast)
-    PM.add(createBranchFoldingPass(getEnableTailMergeDefault()));
-
   PM.add(createGCMachineCodeAnalysisPass());
 
   if (PrintMachineCode)





More information about the llvm-commits mailing list