[llvm] [ARM] Remove an unnecessary cast (NFC) (PR #156203)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 30 12:40:23 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-arm
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
getInstrInfo() already returns const ARMBaseInstrInfo *.
---
Full diff: https://github.com/llvm/llvm-project/pull/156203.diff
1 Files Affected:
- (modified) llvm/lib/Target/ARM/ARMBlockPlacement.cpp (+1-1)
``````````diff
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();
``````````
</details>
https://github.com/llvm/llvm-project/pull/156203
More information about the llvm-commits
mailing list