[llvm-commits] [llvm] r152382 - in /llvm/trunk: include/llvm/CodeGen/ScheduleDAGInstrs.h lib/CodeGen/MachineScheduler.cpp lib/CodeGen/PostRASchedulerList.cpp lib/CodeGen/ScheduleDAGInstrs.cpp
Andrew Trick
atrick at apple.com
Thu Mar 8 20:29:02 PST 2012
Author: atrick
Date: Thu Mar 8 22:29:02 2012
New Revision: 152382
URL: http://llvm.org/viewvc/llvm-project?rev=152382&view=rev
Log:
misched interface: rename Begin/End to RegionBegin/RegionEnd since they are not private.
Modified:
llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h
llvm/trunk/lib/CodeGen/MachineScheduler.cpp
llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h?rev=152382&r1=152381&r2=152382&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDAGInstrs.h Thu Mar 8 22:29:02 2012
@@ -188,12 +188,12 @@
MachineBasicBlock *BB;
/// The beginning of the range to be scheduled.
- MachineBasicBlock::iterator Begin;
+ MachineBasicBlock::iterator RegionBegin;
/// The end of the range to be scheduled.
- MachineBasicBlock::iterator End;
+ MachineBasicBlock::iterator RegionEnd;
- /// The index in BB of End.
+ /// The index in BB of RegionEnd.
unsigned EndIndex;
/// After calling BuildSchedGraph, each machine instruction in the current
@@ -240,10 +240,10 @@
virtual ~ScheduleDAGInstrs() {}
/// begin - Return an iterator to the top of the current scheduling region.
- MachineBasicBlock::iterator begin() const { return Begin; }
+ MachineBasicBlock::iterator begin() const { return RegionBegin; }
/// end - Return an iterator to the bottom of the current scheduling region.
- MachineBasicBlock::iterator end() const { return End; }
+ MachineBasicBlock::iterator end() const { return RegionEnd; }
/// newSUnit - Creates a new SUnit and return a ptr to it.
SUnit *newSUnit(MachineInstr *MI);
Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=152382&r1=152381&r2=152382&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Thu Mar 8 22:29:02 2012
@@ -275,7 +275,7 @@
releaseNode(&(*I));
}
- MachineBasicBlock::iterator InsertPos = Begin;
+ MachineBasicBlock::iterator InsertPos = RegionBegin;
while (SUnit *SU = pickNode()) {
DEBUG(dbgs() << "*** Scheduling Instruction:\n"; SU->dump(this));
@@ -286,8 +286,8 @@
else {
BB->splice(InsertPos, BB, MI);
LIS->handleMove(MI);
- if (Begin == InsertPos)
- Begin = MI;
+ if (RegionBegin == InsertPos)
+ RegionBegin = MI;
}
// Release dependent instructions for scheduling.
Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=152382&r1=152381&r2=152382&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Thu Mar 8 22:29:02 2012
@@ -365,8 +365,8 @@
if (AntiDepBreak != NULL) {
unsigned Broken =
- AntiDepBreak->BreakAntiDependencies(SUnits, Begin, End, EndIndex,
- DbgValues);
+ AntiDepBreak->BreakAntiDependencies(SUnits, RegionBegin, RegionEnd,
+ EndIndex, DbgValues);
if (Broken != 0) {
// We made changes. Update the dependency graph.
@@ -761,24 +761,24 @@
// EmitSchedule - Emit the machine code in scheduled order.
void SchedulePostRATDList::EmitSchedule() {
- Begin = End;
+ RegionBegin = RegionEnd;
// If first instruction was a DBG_VALUE then put it back.
if (FirstDbgValue)
- BB->splice(End, BB, FirstDbgValue);
+ BB->splice(RegionEnd, BB, FirstDbgValue);
// Then re-insert them according to the given schedule.
for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
if (SUnit *SU = Sequence[i])
- BB->splice(End, BB, SU->getInstr());
+ BB->splice(RegionEnd, BB, SU->getInstr());
else
// Null SUnit* is a noop.
- TII->insertNoop(*BB, End);
+ TII->insertNoop(*BB, RegionEnd);
// Update the Begin iterator, as the first instruction in the block
// may have been scheduled later.
if (i == 0)
- Begin = prior(End);
+ RegionBegin = prior(RegionEnd);
}
// Reinsert any remaining debug_values.
Modified: llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp?rev=152382&r1=152381&r2=152382&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGInstrs.cpp Thu Mar 8 22:29:02 2012
@@ -160,8 +160,8 @@
MachineBasicBlock::iterator end,
unsigned endcount) {
BB = bb;
- Begin = begin;
- End = end;
+ RegionBegin = begin;
+ RegionEnd = end;
EndIndex = endcount;
// Check to see if the scheduler cares about latencies.
@@ -185,7 +185,7 @@
/// are too high to be hidden by the branch or when the liveout registers
/// used by instructions in the fallthrough block.
void ScheduleDAGInstrs::addSchedBarrierDeps() {
- MachineInstr *ExitMI = End != BB->end() ? &*End : 0;
+ MachineInstr *ExitMI = RegionEnd != BB->end() ? &*RegionEnd : 0;
ExitSU.setInstr(ExitMI);
bool AllDepKnown = ExitMI &&
(ExitMI->isCall() || ExitMI->isBarrier());
@@ -477,7 +477,7 @@
// which is contained within a basic block.
SUnits.reserve(BB->size());
- for (MachineBasicBlock::iterator I = Begin; I != End; ++I) {
+ for (MachineBasicBlock::iterator I = RegionBegin; I != RegionEnd; ++I) {
MachineInstr *MI = I;
if (MI->isDebugValue())
continue;
@@ -535,7 +535,7 @@
// Walk the list of instructions, from bottom moving up.
MachineInstr *PrevMI = NULL;
- for (MachineBasicBlock::iterator MII = End, MIE = Begin;
+ for (MachineBasicBlock::iterator MII = RegionEnd, MIE = RegionBegin;
MII != MIE; --MII) {
MachineInstr *MI = prior(MII);
if (MI && PrevMI) {
More information about the llvm-commits
mailing list