[llvm] [IR][TBAA] Allow multiple fileds with same offset in TBAA struct-path (PR #76356)

Bushev Dmitry via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 31 06:05:56 PST 2024


dybv-sc wrote:

> Having looked at adding support for unions in the far past, starting from `new-struct-path tbaa` is probably a better way to come to a full solution that improves/allows more optimizations, as it also tracks the sizes of the fields. This makes it feasible to accurately detect what usages will result in overlap and what not. (Also see here for a more or less recent discussion about `new-struct-path tbaa` https://discourse.llvm.org/t/tbaa-new-struct-path-tbaa-status/70349 )

I agree that new struct path is good way to start. But still, it lacks ability to process multiple fields with same offset. This patch is aimed to improve new struct path (as well as the old one) by allowing union-like structures.
There may be some concerns you have about applying this feature to old struct path though. If there is any, please, let's discuss it.

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


More information about the llvm-commits mailing list