[PATCH] D101185: [LangRef] tbaa: type names can be used as hints to optimizations

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 15:21:03 PDT 2021


jeroen.dobbelaere added a comment.

In D101185#2716977 <https://reviews.llvm.org/D101185#2716977>, @fhahn wrote:

> On a high level, encoding more Clang specifics into the `tbaa` spec and using it as heuristics seems a bit unfortunate to me, as it may pessimize frontends that for various reasons cannot use `tbaa`, especially because the additional information does not seem `tbaa` specific to me.
>
> I understand it is very convenient to use `tbaa` in this case, but I am worried about non-Clang frontends once this heuristic becomes important for performance. What will we suggest to frontends that want to opt-in to the optimizations (but `tbaa` in general is not suitable for them)?

We could introduce something like `!tb.struct` which point to the similar structured information as `!tbaa.struct`. When that is present, that information could also be used to expand `llvm.memcpy`, but without enforcing the type based aliasing implications.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101185



More information about the llvm-commits mailing list