[llvm-branch-commits] [flang] [mlir] [Flang][OpenMP] Add pass to replace allocas with device shared memory (PR #161863)

Abid Qadeer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 26 06:41:47 PST 2026


abidh wrote:

> Thanks for the suggestion Abid, but could you elaborate on what would be the benefit of that change? It seems to me that it is correct in that case to make `setID` local to the main thread in the team, since what the other threads need access to is the updated per-team `ASet` pointer.

This is useful for optimization cases when generic is converted to spmd and we need to decide which stores to guard and which not. In that case, if we only let main thread write `setID` and then all other threads get the garbage because it is local to all threads. Making it shared solves that problem.



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


More information about the llvm-branch-commits mailing list