[llvm] [TBAA] Assume struct member TBAA does not alias errno (PR #200367)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 00:36:27 PDT 2026


nikic wrote:

> Maybe we should fix this by changing the way we construct errno tbaa? If we represent errno as a member of a struct __libc_errno, the correct aliasing implications should fall out automatically.

Interesting idea. I wonder, could we also use that to fix the libc LTO issue? What I'm thinking is that we use `__libc_errno` normally, and `int` directly with `-ffreestanding` (as a proxy for that being libc). This means that if both modules get linked together, we'll have both in the `!llvm.errno.tbaa`, which means that the more liberal `int` will win.

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


More information about the llvm-commits mailing list