[PATCH] D86696: [Attributor][WIP] Introduce Loop AA
Hideto Ueno via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 27 05:57:29 PDT 2020
uenoku added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:7943
+ if (auto *BI = dyn_cast<BranchInst>(&I)) {
+ auto *Op = BI->getOperand(0);
+ const auto &OpAA =
----------------
baziotis wrote:
> For that to make sense, you have to verify that the branch `isConditional()`. Also, note that loops
> may be [[ https://llvm.org/docs/LoopTerminology.html#rotated-loops | rotated ]]. In that case, the condition is not in the header block, but in the latch.
>
> Generally, loops can get quite complicated and so, as Kuter said, you probably want to use
> SCEV (for example, backedge taken count etc.) I'll have to think that again because SCEV
> won't benefit from Attributor, meaning, at a high-level, using constant range AA when it makes
> sense seems reasonable.
FWIW, AAConstantRange actually uses SCEV internally but I agree that using AAConstantRange might make things complicated as a starting point. So you can use SCEV first.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86696/new/
https://reviews.llvm.org/D86696
More information about the llvm-commits
mailing list