[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

[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

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

2023-08-14 Thread Nikita Popov via Phabricator via cfe-commits
nikic added a comment. @jmciver Thanks for the context. I would recommend you to put up the patch you have based on top of this, because it's pretty hard to tell whether this API design makes sense without seeing the use. I have some doubts about that, for two reasons: - If I understand

[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(, nullptr, VectorTy)); arsenm wrote: > This is very specifically

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

2023-08-11 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:809-811 + Updater.AddAvailableValue( + Alloca.getParent(), + getInitialValueOfAllocation(, nullptr, VectorTy)); This is very specifically handling alloca, not any

[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

[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

[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

[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

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

2023-07-20 Thread Nikita Popov via Phabricator via cfe-commits
nikic requested changes to this revision. nikic added a comment. This revision now requires changes to proceed. > This commit is in support of future uninitialized memory handling and adds > alloca instruction support to getInitialValueOfAllocation. This unifies > initial > memory state querying

[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