[llvm] [SCEV,LAA] Introduce scoped SCEV, use in LAA computations (WIP). (PR #90742)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 13:18:35 PDT 2024


fhahn wrote:

> It seems a bit dangerous to me to make the "scope" global per SCEV: scoped SCEVs could accidentally leak into contexts where you don't intend to use them (like the trip counts of loops). I guess the opposite is also sort of dangerous, though: if you accidentally drop the scope, you can accidentally introduce flags onto unscoped SCEVs.

Yes, I think the main ones are computing new trip counts when a scope is set or `setNoWrapFlags()` to strengthen wrap flags while building other SCEVs being used when a scope is set. I'll see if we can add asserts to guard against those cases.

https://github.com/llvm/llvm-project/pull/90742


More information about the llvm-commits mailing list