[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-08-21 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. @nikic I added this patch to a work in progress (WIP) "stack" of patches. D158352 and D158353 show what the intended progression looks like for mem2reg. I will add WIP SROA changes in the next few day

[PATCH] D158345: WIP: [clang][llvm][test] Update tests to support freeze_bits metadata

2023-08-21 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added subscribers: kerbowa, pengfei, jvesely. Herald added a project: All. jmciver retitled this revision from "[clang][llvm][test] Update tests to support freeze_bits metadata" to "WIP: [clang][llvm][test] Update tests to support freeze_bits metadata". jmciv

[PATCH] D158343: WIP: [UpdateTestChecks] Add update test check support for freeze_bits metadata

2023-08-21 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added subscribers: luismarques, jdoerfert, arichardson. Herald added a project: All. jmciver retitled this revision from "WIP: [UpdateTestChecks] Add update test check support for freeze_bits metadata Part of a sequence of exploratory patches using poison sem

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-08-15 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. @nikic Thanks for responding. I will get a "work in progress" patch up in the next three days. In the API adaptation, instruction insertion is still being handled in the caller as some passes are only allowed removal and not insertion. Repository: rG LLVM Github Mon

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-08-11 Thread John McIver via Phabricator via cfe-commits
jmciver added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:809-811 + Updater.AddAvailableValue( + Alloca.getParent(), + getInitialValueOfAllocation(&Alloca, nullptr, VectorTy)); arsenm wrote: > This is very specifically h

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-08-11 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155773/new/ https://reviews.llvm.org/D155773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-08-04 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155773/new/ https://reviews.llvm.org/D155773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-07-28 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 545294. jmciver edited the summary of this revision. jmciver added a comment. Herald added subscribers: foad, kerbowa, jvesely, arsenm. Refactor AMDGPUPromoteAlloca to use getInitialValueOfAllocation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-07-20 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 542618. jmciver added a comment. Remove reliance on TLI objects where only alloca instructions are processes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155773/new/ https://reviews.llvm.org/D155773 Files:

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-07-20 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. @nikic as per my GSoC project I am trying, under the guidance of @nlopes, a load attribute based approach to migrating uninitialized load to poison. The first attribute that I am working on is !freeze which effectively inserts a freeze poison if the load is uninitialize

[PATCH] D155773: [llvm][MemoryBuiltins] Add alloca support to getInitialValueOfAllocation

2023-07-19 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. jmciver added reviewers: nikic, efriedma, fhahn. Herald added subscribers: kmitropoulou, ormris, ChuanqiXu, StephenFan, wenlei, steven_wu, hiraditya. Herald added a project: All. jmciver published this revision for review. Herald added projects: clang, LLVM. Herald a

[PATCH] D153184: [NFC][clang] Refactor FileCheck metadata references in pragma-followup_inner.cpp

2023-06-20 Thread John McIver via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG148075cf87c7: [clang][test] Refactor FileCheck metadata in pragma-followup_inner.cpp (authored by jmciver). Repository: rG LLVM Github Monorepo C

[PATCH] D153184: [NFC][clang] Refactor FileCheck metadata references in pragma-followup_inner.cpp

2023-06-16 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added a project: All. jmciver added reviewers: MaskRay, Meinersbur. jmciver added a subscriber: nlopes. jmciver published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. - FileCheck variables for metadata are de

[PATCH] D129542: [CodeGen] Add codegen of IR function attribute fine_grained_bitfields

2023-03-23 Thread John McIver via Phabricator via cfe-commits
jmciver abandoned this revision. jmciver added a comment. I am closing this ticket as we are working on alternative solutions to poison based load semantics . Thanks to everyone for taking the time to discus

[PATCH] D128501: [CodeGen] Make uninitialized Lvalue bit-field stores poison compatible

2023-03-23 Thread John McIver via Phabricator via cfe-commits
jmciver closed this revision. jmciver added a comment. I am closing this ticket as we are working on alternative solutions to poison based load semantics . Thanks to everyone for taking the time to discuss t

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

2023-01-03 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. The Discourse proposal is available: RFC Load Instruction: Uninitialized Memory Semantics Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

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

2022-12-24 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. As Nuno mentioned we are targeting the proposal for next week. I will update the ticket with the Discourse link once it becomes available. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134410/new/ https://reviews.llvm.org/

[PATCH] D139505: [clang][CodeGen] Add noundef metadata to loading of references (preliminary 5 of 5)

2022-12-06 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. jmciver added reviewers: vitalybuka, jdoerfert, rjmccall, aqjune, efriedma, nikic. Herald added a project: All. jmciver retitled this revision from "[clang][CodeGen] Add noundef metadata to loading of references (item 5)" to "[clang][CodeGen] Add noundef metadata to

[PATCH] D139378: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 4 or 4)

2022-12-06 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 480767. jmciver added a comment. Updating D139378 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary 4 or 4) Update vector-noundef.cpp with rvalue element being stored in lvalue vector. Repository:

[PATCH] D139378: Add noundef metadata to load instructions (preliminary 4 or 4)

2022-12-06 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. jmciver added reviewers: vitalybuka, jdoerfert, rjmccall, aqjune, efriedma, nikic. Herald added a project: All. jmciver retitled this revision from "[clang][CodeGen] Add noundef metadata to load instructions (item 4)" to "Add noundef metadata to load instructions (

[PATCH] D138983: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 3 or 3)

2022-12-05 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 480267. jmciver added a comment. Updating D138983 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary 3 or 3) The following tests have been updated: - matrix-type-operators.c Repository: rG LLVM Gi

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

2022-12-05 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 480265. jmciver added a comment. Updating D134410 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary 1 or 3) The following tests have been updated: - avx512f-builtins.c - avx512fp16-builtins.c - matri

[PATCH] D138983: [clang][CodeGen] Add noundef metadata to load instructions (preliminary 3 or 3)

2022-11-30 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added a project: All. jmciver added reviewers: vitalybuka, jdoerfert, rjmccall, aqjune, efriedma, nikic. jmciver added subscribers: mattd, asavonic, pengfei, pcwang-thead, sstefan1, xbolva00, nlopes. jmciver edited the summary of this revision. jmciver publis

[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 fu

[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 &Ty, +llvm::LoadInst *Load) { tschuett wrote: > Nit: You meant static. Thank you f

[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 anonym

[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 Open

[PATCH] D137005: [clang][CodeGen] Add noundef metadata to load insturctions (preliminary 2 of 2)

2022-10-28 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. jmciver added reviewers: nikic, efriedma, aqjune, rjmccall, jdoerfert, vitalybuka. Herald added a project: All. jmciver retitled this revision from "[clang][CodeGen] Add noundef metadata to scalar load insturctions (preliminary 2 of 2)" to "[clang][CodeGen] Add noun

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

2022-10-28 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. I'll start fixing reported test failures tomorrow. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134410/new/ https://reviews.llvm.org/D134410 ___ cfe-commits mailing list cfe-com

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

2022-10-28 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 471708. jmciver added a comment. Updating D134410 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary) Add flag -enable-noundef-load-analysis and rebase with main. Refactored noundef metadata functional

[PATCH] D136546: [clang][unittest] Resolve ClangSupportTest link time errors

2022-10-23 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. Thanks @Izaron for taking the time to review and commit on my behalf! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136546/new/ https://reviews.llvm.org/D136546 ___ cfe-commits m

[PATCH] D136546: [clang][unittest] Resolve ClangSupportTest link time errors

2022-10-22 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. Added GitHub issue 58553 , which provides the full error message and repeatability information. If this patch is accepted can someone please commit on my behalf? - User name: `John McIver` - User email: `john.mciver

[PATCH] D136546: [clang][unittest] Resolve ClangSupportTest link time errors

2022-10-22 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added a project: All. jmciver added reviewers: Izaron, Ericson2314, thieta, tstellar. jmciver published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. Resolves undefined references to vtable for clang::ASTConsu

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

2022-10-18 Thread John McIver via Phabricator via cfe-commits
jmciver added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:1746 + if (auto TyPtr = Ty.getTypePtrOrNull()) { +if (!(TyPtr->isSpecificBuiltinType(BuiltinType::UChar) || vitalybuka wrote: > Taking into account potantial risks from pre-existing UB

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

2022-10-13 Thread John McIver via Phabricator via cfe-commits
jmciver updated this revision to Diff 467690. jmciver edited the summary of this revision. jmciver added a comment. Updating D134410 : [clang][CodeGen] Add noundef metadata to load instructions (preliminary) Resolve merge conflicts due to the adoption of the ptr

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

2022-09-27 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. Decreased CPU loading during test-suite build did lower times in some instances, but not a lot. F24724990: results-subset.txt F24725002: results-full.txt Repository: rG LLVM Github Monorepo C

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

2022-09-27 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. In D134410#3816881 , @vitalybuka wrote: > Are these patches uploaded with arc tool? Yes, the patches were uploaded with `arc`. The size of the patch was too large to use the web interface. Repository: rG LLVM Github Monorep

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

2022-09-23 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. The following are results from test-suite execution. LHS is a main build (17dde371e773 ) and the RHS is main with patch applied. The `results-subset.txt` is absent of unit, micro, and torture tests. E

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

2022-09-22 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. The regression and test-suite pass using a bootstrap build. I'll provide performance data tomorrow. 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)

2022-09-22 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added subscribers: mattd, asavonic, jdoerfert, pengfei. Herald added a project: All. jmciver retitled this revision from "[clang][CodeGen] Add noundef metadata to scalar load instructions" to "[clang][CodeGen] Add noundef metadata to scalar load instructions

[PATCH] D129542: [CodeGen] Add codegen of IR function attribute fine_grained_bitfields

2022-07-12 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added a project: All. jmciver published this revision for review. Herald added a project: clang. Herald added a subscriber: cfe-commits. This change helps to prevents mixing fine grained and non fine grained bit-field addressing schemes, which can result in in

[PATCH] D127271: [pseudo] Fix link time undefined reference to llvm::EnableABIBreakingChecks

2022-06-08 Thread John McIver via Phabricator via cfe-commits
jmciver closed this revision. jmciver added a comment. Obsoleted by D127269 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127271/new/ https://reviews.llvm.org/D127271

[PATCH] D127271: [pseudo] Fix link time undefined reference to llvm::EnableABIBreakingChecks

2022-06-08 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. Thanks @sammccall for taking the time to review! Can you please commit on my behalf? Name: `John McIver` Email: `john.mciver@gmail.com` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127271/new/ https://reviews.llvm.o

[PATCH] D127271: [pseudo] Fix link time undefined reference to llvm::EnableABIBreakingChecks

2022-06-08 Thread John McIver via Phabricator via cfe-commits
jmciver added a comment. This patch is associated to: https://github.com/llvm/llvm-project/issues/55935 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127271/new/ https://reviews.llvm.org/D127271 ___ cfe-

[PATCH] D127271: [pseudo] Fix link time undefined reference to llvm::EnableABIBreakingChecks

2022-06-07 Thread John McIver via Phabricator via cfe-commits
jmciver created this revision. Herald added a subscriber: mgorny. Herald added a project: All. jmciver published this revision for review. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang-tools-extra. When building in debug mode, ABI breaking assertion checks are