[llvm] LLVMContext: add getSyncScopeName() to lookup individual scope name (PR #109484)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 02:08:10 PDT 2024
================
@@ -16142,11 +16142,8 @@ static bool atomicIgnoresDenormalModeOrFPModeIsFTZ(const AtomicRMWInst *RMW) {
static OptimizationRemark emitAtomicRMWLegalRemark(const AtomicRMWInst *RMW) {
LLVMContext &Ctx = RMW->getContext();
- SmallVector<StringRef> SSNs;
- Ctx.getSyncScopeNames(SSNs);
- StringRef MemScope = SSNs[RMW->getSyncScopeID()].empty()
- ? "system"
- : SSNs[RMW->getSyncScopeID()];
+ StringRef SS = Ctx.getSyncScopeName(RMW->getSyncScopeID());
----------------
gonzalobg wrote:
Have updated AMDGPU to map an out of bound `SyncScope::ID` to `""` (system) with `.value_or("")`, but NVPTX maps out of bounds `SyncScope::ID` to errors, so just returning an empty string doesn't work there.
https://github.com/llvm/llvm-project/pull/109484
More information about the llvm-commits
mailing list