[PATCH] D122573: [TBAA] Emit distinct TBAA tags for pointers with different depths,types.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 29 12:02:39 PDT 2022


rjmccall added a comment.

In D122573#3414357 <https://reviews.llvm.org/D122573#3414357>, @fhahn wrote:

> In D122573#3412109 <https://reviews.llvm.org/D122573#3412109>, @rjmccall wrote:
>
>> Hmm.  We know that the big picture here, distinguishing pointers by pointee type, is going to be disruptive and will probably need a specific enabling/disabling option.  I'm not sure that distinguishing only by pointer depth is a minor enough step that it shouldn't be treated the same way; in particular, it's going to start treating `void *` as incompatible with e.g. `char **`.
>
> @rjmccall do you have any suggestions how to further reduce the initial step?

Well, if you can find a solution to the `void*` <-> `T**` problem, that might make it tractable.  Or you can introduce a flag to control whether we do this — I guess on some level `-fstrict-aliasing` ought to be the full language model, so this would mean introducing a `-fless-strict-aliasing` or something like it.

I agree that better tooling seems necessary.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122573



More information about the cfe-commits mailing list