[llvm] c307ada - [ARM] Remove an unnecessary cast (NFC) (#155552)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 27 08:28:43 PDT 2025


Author: Kazu Hirata
Date: 2025-08-27T08:28:39-07:00
New Revision: c307ada0298112e87aa3643e0b79aa4159bbcceb

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

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

getSUnit() already returns SUnit *.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
index 9e4dbecc16a87..d7398f6a948ce 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
@@ -6730,7 +6730,7 @@ bool ARMPipelinerLoopInfo::tooMuchRegisterPressure(SwingSchedulerDAG &SSD,
         Register Reg = S.getReg();
         auto CIter = CrossIterationNeeds.find(Reg.id());
         if (CIter != CrossIterationNeeds.end()) {
-          auto Stg2 = SMS.stageScheduled(const_cast<SUnit *>(S.getSUnit()));
+          auto Stg2 = SMS.stageScheduled(S.getSUnit());
           assert(Stg2 <= Stg && "Data dependence upon earlier stage");
           if (Stg - Stg2 < MAX_STAGES)
             CIter->second.set(Stg - Stg2);


        


More information about the llvm-commits mailing list