From ffa391272bad598d73fd5404dadf3686b69f2a63 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 16 Dec 2008 01:00:55 +0000 Subject: [PATCH] Make addPred and removePred return void, since the return value is not currently used by anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61066 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/ScheduleDAG.h | 15 ++++++--------- lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp | 8 ++++---- lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 8 ++++---- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index 0f82ae91fde..dbab3514617 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -299,12 +299,12 @@ namespace llvm { /// addPred - This adds the specified edge as a pred of the current node if /// not already. It also adds the current node as a successor of the - /// specified node. This returns true if this is a new pred. - bool addPred(const SDep &D) { + /// specified node. + void addPred(const SDep &D) { // If this node already has this depenence, don't add a redundant one. for (unsigned i = 0, e = (unsigned)Preds.size(); i != e; ++i) if (Preds[i] == D) - return false; + return; // Add a pred to this SUnit. Preds.push_back(D); // Now add a corresponding succ to N. @@ -321,14 +321,12 @@ namespace llvm { ++NumPredsLeft; if (!isScheduled) ++N->NumSuccsLeft; - return true; } /// removePred - This removes the specified edge as a pred of the current /// node if it exists. It also removes the current node as a successor of - /// the specified node. This returns true if the edge existed and was - /// removed. - bool removePred(const SDep &D) { + /// the specified node. + void removePred(const SDep &D) { // Find the matching predecessor. for (SmallVector::iterator I = Preds.begin(), E = Preds.end(); I != E; ++I) @@ -356,9 +354,8 @@ namespace llvm { --NumPredsLeft; if (!isScheduled) --N->NumSuccsLeft; - return true; + return; } - return false; } bool isPred(SUnit *N) { diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp index 9eefc7ff001..6ac608f943b 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp @@ -79,14 +79,14 @@ public: /// AddPred - adds a predecessor edge to SUnit SU. /// This returns true if this is a new predecessor. - bool AddPred(SUnit *SU, const SDep &D) { - return SU->addPred(D); + void AddPred(SUnit *SU, const SDep &D) { + SU->addPred(D); } /// RemovePred - removes a predecessor edge from SUnit SU. /// This returns true if an edge was removed. - bool RemovePred(SUnit *SU, const SDep &D) { - return SU->removePred(D); + void RemovePred(SUnit *SU, const SDep &D) { + SU->removePred(D); } private: diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 1a18b819ac3..49a5ac19048 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -101,17 +101,17 @@ public: /// AddPred - adds a predecessor edge to SUnit SU. /// This returns true if this is a new predecessor. /// Updates the topological ordering if required. - bool AddPred(SUnit *SU, const SDep &D) { + void AddPred(SUnit *SU, const SDep &D) { Topo.AddPred(SU, D.getSUnit()); - return SU->addPred(D); + SU->addPred(D); } /// RemovePred - removes a predecessor edge from SUnit SU. /// This returns true if an edge was removed. /// Updates the topological ordering if required. - bool RemovePred(SUnit *SU, const SDep &D) { + void RemovePred(SUnit *SU, const SDep &D) { Topo.RemovePred(SU, D.getSUnit()); - return SU->removePred(D); + SU->removePred(D); } private: