mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-30 04:56:49 +00:00
Make a few things const, fix some comments, and simplify
some assertions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63328 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f87d28745a
commit
1cc6b8ee78
@ -91,7 +91,7 @@ public:
|
|||||||
return Topo.IsReachable(SU, TargetSU);
|
return Topo.IsReachable(SU, TargetSU);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// willCreateCycle - Returns true if adding an edge from SU to TargetSU will
|
/// WillCreateCycle - Returns true if adding an edge from SU to TargetSU will
|
||||||
/// create a cycle.
|
/// create a cycle.
|
||||||
bool WillCreateCycle(SUnit *SU, SUnit *TargetSU) {
|
bool WillCreateCycle(SUnit *SU, SUnit *TargetSU) {
|
||||||
return Topo.WillCreateCycle(SU, TargetSU);
|
return Topo.WillCreateCycle(SU, TargetSU);
|
||||||
@ -114,8 +114,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ReleasePred(SUnit *SU, SDep *PredEdge);
|
void ReleasePred(SUnit *SU, const SDep *PredEdge);
|
||||||
void ReleaseSucc(SUnit *SU, SDep *SuccEdge);
|
void ReleaseSucc(SUnit *SU, const SDep *SuccEdge);
|
||||||
void CapturePred(SDep *PredEdge);
|
void CapturePred(SDep *PredEdge);
|
||||||
void ScheduleNodeBottomUp(SUnit*, unsigned);
|
void ScheduleNodeBottomUp(SUnit*, unsigned);
|
||||||
void ScheduleNodeTopDown(SUnit*, unsigned);
|
void ScheduleNodeTopDown(SUnit*, unsigned);
|
||||||
@ -192,7 +192,7 @@ void ScheduleDAGRRList::Schedule() {
|
|||||||
|
|
||||||
/// ReleasePred - Decrement the NumSuccsLeft count of a predecessor. Add it to
|
/// ReleasePred - Decrement the NumSuccsLeft count of a predecessor. Add it to
|
||||||
/// the AvailableQueue if the count reaches zero. Also update its cycle bound.
|
/// the AvailableQueue if the count reaches zero. Also update its cycle bound.
|
||||||
void ScheduleDAGRRList::ReleasePred(SUnit *SU, SDep *PredEdge) {
|
void ScheduleDAGRRList::ReleasePred(SUnit *SU, const SDep *PredEdge) {
|
||||||
SUnit *PredSU = PredEdge->getSUnit();
|
SUnit *PredSU = PredEdge->getSUnit();
|
||||||
--PredSU->NumSuccsLeft;
|
--PredSU->NumSuccsLeft;
|
||||||
|
|
||||||
@ -312,8 +312,7 @@ void ScheduleDAGRRList::UnscheduleNodeBottomUp(SUnit *SU) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// BacktrackBottomUp - Backtrack scheduling to a previous cycle specified in
|
/// BacktrackBottomUp - Backtrack scheduling to a previous cycle specified in
|
||||||
/// BTCycle in order to schedule a specific node. Returns the last unscheduled
|
/// BTCycle in order to schedule a specific node.
|
||||||
/// SUnit. Also returns if a successor is unscheduled in the process.
|
|
||||||
void ScheduleDAGRRList::BacktrackBottomUp(SUnit *SU, unsigned BtCycle,
|
void ScheduleDAGRRList::BacktrackBottomUp(SUnit *SU, unsigned BtCycle,
|
||||||
unsigned &CurCycle) {
|
unsigned &CurCycle) {
|
||||||
SUnit *OldSU = NULL;
|
SUnit *OldSU = NULL;
|
||||||
@ -327,11 +326,7 @@ void ScheduleDAGRRList::BacktrackBottomUp(SUnit *SU, unsigned BtCycle,
|
|||||||
--CurCycle;
|
--CurCycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(!SU->isSucc(OldSU) && "Something is wrong!");
|
||||||
if (SU->isSucc(OldSU)) {
|
|
||||||
assert(false && "Something is wrong!");
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
|
|
||||||
++NumBacktracks;
|
++NumBacktracks;
|
||||||
}
|
}
|
||||||
@ -751,10 +746,7 @@ void ScheduleDAGRRList::ListScheduleBottomUp() {
|
|||||||
CurSU = NewDef;
|
CurSU = NewDef;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CurSU) {
|
assert(CurSU && "Unable to resolve live physical register dependencies!");
|
||||||
assert(false && "Unable to resolve live physical register dependencies!");
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the nodes that aren't ready back onto the available list.
|
// Add the nodes that aren't ready back onto the available list.
|
||||||
@ -785,7 +777,7 @@ void ScheduleDAGRRList::ListScheduleBottomUp() {
|
|||||||
|
|
||||||
/// ReleaseSucc - Decrement the NumPredsLeft count of a successor. Add it to
|
/// ReleaseSucc - Decrement the NumPredsLeft count of a successor. Add it to
|
||||||
/// the AvailableQueue if the count reaches zero. Also update its cycle bound.
|
/// the AvailableQueue if the count reaches zero. Also update its cycle bound.
|
||||||
void ScheduleDAGRRList::ReleaseSucc(SUnit *SU, SDep *SuccEdge) {
|
void ScheduleDAGRRList::ReleaseSucc(SUnit *SU, const SDep *SuccEdge) {
|
||||||
SUnit *SuccSU = SuccEdge->getSUnit();
|
SUnit *SuccSU = SuccEdge->getSUnit();
|
||||||
--SuccSU->NumPredsLeft;
|
--SuccSU->NumPredsLeft;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user