[PATCH] D142293: [InstCombine] Add PHINode operands to worklist on instruction erasure
Luke Lau via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 25 01:46:55 PST 2023
luke added a comment.
In D142293#4079311 <https://reviews.llvm.org/D142293#4079311>, @nikic wrote:
> Hm, this feels very hacky. I don't like the idea of adjusting the worklist management for specific patterns.
>
> To suggest a possible alternative, it might be possible to extend isDeadPHICycle(), by making it look through side-effect free instructions, as well as multiple users. This will allow it to remove larger dead phi cycles, so it would not just peel off one phi cycle at a time, but could remove the whole graph at once. (Of course subject to the visitation limit -- with the current one of 16, that would mean we could remove 8 nested phi cycles in one go, which is probably good enough?)
I agree, I'm not a huge fan of this either. That sounds like a better direction: I'll look into it, thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142293/new/
https://reviews.llvm.org/D142293
More information about the llvm-commits
mailing list