Skip to content

Commit 6f772e8

Browse files
committed
Pull definition into header
1 parent f772c31 commit 6f772e8

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

llvm/lib/Target/AMDGPU/GCNSubtarget.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -688,14 +688,6 @@ unsigned GCNSubtarget::getNSAThreshold(const MachineFunction &MF) const {
688688
return NSAThreshold;
689689
}
690690

691-
unsigned GCNSubtarget::getSNopBits() const {
692-
if (getGeneration() >= AMDGPUSubtarget::GFX12)
693-
return 7;
694-
if (getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
695-
return 4;
696-
return 3;
697-
}
698-
699691
GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F,
700692
const GCNSubtarget &ST)
701693
: ST(ST) {

llvm/lib/Target/AMDGPU/GCNSubtarget.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,13 @@ class GCNSubtarget final : public AMDGPUGenSubtargetInfo,
18421842

18431843
/// \returns the number of significant bits in the immediate field of the
18441844
/// S_NOP instruction.
1845-
unsigned getSNopBits() const;
1845+
unsigned getSNopBits() const {
1846+
if (getGeneration() >= AMDGPUSubtarget::GFX12)
1847+
return 7;
1848+
if (getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
1849+
return 4;
1850+
return 3;
1851+
}
18461852
};
18471853

18481854
class GCNUserSGPRUsageInfo {

0 commit comments

Comments
 (0)