[PATCH] D104648: [Mem2Reg] Use poison instead of undef for read of uninitialized memory
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 15:28:31 PDT 2021
nlopes added a comment.
In D104648#2836258 <https://reviews.llvm.org/D104648#2836258>, @aqjune wrote:
> Or, can we temporarily mark an alloca with `!has_bitfield` if it had bitfields in C & make mem2reg use poison only when uninitialized memory is read, for a while?
Well, that doesn't help much. It's just a band-aid..
I would rather initialize all alloca'd bitfields with zero instead. Zero folds trivially with the bit-masking operations from bit-fields, so it's unlikely to disrupt anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104648/new/
https://reviews.llvm.org/D104648
More information about the llvm-commits
mailing list