[PATCH] D128501: [CodeGen] Make uninitialized Lvalue bit-field stores poison compatible
John McIver via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 01:43:19 PDT 2022
jmciver created this revision.
Herald added a project: All.
jmciver edited the summary of this revision.
jmciver edited the summary of this revision.
jmciver added reviewers: rjmccall, eli.friedman.
jmciver added a subscriber: nlopes.
jmciver published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Poison compatibility is provided by emitting a freeze instruction, post load,
for all Lvalue bit-field store operations. This solution is indiscriminate to
the initialization state and thus the freeze instruction may hide poison during
subsequent re-assignments.
This patch implements the first proposed solution from the following RFC:
https://discourse.llvm.org/t/rfc-making-bit-field-codegen-poison-compatible/63250
The test-suite is passing; my current setup is not idea for timing information.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D128501
Files:
clang/lib/CodeGen/CGExpr.cpp
clang/test/CodeGen/aapcs-bitfield.c
clang/test/CodeGen/no-bitfield-type-align.c
clang/test/CodeGenCXX/alignment.cpp
clang/test/CodeGenCXX/bitfield.cpp
clang/test/CodeGenCXX/ext-int.cpp
clang/test/CodeGenCXX/finegrain-bitfield-access.cpp
clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp
clang/test/CodeGenCXX/references.cpp
clang/test/CodeGenObjC/strong-in-c-struct.m
clang/test/OpenMP/atomic_capture_codegen.cpp
clang/test/OpenMP/atomic_update_codegen.cpp
clang/test/OpenMP/atomic_write_codegen.c
clang/test/OpenMP/for_lastprivate_codegen.cpp
clang/test/OpenMP/for_linear_codegen.cpp
clang/test/OpenMP/parallel_firstprivate_codegen.cpp
clang/test/OpenMP/parallel_private_codegen.cpp
clang/test/OpenMP/parallel_reduction_codegen.cpp
clang/test/OpenMP/single_codegen.cpp
clang/test/OpenMP/teams_private_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128501.439656.patch
Type: text/x-patch
Size: 233645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220624/06175ffe/attachment-0001.bin>
More information about the cfe-commits
mailing list