[clang] [llvm] [Clang][IR] add TBAA metadata on pointer, union and array types. (PR #75177)

Bushev Dmitry via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 09:28:20 PST 2024


dybv-sc wrote:

> Thanks for working on this! I think it would be good to split this up into multiple distinct parts for the different improvements.
> 
> I put up a patch to support distinct metadata for distinct pointers a while ago, which I just moved to GH: #76261.
> 
> The discussion on Phabricator has some interesting points and one of the concerns was that it is very difficult already to detect type violations in source code, which makes adopting more powerful TBAA features quite difficult. There are some tooling improvements we can make here, including a sanitizer for types, which would be good to get rolling again, see https://discourse.llvm.org/t/reviving-typesanitizer-a-sanitizer-to-catch-type-based-aliasing-violations/66092
> 
> TBAA union support and potential issues have been discussed in detail a number of years ago on the old mailing list (llvm-dev), did you have a look at those threads?

Hi,

Thanks for sharing those materials. Actually I didn't look into any discussions considering standard violations, so I would be glad if you share those threads.

Those standard violations worry me too, so as @rjmccall suggested, I put union TBAA under the option that is disabled by default. I am also considering to put pointer TBAA under option too, if it raises enough concerns too.

https://github.com/llvm/llvm-project/pull/75177


More information about the cfe-commits mailing list