[PATCH] D21772: New pass manager for LICM.
David Li via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 3 07:33:04 PDT 2016
davidxl added inline comments.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:140
@@ +139,3 @@
+ &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(),
+ &getAnalysis<ScalarEvolutionWrapperPass>().getSE());
+ }
----------------
getAnalysisIfAvailable(..)
================
Comment at: lib/Transforms/Scalar/LICM.cpp:149
@@ -121,2 +148,3 @@
AU.addRequired<TargetLibraryInfoWrapperPass>();
+ AU.addRequired<ScalarEvolutionWrapperPass>();
getLoopAnalysisUsage(AU);
----------------
This changes functionality -- remove
================
Comment at: lib/Transforms/Scalar/LICM.cpp:178
@@ +177,3 @@
+PreservedAnalyses LICMPass::run(Loop &L, AnalysisManager<Loop> &AM) {
+ const auto &FAM =
+ AM.getResult<FunctionAnalysisManagerLoopProxy>(L).getManager();
----------------
add a //FIXME for skip loop check
================
Comment at: lib/Transforms/Scalar/LICM.cpp:282
@@ -259,4 +281,3 @@
if (Changed)
- if (auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>())
- SEWP->getSE().forgetLoopDispositions(L);
+ SE->forgetLoopDispositions(L);
return Changed;
----------------
guarded with null check?
================
Comment at: test/Transforms/LICM/hoist-deref-load.ll:2
@@ -1,2 +1,3 @@
; RUN: opt -S -basicaa -licm < %s | FileCheck %s
+; RUN: opt -loop-simplifycfg %s | opt -aa-pipeline=basic-aa -passes='require<aa>,require<targetir>,require<scalar-evolution>,loop(licm)' -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
----------------
Is loop-simplifycfg available in new pm?
http://reviews.llvm.org/D21772
More information about the llvm-commits
mailing list