[PATCH] D65118: Analysis: Don't look through aliases when simplifying GEPs.

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 14:14:57 PDT 2019


jdoerfert added a comment.

In D65118#1597868 <https://reviews.llvm.org/D65118#1597868>, @pcc wrote:

> For the opt-in behaviour it seems that we should have the `strip*()` ignore the linkage and leave it up to the caller to make the correct determination based on the linkage of the alias. For example, the inliner or global const prop would check `isInterposable()`, and attribute-based optimizations would check `isDefinitionExact()`.


Mh, I think that would change how the `strip*()` family currently works. What about: Looking through `isDefinitionExact` by default for `strip*()` except for "NoFollowAliases". That way, users have to manually strip non-interposable aliases that do not have an exact definition and they get a somehow sane/sound result if they strip aliases. If needed, we could add a "FollowNonInterposableAliases" later as well.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65118/new/

https://reviews.llvm.org/D65118





More information about the llvm-commits mailing list