[PATCH] D104503: [SCEV] Don't require dominance ordering of add/mul/min/max expressions
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 21 09:32:45 PDT 2021
reames added a comment.
In D104503#2829510 <https://reviews.llvm.org/D104503#2829510>, @efriedma wrote:
> There are two relevant questions:
>
> 1. Does SCEV do something reasonable with such an expression? I mean, you obviously can't expand it; there isn't any viable insertion point. More generally, I'm not sure it's meaningful; even if we drop the assertions, it's not clear what the result is supposed to represent. If we want to support "subtracting" two addrecs to do dependency analysis, we should probably add a dedicated method, which returns something that isn't a regular SCEV expression.
> 2. Why is SCEVAA trying to construct such an expression? AliasAnalysis::alias() doesn't make any sense if there isn't a dominance relationship between the two pointers.
On (1), I think that point has convinced me we need to not create such scevs and return could not compute instead. Will give it a bit more thought, but that's the way I'm currently leaning.
On (2), alias set tracker doesn't check dominance relations. I haven't confirmed, but I'm 90% sure that's the issue. aa-eval also does a cross product without concern for dominance.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104503/new/
https://reviews.llvm.org/D104503
More information about the llvm-commits
mailing list