Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | ||
---|---|---|
1724 | My only slight concern is whether we should also accept FLAT instructions here? They update vmcnt but not only vmcnt. I'm not sure what the answer is. |
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | ||
---|---|---|
1724 | I think it is still better to flush vmcnt in this case. v0 = flat_load(...) s_waitcnt vmcnt(0) loop { ... s_waitcnt lgkmcnt(0) use(v0) ... store(...) ... } Which is better than having a s_waitcnt vmcnt in the loop. If the store is also a flat store, it may be worth flushing lgkmcnt too, but I don't know if this case is common or not. |
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | ||
---|---|---|
1724 |
OK, so maybe we should test isVMEM || isFLAT here? |
- using SIInstrInfo::isFLAT(MI) && mayAccessVMEMThroughFlat(MI)
- updated waitcnt-vmcnt-loop.mir with 2 tests -- 1 for global and 1 for flat memory instructions
- updated tests affected by considering flat memory instructions
My only slight concern is whether we should also accept FLAT instructions here? They update vmcnt but not only vmcnt. I'm not sure what the answer is.