[llvm] [AMDGPU][PromoteAlloca] Whole-function alloca promotion to vector (PR #84735)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 13 23:51:55 PDT 2024
================
@@ -225,6 +249,55 @@ FunctionPass *llvm::createAMDGPUPromoteAllocaToVector() {
return new AMDGPUPromoteAllocaToVector();
}
+static void collectAllocaUses(AllocaInst &Alloca,
+ SmallVectorImpl<Use *> &Uses) {
+ SmallVector<Instruction *, 4> WorkList({&Alloca});
+ while (!WorkList.empty()) {
+ auto *Cur = WorkList.pop_back_val();
+ for (auto &U : Cur->uses()) {
+ Uses.push_back(&U);
+
+ if (isa<GetElementPtrInst>(U.getUser()) || isa<BitCastInst>(U.getUser()))
----------------
arsenm wrote:
bitcast check not useful anymore
https://github.com/llvm/llvm-project/pull/84735
More information about the llvm-commits
mailing list