[PATCH] D120000: [1/2] TLS loads opimization (hoist)
Xiang Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 21 18:47:21 PST 2022
xiangzhangllvm marked 20 inline comments as done.
xiangzhangllvm added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/TLSVariableControl.cpp:115
+ void getAnalysisUsage(AnalysisUsage &AU) const override {
+ AU.setPreservesCFG();
+ AU.addRequired<DominatorTreeWrapperPass>();
----------------
xiangzhangllvm wrote:
> pengfei wrote:
> > setPreservesAll?
> the Pass is very near ISel, I think no need to preserves all.
The pass will change the code "move GV ahead", so let's just preserve CFG here.
================
Comment at: llvm/lib/Transforms/Scalar/TLSVariableControl.cpp:294-296
+ PreservedAnalyses PA;
+ PA.preserveSet<CFGAnalyses>();
+ return PA;
----------------
xiangzhangllvm wrote:
> pengfei wrote:
> > Do we break any analyse info? Can we return `PreservedAnalyses::all()`?
> This pass is very later at Scalar optmization. I think we no need to preserve all. Let me carefully re-consider here, thanks!
The pass may change the code "move GV ahead", so let's just preserve CFG here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120000/new/
https://reviews.llvm.org/D120000
More information about the llvm-commits
mailing list