Skip to content

Commit d4c374a

Browse files
committed
[NFC][AMDGPU][SIMemoryLegalizer] remove effectively empty function
The removed function SIGfx90ACacheControl::enableLoadCacheBypass() does not actually do anything except one assert and one unreachable.
1 parent 6af1247 commit d4c374a

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

llvm/lib/Target/AMDGPU/SIMemoryLegalizer.cpp

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,6 @@ class SIGfx90ACacheControl : public SIGfx7CacheControl {
443443
SIAtomicScope Scope,
444444
SIAtomicAddrSpace AddrSpace) const override;
445445

446-
bool enableStoreCacheBypass(const MachineBasicBlock::iterator &MI,
447-
SIAtomicScope Scope,
448-
SIAtomicAddrSpace AddrSpace) const override;
449-
450446
bool enableRMWCacheBypass(const MachineBasicBlock::iterator &MI,
451447
SIAtomicScope Scope,
452448
SIAtomicAddrSpace AddrSpace) const override;
@@ -1341,41 +1337,6 @@ bool SIGfx90ACacheControl::enableLoadCacheBypass(
13411337
return Changed;
13421338
}
13431339

1344-
bool SIGfx90ACacheControl::enableStoreCacheBypass(
1345-
const MachineBasicBlock::iterator &MI,
1346-
SIAtomicScope Scope,
1347-
SIAtomicAddrSpace AddrSpace) const {
1348-
assert(!MI->mayLoad() && MI->mayStore());
1349-
bool Changed = false;
1350-
1351-
if ((AddrSpace & SIAtomicAddrSpace::GLOBAL) != SIAtomicAddrSpace::NONE) {
1352-
switch (Scope) {
1353-
case SIAtomicScope::SYSTEM:
1354-
case SIAtomicScope::AGENT:
1355-
/// Do not set glc for store atomic operations as they implicitly write
1356-
/// through the L1 cache.
1357-
break;
1358-
case SIAtomicScope::WORKGROUP:
1359-
case SIAtomicScope::WAVEFRONT:
1360-
case SIAtomicScope::SINGLETHREAD:
1361-
// No cache to bypass. Store atomics implicitly write through the L1
1362-
// cache.
1363-
break;
1364-
default:
1365-
llvm_unreachable("Unsupported synchronization scope");
1366-
}
1367-
}
1368-
1369-
/// The scratch address space does not need the global memory caches
1370-
/// to be bypassed as all memory operations by the same thread are
1371-
/// sequentially consistent, and no other thread can access scratch
1372-
/// memory.
1373-
1374-
/// Other address spaces do not have a cache.
1375-
1376-
return Changed;
1377-
}
1378-
13791340
bool SIGfx90ACacheControl::enableRMWCacheBypass(
13801341
const MachineBasicBlock::iterator &MI,
13811342
SIAtomicScope Scope,

0 commit comments

Comments
 (0)