[PATCH] D74691: [Attributor] add some pattern to containsCycle
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 14:56:14 PST 2020
baziotis added a comment.
In D74691#1881530 <https://reviews.llvm.org/D74691#1881530>, @omarahmed wrote:
> > First of all, try to get L. If you don't have a loop (so, L is null) then this
> > SCC is not a loop so return true immediately.
>
> couldn't we use SCCiter.hasLoop() in addition to this condition to check for loops as this condition always breaks with me in tests like that which have SCCs with single block that does not have loops and the above condition makes them return true when they don't have any cycles ?
>
> define void @only_return() #0 {
> ret void
> }
>
Yes, you're right! I missed that.
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