[llvm] [SPIR-V] Align memory scopes with SPIR-V specification and LLVM expectations and change default mem scope value (PR #108528)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 12:01:00 PDT 2024


================
@@ -305,7 +308,9 @@ void SPIRVInstructionSelector::setupMF(MachineFunction &MF, GISelKnownBits *KB,
                                        CodeGenCoverage *CoverageInfo,
                                        ProfileSummaryInfo *PSI,
                                        BlockFrequencyInfo *BFI) {
-  SSIDs = SyncScopeIDs(MF.getFunction().getContext());
+  // Init SPIR-V specific SyncScopeID's if needed.
+  if (SSIDs.SubGroupSSID == SyncScope::SingleThread)
----------------
arsenm wrote:

I don't quite follow this? This is a weird way of deferring initialization? 

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


More information about the llvm-commits mailing list