[clang] [llvm] [llvm][opt][Transforms][SPIR-V] Enable `InferAddressSpaces` for SPIR-V (PR #110897)

Alexey Bader via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 4 13:12:05 PST 2024


================
@@ -178,6 +266,9 @@ void SPIRVPassConfig::addIRPasses() {
     addPass(createSPIRVStructurizerPass());
   }
 
+  if (TM.getOptLevel() > CodeGenOptLevel::None)
+    addPass(createInferAddressSpacesPass(AddressSpace::Generic));
----------------
bader wrote:

Out of curiosity, why do invoke this pass twice: in the middle-end and code-gen?

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


More information about the cfe-commits mailing list