[PATCH] D74691: [Attributor] add some pattern to containsCycle
Stefanos Baziotis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 07:21:10 PST 2020
baziotis added a comment.
In D74691#1880575 <https://reviews.llvm.org/D74691#1880575>, @omarahmed wrote:
> Thanks for this great reviews :)
No problem.
>
>
>> They're equal: This SCC is a loop, continue to the next.
>> The loop is bigger: The SCC is not a loop, return.
>
> @baziotis Shouldn't this conditions be reversed as when we find a loop we should check the max trip count and return if it was 0 , and when the loop is bigger we should continue looping on the SCCs ?
Yes, actually, what I said there was incomplete. When they're equal, you know it's a loop but that's not enough. You should also check that it has a max trip count. Otherwise, you return.
But note that when I say "bigger", "equal" etc. I'm referring to the number of //blocks// in the SCC or the loop. Not the trip count. Also note that a SCC doesn't have the concept of trip count.
If there are more questions or something was unclear, please follow up.
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