[PATCH] D74691: [Attributor] add some pattern to containsCycle
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 09:12:31 PST 2020
jdoerfert added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Attributor.cpp:2376-2380
+ A.getInfoCache().getAnalysisResultForFunction<ScalarEvolutionAnalysis>(
+ F);
+ LoopInfo *LI =
+ A.getInfoCache().getAnalysisResultForFunction<LoopAnalysis>(F);
+ if (!LI || !SE) continue;
----------------
baziotis wrote:
> I believe you can get all those (LI, SE and their tests for null) out (i.e. before) of the loop, I don't think they can change.
Yes. But you also cannot `continue` if LI or SE is null. If you don't have those analysis you need to be conservative about the result.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74691/new/
https://reviews.llvm.org/D74691
More information about the llvm-commits
mailing list