From 32feeba4d53420623a2570c73651460e8a5257c4 Mon Sep 17 00:00:00 2001 From: Ryotaro Kasuga Date: Fri, 29 Nov 2024 07:20:04 +0000 Subject: [PATCH] Add const qualifier to an `addEdge` argument --- llvm/include/llvm/CodeGen/MachinePipeliner.h | 2 +- llvm/lib/CodeGen/MachinePipeliner.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/CodeGen/MachinePipeliner.h b/llvm/include/llvm/CodeGen/MachinePipeliner.h index bce551d0a5f345..2f133958a7313f 100644 --- a/llvm/include/llvm/CodeGen/MachinePipeliner.h +++ b/llvm/include/llvm/CodeGen/MachinePipeliner.h @@ -215,7 +215,7 @@ class SwingSchedulerDDG { SwingSchedulerDDGEdges EntrySUEdges; SwingSchedulerDDGEdges ExitSUEdges; - void addEdge(SUnit *SU, const SwingSchedulerDDGEdge &Edge); + void addEdge(const SUnit *SU, const SwingSchedulerDDGEdge &Edge); SwingSchedulerDDGEdges &getEdges(const SUnit *SU); const SwingSchedulerDDGEdges &getEdges(const SUnit *SU) const; diff --git a/llvm/lib/CodeGen/MachinePipeliner.cpp b/llvm/lib/CodeGen/MachinePipeliner.cpp index 039d15ffea8452..acd42aa497c6fe 100644 --- a/llvm/lib/CodeGen/MachinePipeliner.cpp +++ b/llvm/lib/CodeGen/MachinePipeliner.cpp @@ -3777,7 +3777,8 @@ SwingSchedulerDDG::getEdges(const SUnit *SU) const { return EdgesVec[SU->NodeNum]; } -void SwingSchedulerDDG::addEdge(SUnit *SU, const SwingSchedulerDDGEdge &Edge) { +void SwingSchedulerDDG::addEdge(const SUnit *SU, + const SwingSchedulerDDGEdge &Edge) { auto &Edges = getEdges(SU); if (Edge.getSrc() == SU) Edges.Succs.push_back(Edge);