Run LICM as part of the cleanup phase from the scalar optimizer.
authorJames Molloy <james.molloy@arm.com>
Mon, 16 Feb 2015 18:59:54 +0000 (18:59 +0000)
committerJames Molloy <james.molloy@arm.com>
Mon, 16 Feb 2015 18:59:54 +0000 (18:59 +0000)
Things like LoopUnrolling can produce loop invariant values - make sure
we pick them up.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229419 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/PassManagerBuilder.cpp

index 0ea7ebd6b6a8484ace085e6ae5e4763af45b16cf..00b8c7cbbd7c87e43ee3ad52fbdd35a94a340a02 100644 (file)
@@ -259,6 +259,7 @@ void PassManagerBuilder::populateModulePassManager(
   MPM.add(createJumpThreadingPass());         // Thread jumps
   MPM.add(createCorrelatedValuePropagationPass());
   MPM.add(createDeadStoreEliminationPass());  // Delete dead stores
+  MPM.add(createLICMPass());
 
   addExtensionsToPM(EP_ScalarOptimizerLate, MPM);