diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2025-09-12 19:22:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-12 19:22:02 +0900 |
commit | 7289f2cd0c371b2539faa628ec0eea58fa61892c (patch) | |
tree | d5b7335a9d5f0f6dfceaf6791f4f0bcadca02142 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
parent | 83b48b13f3a70bf56053e92593270c519859cfd7 (diff) | |
download | llvm-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/TwoAddressInstructionPass.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index 8d94b40..414e414 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1401,9 +1401,8 @@ bool TwoAddressInstructionImpl::tryInstructionTransform( if (UnfoldMCID.getNumDefs() == 1) { // Unfold the load. LLVM_DEBUG(dbgs() << "2addr: UNFOLDING: " << MI); - const TargetRegisterClass *RC = - TRI->getAllocatableClass( - TII->getRegClass(UnfoldMCID, LoadRegIndex, TRI, *MF)); + const TargetRegisterClass *RC = TRI->getAllocatableClass( + TII->getRegClass(UnfoldMCID, LoadRegIndex, TRI)); Register Reg = MRI->createVirtualRegister(RC); SmallVector<MachineInstr *, 2> NewMIs; if (!TII->unfoldMemoryOperand(*MF, MI, Reg, |