[all-commits] [llvm/llvm-project] d2a9df: [TBAA] Handle bitfields when generating !tbaa.stru...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Tue Feb 27 12:10:05 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d2a9df2c8ffd21fd52fbd8199a191d10078f41af
https://github.com/llvm/llvm-project/commit/d2a9df2c8ffd21fd52fbd8199a191d10078f41af
Author: Florian Hahn <flo at fhahn.com>
Date: 2024-02-27 (Tue, 27 Feb 2024)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/CodeGen/CodeGenTBAA.cpp
M clang/lib/CodeGen/CodeGenTBAA.h
M clang/test/CodeGen/tbaa-struct.cpp
Log Message:
-----------
[TBAA] Handle bitfields when generating !tbaa.struct metadata. (#82922)
At the moment, clang generates what I believe are incorrect !tbaa.struct
fields for named bitfields. At the moment, the base type size is used
for named bifields (e.g. sizeof(int)) instead of the bifield width per
field. This results in overalpping fields in !tbaa.struct metadata.
This causes incorrect results when extracting individual copied fields
from !tbaa.struct as in added in dc85719d5.
This patch fixes that by skipping by combining adjacent bitfields
in fields with correct sizes.
Fixes https://github.com/llvm/llvm-project/issues/82586
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list