[llvm] AMDGPU/PromoteAlloca: Refactor into analysis / commit phases (PR #170512)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 20:03:24 PST 2025


Nicolai =?utf-8?q?Hähnle?= <nicolai.haehnle at amd.com>,
Nicolai =?utf-8?q?Hähnle?= <nicolai.haehnle at amd.com>,
Nicolai =?utf-8?q?Hähnle?= <nicolai.haehnle at amd.com>,
Nicolai =?utf-8?q?Hähnle?= <nicolai.haehnle at amd.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/170512 at github.com>


================
@@ -933,21 +1010,22 @@ bool AMDGPUPromoteAllocaImpl::tryPromoteAllocaToVector(AllocaInst &Alloca) {
         return RejectUser(Inst, "mem transfer inst length is non-constant or "
                                 "not a multiple of the vector element size");
 
-      if (TransferInfo.try_emplace(TransferInst).second) {
-        DeferredInsts.push_back(Inst);
-        WorkList.push_back(Inst);
-      }
-
       auto getPointerIndexOfAlloca = [&](Value *Ptr) -> ConstantInt * {
----------------
ruiling wrote:

not related to the change. It is better we rename this to `getConstIndexOfAlloca`.

https://github.com/llvm/llvm-project/pull/170512


More information about the llvm-commits mailing list