[llvm-branch-commits] [llvm] [NFC][SPIRV] Remove last uses of `SPIRVType` (PR #182098)

Marcos Maronas via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 18 11:10:09 PST 2026


Juan Manuel Martinez =?utf-8?q?CaamaƱo?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/182098 at github.com>


================
@@ -297,14 +297,14 @@ SPIRVType *SPIRVGlobalRegistry::createOpType(
     LastInsertedType = Result.first;
   }
 
-  MachineInstr *Type = Op(MIRBuilder);
+  MachineInstr *ConstOrType = Op(MIRBuilder);
   // We expect all users of this function to insert definitions at the insertion
   // point set above that is always the first MBB.
-  assert(Type->getParent() == NewMBB);
-  LastInsertedType->second = Type;
+  assert(ConstOrType->getParent() == NewMBB);
+  LastInsertedType->second = ConstOrType;
 
   MIRBuilder.setInsertPt(*OldMBB, oldInsertPoint);
-  return Type;
+  return ConstOrType;
----------------
maarquitos14 wrote:

If this always returns `ConstOrType`, should the function be named `createConstOrTypeAtFunctionEntry`? I'm open to other names as well, just to make sure that the name conveys the intent clearly.

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


More information about the llvm-branch-commits mailing list