[llvm] 1956941 - [ARM] Remove an unnecessary cast (NFC) (#156203)

via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 30 16:02:05 PDT 2025


Author: Kazu Hirata
Date: 2025-08-30T16:02:02-07:00
New Revision: 1956941cee24e30addc0dc121891b6577dbddba0

URL: https://github.com/llvm/llvm-project/commit/1956941cee24e30addc0dc121891b6577dbddba0
DIFF: https://github.com/llvm/llvm-project/commit/1956941cee24e30addc0dc121891b6577dbddba0.diff

LOG: [ARM] Remove an unnecessary cast (NFC) (#156203)

getInstrInfo() already returns const ARMBaseInstrInfo *.

Added: 
    

Modified: 
    llvm/lib/Target/ARM/ARMBlockPlacement.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMBlockPlacement.cpp b/llvm/lib/Target/ARM/ARMBlockPlacement.cpp
index ec907995e3abc..3d8ebfeae81da 100644
--- a/llvm/lib/Target/ARM/ARMBlockPlacement.cpp
+++ b/llvm/lib/Target/ARM/ARMBlockPlacement.cpp
@@ -218,7 +218,7 @@ bool ARMBlockPlacement::runOnMachineFunction(MachineFunction &MF) {
     return false;
   LLVM_DEBUG(dbgs() << DEBUG_PREFIX << "Running on " << MF.getName() << "\n");
   MLI = &getAnalysis<MachineLoopInfoWrapperPass>().getLI();
-  TII = static_cast<const ARMBaseInstrInfo *>(ST.getInstrInfo());
+  TII = ST.getInstrInfo();
   BBUtils = std::make_unique<ARMBasicBlockUtils>(MF);
   MF.RenumberBlocks();
   BBUtils->computeAllBlockSizes();


        


More information about the llvm-commits mailing list