[clang] [llvm] [HIPSTDPAR] Add support for globals (PR #146813)
Alex Voicu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 11 05:25:45 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());
+ while (!Tmp.empty()) {
+ Use &U = Tmp.back();
+ Tmp.pop_back();
----------------
AlexVlx wrote:
Done.
https://github.com/llvm/llvm-project/pull/146813
More information about the llvm-commits
mailing list