-
Notifications
You must be signed in to change notification settings - Fork 15.2k
AMDGPU: Remove override of TargetInstrInfo::getRegClass #159886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
arsenm
merged 1 commit into
main
from
users/arsenm/amdgpu/remove-override-TII-getRegClass
Nov 12, 2025
Merged
AMDGPU: Remove override of TargetInstrInfo::getRegClass #159886
arsenm
merged 1 commit into
main
from
users/arsenm/amdgpu/remove-override-TII-getRegClass
Nov 12, 2025
+0
−15
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Sep 19, 2025
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Member
|
@llvm/pr-subscribers-llvm-globalisel @llvm/pr-subscribers-backend-amdgpu Author: Matt Arsenault (arsenm) ChangesThis should not be overridable and the special case hacks Full diff: https://github.com/llvm/llvm-project/pull/159886.diff 2 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index a368a0de891ea..57698484d0bb7 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5954,19 +5954,6 @@ SIInstrInfo::getWholeWaveFunctionSetup(MachineFunction &MF) const {
llvm_unreachable("Couldn't find SI_SETUP_WHOLE_WAVE_FUNC instruction");
}
-// FIXME: This should not be an overridable function. All subtarget dependent
-// operand modifications should go through isLookupRegClassByHwMode in the
-// generic handling.
-const TargetRegisterClass *
-SIInstrInfo::getRegClass(const MCInstrDesc &TID, unsigned OpNum,
- const TargetRegisterInfo *TRI) const {
- if (OpNum >= TID.getNumOperands())
- return nullptr;
- const MCOperandInfo &OpInfo = TID.operands()[OpNum];
- int16_t RegClass = getOpRegClassID(OpInfo);
- return RegClass < 0 ? nullptr : RI.getRegClass(RegClass);
-}
-
const TargetRegisterClass *SIInstrInfo::getOpRegClass(const MachineInstr &MI,
unsigned OpNo) const {
const MCInstrDesc &Desc = get(MI.getOpcode());
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.h b/llvm/lib/Target/AMDGPU/SIInstrInfo.h
index 48eb743c2e762..a9c1a8606ede1 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.h
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.h
@@ -1539,10 +1539,6 @@ class SIInstrInfo final : public AMDGPUGenInstrInfo {
/// Return true if this opcode should not be used by codegen.
bool isAsmOnlyOpcode(int MCOp) const;
- const TargetRegisterClass *
- getRegClass(const MCInstrDesc &TID, unsigned OpNum,
- const TargetRegisterInfo *TRI) const override;
-
void fixImplicitOperands(MachineInstr &MI) const;
MachineInstr *foldMemoryOperandImpl(MachineFunction &MF, MachineInstr &MI,
|
rampitec
approved these changes
Sep 22, 2025
dbb3fe7 to
bcaa5f7
Compare
636ba82 to
18b15d2
Compare
bcaa5f7 to
979997d
Compare
18b15d2 to
6f74155
Compare
979997d to
76c4167
Compare
6f74155 to
70ed5e8
Compare
70ed5e8 to
ea0b9ab
Compare
76c4167 to
c16ce8f
Compare
ea0b9ab to
e503abc
Compare
7a2d9da to
f5c71b3
Compare
e503abc to
c8a41c4
Compare
Base automatically changed from
users/arsenm/amdgpu/remove-wrapper-tri-getRegClass
to
main
November 11, 2025 23:31
This should not be overridable and the special case hacks have been replaced with RegClassByHwMode
c8a41c4 to
b34bc0a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This should not be overridable and the special case hacks
have been replaced with RegClassByHwMode