[PATCH] D86133: [LoopNest] False negative of `arePerfectlyNested` with LCSSA loops
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 01:17:57 PDT 2020
fhahn added a comment.
In D86133#2227414 <https://reviews.llvm.org/D86133#2227414>, @Whitney wrote:
> In D86133#2226251 <https://reviews.llvm.org/D86133#2226251>, @TaWeiTu wrote:
>
>> Hi @Whitney, @fhahn, thanks for your review and comment!
>> Please let me know if there's any other problem with the patch.
>> Also, if the patch is ready to land, is it possible for you to commit it instead (I believe I don't have the commit access)?
>
> One minor comment, then LGTM. Let's see what Florian thinks.
Looks like my comments have been addressed thanks!
================
Comment at: llvm/lib/Analysis/LoopNestAnalysis.cpp:233
+ auto ContainsLCSSAPhi = [](const BasicBlock &B) {
+ return any_of(B, [&](const Instruction &I) {
+ const PHINode *PN = dyn_cast<PHINode>(&I);
----------------
fhahn wrote:
> You only need to check phi nodes. There's `B.phis()`. Also, usually it is more common to use `BB` for BasicBlock variables.
This only uses `PN` in the closure, right? So no need to use `[&]`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86133/new/
https://reviews.llvm.org/D86133
More information about the llvm-commits
mailing list