[PATCH] D104498: [WIP][ScalarEvolution] Strictly enforce pointer/int type rules.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 09:09:37 PDT 2021
reames added a comment.
In D104498#2835096 <https://reviews.llvm.org/D104498#2835096>, @efriedma wrote:
> In D104498#2835013 <https://reviews.llvm.org/D104498#2835013>, @reames wrote:
>
>> Style wise, I really don't see the value in the getPointerDiff api. Most of the places which need to compute a diff work with both pointers and integers. I'd rather just have getMinusSCEV documented as being able to return CouldNotCompute when both operands are pointers.
>
> Do you mean getMinusSCEV would never generate PtrToInt expressions, or just that it wouldn't generate them for non-integral pointers? I mean, we could make it work either way, but it would probably be easier to support non-integral pointers if all pointers behave the same way.
Conceptual cleanliness says to treat all pointers the same, but I think the code becomes a lot more complicated if we do. I think I would special case NI pointers for the moment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104498/new/
https://reviews.llvm.org/D104498
More information about the llvm-commits
mailing list