[llvm] [SPIRV] Emit intrinsics for globals only in function that references them (PR #178143)

Juan Manuel Martinez CaamaƱo via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 27 09:17:39 PST 2026


================
@@ -62,6 +62,75 @@ namespace llvm::SPIRV {
 } // namespace llvm::SPIRV
 
 namespace {
+// This class keeps track of which functions reference which global variables.
+class GlobalVariableReferences {
----------------
jmmartinez wrote:

Maybe `getFunctionsReferencing()` or something like that.

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


More information about the llvm-commits mailing list