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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri May 10 11:29:41 PDT 2024


fhahn wrote:

> The current handling of SCEV flags is a pretty general issue, and the approach used here will only be usable in limited circumstances -- ideally, we would want to be able to preserve flags when going from IR to SCEV, but I don't think that the scope-based approach here will enable that (or at least, not to a significant degree and not without complications).
> 

Fair point, I also spent a bit more time to see if I would be feasible to prevent leakage but it proved quite tricky.

> The general approach I would consider is to replace our current `const SCEV *` pointers with `SCEVUse`, where the low bits are used to store no-wrap flags for a specific use of the expression.

Yeah that should also cover my use case here. I'll try to sketch a prototype

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


More information about the llvm-commits mailing list