[PATCH] D74691: [Attributor] add some pattern to containsCycle

omar ahmed via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 18 14:44:05 PST 2020


omarahmed added a comment.

> 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
  }




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