[llvm] [SCEV] Introduce SCEVUse, use it instead of const SCEV * (NFCI) (WIP). (PR #91961)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 01:56:25 PDT 2024
https://github.com/nikic commented:
I assume that this patch is supposed to just mechanical changes for SCEVUse introduction -- otherwise this would need more adjustments, e.g. the poison analysis code would need to account for these flags, and these are proper poison flags rather than UB flags.
-----
I think my main high level question here is: What about SCEV unification? We get this straightforwardly for the top-level use flags because we can just compare the underlying pointers. But what about nested expressions?
If we have `((%a * %b)(u nuw) + %c)` and `((%a * %b) + %c)`, I assume we're actually going to treat these as two distinct, non-unified expressions. We currently rely on equality for SCEVs to be pointer equality, and this would somewhat break that. Do we need to have each SCEV also store a pointer to the unified SCEV without flags or something?
https://github.com/llvm/llvm-project/pull/91961
More information about the llvm-commits
mailing list