Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

*getInstrInfo() is already of type const HexagonInstrInfo &.

*getInstrInfo() is already of type const HexagonInstrInfo &.
@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2025

@llvm/pr-subscribers-backend-hexagon

Author: Kazu Hirata (kazutakahirata)

Changes

*getInstrInfo() is already of type const HexagonInstrInfo &.


Full diff: https://github.com/llvm/llvm-project/pull/165654.diff

1 Files Affected:

  • (modified) llvm/lib/Target/Hexagon/HexagonSubtarget.cpp (+1-1)
diff --git a/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp b/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
index b9cdd6a2a3767..ce2de752f3b3a 100644
--- a/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp
@@ -544,7 +544,7 @@ int HexagonSubtarget::updateLatency(MachineInstr &SrcInst,
   if (!hasV60Ops())
     return Latency;
 
-  auto &QII = static_cast<const HexagonInstrInfo &>(*getInstrInfo());
+  const HexagonInstrInfo &QII = *getInstrInfo();
   // BSB scheduling.
   if (QII.isHVXVec(SrcInst) || useBSBScheduling())
     Latency = (Latency + 1) >> 1;

@kazutakahirata kazutakahirata merged commit 8e6ef2d into llvm:main Oct 30, 2025
15 of 16 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251029_clang_tidy_readability_redundant_casting_Hexagon branch October 30, 2025 14:11
aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
*getInstrInfo() is already of type const HexagonInstrInfo &.
luciechoi pushed a commit to luciechoi/llvm-project that referenced this pull request Nov 1, 2025
*getInstrInfo() is already of type const HexagonInstrInfo &.
DEBADRIBASAK pushed a commit to DEBADRIBASAK/llvm-project that referenced this pull request Nov 3, 2025
*getInstrInfo() is already of type const HexagonInstrInfo &.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants