aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-09-12 19:22:02 +0900
committerGitHub <noreply@github.com>2025-09-12 19:22:02 +0900
commit7289f2cd0c371b2539faa628ec0eea58fa61892c (patch)
treed5b7335a9d5f0f6dfceaf6791f4f0bcadca02142 /llvm/lib/CodeGen/MachineInstr.cpp
parent83b48b13f3a70bf56053e92593270c519859cfd7 (diff)
downloadllvm-7289f2cd0c371b2539faa628ec0eea58fa61892c.zip
llvm-7289f2cd0c371b2539faa628ec0eea58fa61892c.tar.gz
llvm-7289f2cd0c371b2539faa628ec0eea58fa61892c.tar.bz2
CodeGen: Remove MachineFunction argument from getRegClass (#158188)
This is a low level utility to parse the MCInstrInfo and should not depend on the state of the function.
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 55ec049..2c06c5a 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -976,11 +976,9 @@ MachineInstr::getRegClassConstraint(unsigned OpIdx,
const TargetRegisterInfo *TRI) const {
assert(getParent() && "Can't have an MBB reference here!");
assert(getMF() && "Can't have an MF reference here!");
- const MachineFunction &MF = *getMF();
-
// Most opcodes have fixed constraints in their MCInstrDesc.
if (!isInlineAsm())
- return TII->getRegClass(getDesc(), OpIdx, TRI, MF);
+ return TII->getRegClass(getDesc(), OpIdx, TRI);
if (!getOperand(OpIdx).isReg())
return nullptr;