From 40bb92a5cc199d5973b7306345e3329c3477ac86 Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Wed, 15 Feb 2012 05:22:12 +0000 Subject: [PATCH] reverting r150565. Premature push. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150566 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/Passes.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/CodeGen/Passes.cpp b/lib/CodeGen/Passes.cpp index 977ecaa7ece..ec1f2b4c3b2 100644 --- a/lib/CodeGen/Passes.cpp +++ b/lib/CodeGen/Passes.cpp @@ -582,8 +582,14 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) { // // FIXME: Re-enable coloring with register when it's capable of adding // kill markers. - if (addPass(StackSlotColoringID) != &NoPaddID) - printAndVerify("After StackSlotColoring"); + addPass(StackSlotColoringID); + + // Run post-ra machine LICM to hoist reloads / remats. + // + // FIXME: can this move into MachineLateOptimization? + addPass(PostRAMachineLICMID); + + printAndVerify("After StackSlotColoring and postra Machine LICM"); } //===---------------------------------------------------------------------===// @@ -592,10 +598,6 @@ void TargetPassConfig::addOptimizedRegAlloc(FunctionPass *RegAllocPass) { /// Add passes that optimize machine instructions after register allocation. void TargetPassConfig::addMachineLateOptimization() { - // Run post-ra machine LICM to hoist reloads / remats. - if (addPass(PostRAMachineLICMID) != &NoPassID) - printAndVerify("After postra Machine LICM"); - // Branch folding must be run after regalloc and prolog/epilog insertion. if (addPass(BranchFolderPassID) != &NoPassID) printNoVerify("After BranchFolding"); -- 2.34.1