[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)
Nathan Sidwell via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 13 06:38:21 PST 2024
urnathan wrote:
> On the LLVM side, there's very little interesting logic; it's basically just walking the tree of metadata nodes generated by clang. See https://llvm.org/docs/LangRef.html#tbaa-node-semantics . The hard part of the refactoring would just be adding an abstraction for the underlying information.
IIUC you're suggesting movint the TBAA data origination from CodeGen into (probably) Sema and/or TargetInfo and then deriving the LLVM info in CodeGen from that. I.e. keep once source of truth, but move where it is?
I don't think it'd be that hard -- mostly mechanical. And I suspect only the scalar TBAA needs so moving, the structure-related stuff is sufficiently different to that strict-aliasing wants.
Although you don't explicitly say it, the implication is you'd be ameanable to such an approach?
https://github.com/llvm/llvm-project/pull/74155
More information about the cfe-commits
mailing list