[clang] [llvm] [HIPSTDPAR] Add support for globals (PR #146813)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 00:17:29 PDT 2025


================
@@ -114,24 +115,221 @@ static inline void clearModule(Module &M) { // TODO: simplify.
     eraseFromModule(*M.ifuncs().begin());
 }
 
+static inline SmallVector<std::reference_wrapper<Use>>
+collectIndirectableUses(GlobalVariable *G) {
+  // We are interested only in use chains that end in an Instruction.
+  SmallVector<std::reference_wrapper<Use>> Uses;
+
+  SmallVector<std::reference_wrapper<Use>> Tmp(G->use_begin(), G->use_end());
----------------
jmmartinez wrote:

nitpick: Can we rename `Tmp` as `Stack`?

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


More information about the llvm-commits mailing list