[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-11-29 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 478821. jmciver added a comment. Updating D134410 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2) Refactor test matrix-type-operators.c to contain the noundef attribute. This test will be

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-11-01 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added a comment. In D134410#3898563 , @nikic wrote: > In D134410#3895253 , @nlopes wrote: > >> In D134410#3895077 , @nikic wrote: >> >>> In D134410#3894995

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-11-01 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D134410#3895253 , @nlopes wrote: > In D134410#3895077 , @nikic wrote: > >> In D134410#3894995 , @nlopes wrote: >> >>> We wanted this patch to

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-31 Thread John McIver via Phabricator via cfe-commits
jmciver added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:676 +namespace { +void applyNoundefToLoadInst(bool enable, const clang::QualType , +llvm::LoadInst *Load) { tschuett wrote: > Nit: You meant static. Thank you for

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-31 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 472051. jmciver added a comment. Updating D134410 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2) Refactor local linkage function, applyNoundefToLoadInst, to use static rather than an

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-30 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added a comment. In D134410#3895077 , @nikic wrote: > In D134410#3894995 , @nlopes wrote: > >> We wanted this patch to make us switch uninitialized loads to poison at >> will, since they become UB. In

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-30 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 471878. jmciver added a comment. Herald added subscribers: kosarev, kerbowa, jvesely. Updating D134410 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2) Fix AMD-GPU, ARM, PowerPC, and new

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-30 Thread Thorsten via Phabricator via cfe-commits
tschuett added a comment. Almost all flags are off by default. That's why they are called flags, i.e., `-Weverything`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134410/new/ https://reviews.llvm.org/D134410

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-30 Thread Thorsten via Phabricator via cfe-commits
tschuett added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:676 +namespace { +void applyNoundefToLoadInst(bool enable, const clang::QualType , +llvm::LoadInst *Load) { Nit: You meant static. Repository: rG LLVM Github

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-30 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. In D134410#3894995 , @nlopes wrote: > We wanted this patch to make us switch uninitialized loads to poison at will, > since they become UB. In practice, this helps us fixing bugs in SROA and etc > without perf degradation. Can

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-30 Thread Nuno Lopes via Phabricator via cfe-commits
nlopes added a comment. In D134410#3893918 , @nikic wrote: > I think adding this under a default-disabled flag is fine for evaluation > purposes, but I have doubts that we will ever be able to enable this by > default. There is a lot of code out there

[PATCH] D134410: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 2)

2022-10-29 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. I think adding this under a default-disabled flag is fine for evaluation purposes, but I have doubts that we will ever be able to enable this by default. There is a lot of code out there assuming that copying uninitialized data around is fine. Repository: rG LLVM