Reduce indentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99214 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2010-03-22 21:24:33 +00:00
parent 93dc92e412
commit a69ec09364

View File

@ -248,48 +248,47 @@ void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) {
unsigned DataLatency = SU->Latency; unsigned DataLatency = SU->Latency;
for (unsigned i = 0, e = UseList.size(); i != e; ++i) { for (unsigned i = 0, e = UseList.size(); i != e; ++i) {
SUnit *UseSU = UseList[i]; SUnit *UseSU = UseList[i];
if (UseSU != SU) { if (UseSU == SU)
unsigned LDataLatency = DataLatency; continue;
// Optionally add in a special extra latency for nodes that unsigned LDataLatency = DataLatency;
// feed addresses. // Optionally add in a special extra latency for nodes that
// TODO: Do this for register aliases too. // feed addresses.
// TODO: Perhaps we should get rid of // TODO: Do this for register aliases too.
// SpecialAddressLatency and just move this into // TODO: Perhaps we should get rid of
// adjustSchedDependency for the targets that care about // SpecialAddressLatency and just move this into
// it. // adjustSchedDependency for the targets that care about it.
if (SpecialAddressLatency != 0 && !UnitLatencies) { if (SpecialAddressLatency != 0 && !UnitLatencies) {
MachineInstr *UseMI = UseSU->getInstr(); MachineInstr *UseMI = UseSU->getInstr();
const TargetInstrDesc &UseTID = UseMI->getDesc(); const TargetInstrDesc &UseTID = UseMI->getDesc();
int RegUseIndex = UseMI->findRegisterUseOperandIdx(Reg); int RegUseIndex = UseMI->findRegisterUseOperandIdx(Reg);
assert(RegUseIndex >= 0 && "UseMI doesn's use register!"); assert(RegUseIndex >= 0 && "UseMI doesn's use register!");
if ((UseTID.mayLoad() || UseTID.mayStore()) && if ((UseTID.mayLoad() || UseTID.mayStore()) &&
(unsigned)RegUseIndex < UseTID.getNumOperands() && (unsigned)RegUseIndex < UseTID.getNumOperands() &&
UseTID.OpInfo[RegUseIndex].isLookupPtrRegClass()) UseTID.OpInfo[RegUseIndex].isLookupPtrRegClass())
LDataLatency += SpecialAddressLatency; LDataLatency += SpecialAddressLatency;
}
// Adjust the dependence latency using operand def/use
// information (if any), and then allow the target to
// perform its own adjustments.
const SDep& dep = SDep(SU, SDep::Data, LDataLatency, Reg);
if (!UnitLatencies) {
ComputeOperandLatency(SU, UseSU, (SDep &)dep);
ST.adjustSchedDependency(SU, UseSU, (SDep &)dep);
}
UseSU->addPred(dep);
} }
// Adjust the dependence latency using operand def/use
// information (if any), and then allow the target to
// perform its own adjustments.
const SDep& dep = SDep(SU, SDep::Data, LDataLatency, Reg);
if (!UnitLatencies) {
ComputeOperandLatency(SU, UseSU, (SDep &)dep);
ST.adjustSchedDependency(SU, UseSU, (SDep &)dep);
}
UseSU->addPred(dep);
} }
for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) { for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
std::vector<SUnit *> &UseList = Uses[*Alias]; std::vector<SUnit *> &UseList = Uses[*Alias];
for (unsigned i = 0, e = UseList.size(); i != e; ++i) { for (unsigned i = 0, e = UseList.size(); i != e; ++i) {
SUnit *UseSU = UseList[i]; SUnit *UseSU = UseList[i];
if (UseSU != SU) { if (UseSU == SU)
const SDep& dep = SDep(SU, SDep::Data, DataLatency, *Alias); continue;
if (!UnitLatencies) { const SDep& dep = SDep(SU, SDep::Data, DataLatency, *Alias);
ComputeOperandLatency(SU, UseSU, (SDep &)dep); if (!UnitLatencies) {
ST.adjustSchedDependency(SU, UseSU, (SDep &)dep); ComputeOperandLatency(SU, UseSU, (SDep &)dep);
} ST.adjustSchedDependency(SU, UseSU, (SDep &)dep);
UseSU->addPred(dep);
} }
UseSU->addPred(dep);
} }
} }