[llvm] 3f78e91 - [SystemZ] Remove unnecessary casts (NFC) (#148534)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 13 13:12:57 PDT 2025
Author: Kazu Hirata
Date: 2025-07-13T13:12:54-07:00
New Revision: 3f78e91340601cb51b737015eb65636ccf02d71d
URL: https://github.com/llvm/llvm-project/commit/3f78e91340601cb51b737015eb65636ccf02d71d
DIFF: https://github.com/llvm/llvm-project/commit/3f78e91340601cb51b737015eb65636ccf02d71d.diff
LOG: [SystemZ] Remove unnecessary casts (NFC) (#148534)
getInstrInfo() already returns const SystemZInstrInfo *.
Added:
Modified:
llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp b/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
index 4bef8ff9bbac1..6297916310803 100644
--- a/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp
@@ -533,7 +533,7 @@ void SystemZELFFrameLowering::emitPrologue(MachineFunction &MF,
const SystemZSubtarget &STI = MF.getSubtarget<SystemZSubtarget>();
const SystemZTargetLowering &TLI = *STI.getTargetLowering();
MachineFrameInfo &MFFrame = MF.getFrameInfo();
- auto *ZII = static_cast<const SystemZInstrInfo *>(STI.getInstrInfo());
+ auto *ZII = STI.getInstrInfo();
SystemZMachineFunctionInfo *ZFI = MF.getInfo<SystemZMachineFunctionInfo>();
MachineBasicBlock::iterator MBBI = MBB.begin();
const MCRegisterInfo *MRI = MF.getContext().getRegisterInfo();
@@ -1239,7 +1239,7 @@ void SystemZXPLINKFrameLowering::emitPrologue(MachineFunction &MF,
const SystemZSubtarget &Subtarget = MF.getSubtarget<SystemZSubtarget>();
SystemZMachineFunctionInfo *ZFI = MF.getInfo<SystemZMachineFunctionInfo>();
MachineBasicBlock::iterator MBBI = MBB.begin();
- auto *ZII = static_cast<const SystemZInstrInfo *>(Subtarget.getInstrInfo());
+ auto *ZII = Subtarget.getInstrInfo();
auto &Regs = Subtarget.getSpecialRegisters<SystemZXPLINK64Registers>();
MachineFrameInfo &MFFrame = MF.getFrameInfo();
MachineInstr *StoreInstr = nullptr;
@@ -1354,7 +1354,7 @@ void SystemZXPLINKFrameLowering::emitEpilogue(MachineFunction &MF,
MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
SystemZMachineFunctionInfo *ZFI = MF.getInfo<SystemZMachineFunctionInfo>();
MachineFrameInfo &MFFrame = MF.getFrameInfo();
- auto *ZII = static_cast<const SystemZInstrInfo *>(Subtarget.getInstrInfo());
+ auto *ZII = Subtarget.getInstrInfo();
auto &Regs = Subtarget.getSpecialRegisters<SystemZXPLINK64Registers>();
// Skip the return instruction.
More information about the llvm-commits
mailing list