diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-09-12 18:18:50 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-12 09:18:50 +0000 |
commit | 2331fbb01978463a218d80883d29a003fdef6e14 (patch) | |
tree | afed9bc04101192ecabf11d309e0e789817d587d /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 47b490b4dcda4ac5d4adae88a7c90ffac8068312 (diff) | |
download | llvm-2331fbb01978463a218d80883d29a003fdef6e14.zip llvm-2331fbb01978463a218d80883d29a003fdef6e14.tar.gz llvm-2331fbb01978463a218d80883d29a003fdef6e14.tar.bz2 |
CodeGen: Remove MachineFunction argument from getPointerRegClass (#158185)
getPointerRegClass is a layering violation. Its primary purpose
is to determine how to interpret an MCInstrDesc's operands RegClass
fields. This should be context free, and only depend on the subtarget.
The model of this is also wrong, since this should be an
instruction / operand specific property, not a global pointer class.
Remove the the function argument to help stage removal of this hook
and avoid introducing any new obstacles to replacing it.
The remaining uses of the function were to get the subtarget, which
TargetRegisterInfo already belongs to. A few targets needed new
subtarget derived properties copied there.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 79047f7..55ec049 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1003,7 +1003,7 @@ MachineInstr::getRegClassConstraint(unsigned OpIdx, // Assume that all registers in a memory operand are pointers. if (F.isMemKind()) - return TRI->getPointerRegClass(MF); + return TRI->getPointerRegClass(); return nullptr; } |