[PATCH] D61607: Introduce an option to stripPointerCasts to force the same bit pattern
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 18:17:51 PDT 2019
arsenm added a comment.
In D61607#1511408 <https://reviews.llvm.org/D61607#1511408>, @jdoerfert wrote:
> In D61607#1510412 <https://reviews.llvm.org/D61607#1510412>, @hfinkel wrote:
>
> > In D61607#1510395 <https://reviews.llvm.org/D61607#1510395>, @arsenm wrote:
> >
> > > In D61607#1510300 <https://reviews.llvm.org/D61607#1510300>, @hfinkel wrote:
> > >
> > > > I agree with this. I recall past conversations about adding something to DataLayout to say that some address-space pairs share the same pointer representation, or some aspects of the representation, I don't know if we ever had a strong-enough use case to write the code, but should such a worthwhile case emerge, I can certainly see us teaching the optimizer that some as-casts don't change (certain relevant aspects of) the underlying representation.
> > >
> > >
> > > I'd like to allow bitcasts between pointers with the same size for this purpose
> > >
> > > > As a bit of bikeshedding, I like the term 'representation' better than 'pattern'. I wonder if the name `stripPointerCastsSameIntRepresentation` would be clearer? (The idea being that pointers are opaque types at the IR level, but get integer representations via ptrtoint).
> > >
> > > There are non-integral pointers, so I don't think the name should refer to integers
> >
> >
> > Good point. I'll revise my suggestion `stripPointerCastsSameRepresentation`.
>
>
> I don't want to argue about the name at this point. I gladly change it if I get a LGTM with the name change request. (@arsenm?)
+1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61607/new/
https://reviews.llvm.org/D61607
More information about the llvm-commits
mailing list