[PATCH] D99851: [SROA][TBAA] Handle shift of regular TBAA nodes

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 02:42:39 PDT 2021


jeroen.dobbelaere accepted this revision.
jeroen.dobbelaere added a comment.
This revision is now accepted and ready to land.

I have been investigating the behavior of `struct path tbaa` and `new struct path tbaa`. Based on what I could find, returning `MD` is the correct thing to do in `struct path tbaa`.

My understanding is that for `new struct path tbaa`, it is/was the intention to support shifting, but the `Verifier.cpp` is not allowing this at this moment.
So for now, returning `MD` should also be ok at this moment.

It is also interesting to note that the `{ i64, i64 }` struct, represented as a `char` with size 16, originates from a member function pointer. clang will map unhandled types to `char` by default. (See `CodeGenTBAA.cpp: getTypeInfoHelper(..)`)
See D40176 <https://reviews.llvm.org/D40176> and D39956 <https://reviews.llvm.org/D39956> by for some more info about the `new struct path tbaa`. IMHO, we should pick up this work, come up with a decent specification and provide in-tree documentation.
(@kosarev As far as I could find, the current specification is in https://lists.llvm.org/pipermail/llvm-dev/2017-November/118748.html )

I'll bring this up in next weeks LLVM AA Tech Call.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99851



More information about the llvm-commits mailing list