[PATCH] D108651: [SCEV] Use no-self-wrap flags infered from exit structure to compute trip count

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 8 11:17:54 PDT 2021


reames added a comment.

After landing this, I've explored more test cases and have largely convinced myself that this should live in indvarsimplify instead.  I don't fully understand why yet, but despite recording the stronger flags in SCEV, we're never able to back propagate them into the IR.  (I believe it has something to do with the mutation of existing SCEVs and lack of invalidation resulting in imprecise results continuing to be returned for certain queries.)  I think we'd be overall better off letting them be added to the IR, even if SCEV isn't able to leverage them until the next rebuild.  The other option is that we duplicate the logic, but I'd really rather not.

I've proposed D109457 <https://reviews.llvm.org/D109457> which builds on this, and I want to land it with this architecture, but once that's done, I plan on moving the whole bit of logic to indvars (with separate review).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108651/new/

https://reviews.llvm.org/D108651



More information about the llvm-commits mailing list