[PATCH] D50295: Let GetUnderlyingObject/Objects use MemorySSA
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 6 01:55:01 PDT 2018
aqjune added a comment.
In https://reviews.llvm.org/D50295#1188969, @hfinkel wrote:
> In https://reviews.llvm.org/D50295#1188623, @aqjune wrote:
>
> > store i8* %p, i8** %q
> > %p2 = load i8*, i8** %q ; p2 is p
> >
> >
> > If we have MemorySSA, this can be resolved in constant time. I believe BasicAliasAnalysis can get benefit this, hence supporting partially flow sensitive analysis.
>
>
> I read that in the comment ;) -- but why? Shouldn't all such cases be simplified by GVN (etc.) into a form where GetUnderlyingObjects, as is, can reason about them?
Ideally, yes - but wouldn't eagerly removing such store-load pairs be costly?
A pair of store-load still remains in this example as well - https://godbolt.org/g/zutKyi (`load i8*, i8**` still remains)
Or I can search for a way to remove such pairs in more eager way, by adopting MemorySSA into InstSimplify or making GVN remove the pair in the example above.
https://reviews.llvm.org/D50295
More information about the llvm-commits
mailing list