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

Because if one invokes the pass directly via opt there's no way but the TTI 
query to set Flat/Generic to anything but 0, and because making it explicit at 
the point of construction rather than relying on that seems somewhat more self 
documenting.

https://github.com/llvm/llvm-project/pull/110897
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to