[llvm-commits] [llvm] r61066 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAG.h lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Dan Gohman
gohman at apple.com
Mon Dec 15 17:00:55 PST 2008
Author: djg
Date: Mon Dec 15 19:00:55 2008
New Revision: 61066
URL: http://llvm.org/viewvc/llvm-project?rev=61066&view=rev
Log:
Make addPred and removePred return void, since the return value is not
currently used by anything.
Modified:
llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h?rev=61066&r1=61065&r2=61066&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAG.h Mon Dec 15 19:00:55 2008
@@ -299,12 +299,12 @@
/// 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 @@
++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<SDep, 4>::iterator I = Preds.begin(), E = Preds.end();
I != E; ++I)
@@ -356,9 +354,8 @@
--NumPredsLeft;
if (!isScheduled)
--N->NumSuccsLeft;
- return true;
+ return;
}
- return false;
}
bool isPred(SUnit *N) {
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp?rev=61066&r1=61065&r2=61066&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp Mon Dec 15 19:00:55 2008
@@ -79,14 +79,14 @@
/// 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:
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=61066&r1=61065&r2=61066&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Mon Dec 15 19:00:55 2008
@@ -101,17 +101,17 @@
/// 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:
More information about the llvm-commits
mailing list