Skip to content

Commit

Permalink
Add const qualifier to an addEdge argument
Browse files Browse the repository at this point in the history
  • Loading branch information
kasuga-fj committed Dec 23, 2024
1 parent c0e1750 commit 32feeba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llvm/include/llvm/CodeGen/MachinePipeliner.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion llvm/lib/CodeGen/MachinePipeliner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 32feeba

Please sign in to comment.