Lines Matching refs:Dist
123 bool noUseAfterLastDef(Register Reg, unsigned Dist, unsigned &LastDef);
126 MachineInstr *MI, unsigned Dist);
129 unsigned RegBIdx, unsigned RegCIdx, unsigned Dist);
135 Register RegB, unsigned &Dist);
137 bool isDefTooClose(Register Reg, unsigned Dist, MachineInstr *MI);
147 unsigned &Dist, bool shouldOnlyCommute);
153 unsigned Dist);
162 void processTiedPairs(MachineInstr *MI, TiedPairList&, unsigned &Dist);
245 bool TwoAddressInstructionPass::noUseAfterLastDef(Register Reg, unsigned Dist, in noUseAfterLastDef() argument
248 unsigned LastUse = Dist; in noUseAfterLastDef()
262 return !(LastUse > LastDef && LastUse < Dist); in noUseAfterLastDef()
530 unsigned Dist) { in isProfitableToCommute() argument
589 if (!noUseAfterLastDef(RegC, Dist, LastDefC)) in isProfitableToCommute()
595 if (!noUseAfterLastDef(RegB, Dist, LastDefB)) in isProfitableToCommute()
635 unsigned Dist) { in commuteInstruction() argument
681 Register RegA, Register RegB, unsigned &Dist) { in convertInstTo3Addr() argument
710 DistanceMap.insert(std::make_pair(&MI, Dist++)); in convertInstTo3Addr()
711 Dist--; in convertInstTo3Addr()
971 bool TwoAddressInstructionPass::isDefTooClose(Register Reg, unsigned Dist, in isDefTooClose() argument
982 assert(Dist > DefDist && "Visited def already?"); in isDefTooClose()
983 if (TII->getInstrLatency(InstrItins, DefMI) > (Dist - DefDist)) in isDefTooClose()
1150 unsigned Dist) { in tryInstructionCommute() argument
1177 isProfitableToCommute(DstOpReg, BaseOpReg, OtherOpReg, MI, Dist)) { in tryInstructionCommute()
1184 Dist)) { in tryInstructionCommute()
1215 unsigned &Dist, bool shouldOnlyCommute) { in tryInstructionTransform() argument
1229 bool Commuted = tryInstructionCommute(&MI, DstIdx, SrcIdx, regBKilled, Dist); in tryInstructionTransform()
1264 if (convertInstTo3Addr(mi, nmi, regA, regB, Dist)) { in tryInstructionTransform()
1323 DistanceMap.insert(std::make_pair(NewMIs[0], Dist++)); in tryInstructionTransform()
1324 DistanceMap.insert(std::make_pair(NewMIs[1], Dist)); in tryInstructionTransform()
1334 tryInstructionTransform(NewMI, mi, NewSrcIdx, NewDstIdx, Dist, true); in tryInstructionTransform()
1398 Dist--; in tryInstructionTransform()
1452 unsigned &Dist) { in processTiedPairs() argument
1519 DistanceMap.insert(std::make_pair(&*PrevMI, Dist)); in processTiedPairs()
1520 DistanceMap[MI] = ++Dist; in processTiedPairs()
1721 unsigned Dist = 0; in runOnMachineFunction() local
1740 DistanceMap.insert(std::make_pair(&*mi, ++Dist)); in runOnMachineFunction()
1768 tryInstructionTransform(mi, nmi, SrcIdx, DstIdx, Dist, false)) { in runOnMachineFunction()
1789 processTiedPairs(&*mi, TO.second, Dist); in runOnMachineFunction()