Lines Matching refs:Schedule
335 MachineInstr *applyInstrChange(MachineInstr *MI, SMSchedule &Schedule,
365 bool schedulePipeline(SMSchedule &Schedule);
366 void generatePipelinedLoop(SMSchedule &Schedule);
367 void generateProlog(SMSchedule &Schedule, unsigned LastStage,
370 void generateEpilog(SMSchedule &Schedule, unsigned LastStage,
375 SMSchedule &Schedule, ValueMapTy *VRMap,
380 SMSchedule &Schedule, ValueMapTy *VRMap,
386 SMSchedule &Schedule);
388 MBBVectorTy &EpilogBBs, SMSchedule &Schedule,
397 SMSchedule &Schedule);
400 SMSchedule &Schedule, ValueMapTy *VRMap);
406 SMSchedule &Schedule, ValueMapTy *VRMap,
408 void rewriteScheduledInstr(MachineBasicBlock *BB, SMSchedule &Schedule,
886 SMSchedule Schedule(Pass.MF); in schedule() local
887 Scheduled = schedulePipeline(Schedule); in schedule()
892 unsigned numStages = Schedule.getMaxStageCount(); in schedule()
901 generatePipelinedLoop(Schedule); in schedule()
2113 bool SwingSchedulerDAG::schedulePipeline(SMSchedule &Schedule) { in schedulePipeline() argument
2121 Schedule.reset(); in schedulePipeline()
2122 Schedule.setInitiationInterval(II); in schedulePipeline()
2138 Schedule.computeStart(SU, &EarlyStart, &LateStart, &SchedEnd, &SchedStart, in schedulePipeline()
2155 scheduleFound = Schedule.insert(SU, EarlyStart, SchedEnd, II); in schedulePipeline()
2158 scheduleFound = Schedule.insert(SU, LateStart, SchedStart, II); in schedulePipeline()
2166 scheduleFound = Schedule.insert(SU, SchedEnd, EarlyStart, II); in schedulePipeline()
2168 scheduleFound = Schedule.insert(SU, EarlyStart, SchedEnd, II); in schedulePipeline()
2170 int FirstCycle = Schedule.getFirstCycle(); in schedulePipeline()
2171 scheduleFound = Schedule.insert(SU, FirstCycle + getASAP(SU), in schedulePipeline()
2178 Schedule.getMaxStageCount() > (unsigned)SwpMaxStages) in schedulePipeline()
2189 scheduleFound = Schedule.isValidSchedule(this); in schedulePipeline()
2195 Schedule.finalizeSchedule(this); in schedulePipeline()
2197 Schedule.reset(); in schedulePipeline()
2199 return scheduleFound && Schedule.getMaxStageCount() > 0; in schedulePipeline()
2207 void SwingSchedulerDAG::generatePipelinedLoop(SMSchedule &Schedule) { in generatePipelinedLoop() argument
2211 unsigned MaxStageCount = Schedule.getMaxStageCount(); in generatePipelinedLoop()
2222 generateProlog(Schedule, MaxStageCount, KernelBB, VRMap, PrologBBs); in generatePipelinedLoop()
2227 for (int Cycle = Schedule.getFirstCycle(), in generatePipelinedLoop()
2228 LastCycle = Schedule.getFinalCycle(); in generatePipelinedLoop()
2230 std::deque<SUnit *> &CycleInstrs = Schedule.getInstructions(Cycle); in generatePipelinedLoop()
2235 unsigned StageNum = Schedule.stageScheduled(getSUnit(CI->getInstr())); in generatePipelinedLoop()
2237 updateInstruction(NewMI, false, MaxStageCount, StageNum, Schedule, VRMap); in generatePipelinedLoop()
2249 updateInstruction(NewMI, false, MaxStageCount, 0, Schedule, VRMap); in generatePipelinedLoop()
2257 generateExistingPhis(KernelBB, PrologBBs.back(), KernelBB, KernelBB, Schedule, in generatePipelinedLoop()
2259 generatePhis(KernelBB, PrologBBs.back(), KernelBB, KernelBB, Schedule, VRMap, in generatePipelinedLoop()
2266 generateEpilog(Schedule, MaxStageCount, KernelBB, VRMap, EpilogBBs, in generatePipelinedLoop()
2271 splitLifetimes(KernelBB, EpilogBBs, Schedule); in generatePipelinedLoop()
2277 addBranches(PrologBBs, KernelBB, EpilogBBs, Schedule, VRMap); in generatePipelinedLoop()
2287 void SwingSchedulerDAG::generateProlog(SMSchedule &Schedule, unsigned LastStage, in generateProlog() argument
2316 if (Schedule.isScheduledAtStage(getSUnit(&*BBI), (unsigned)StageNum)) { in generateProlog()
2320 cloneAndChangeInstr(&*BBI, i, (unsigned)StageNum, Schedule); in generateProlog()
2321 updateInstruction(NewMI, false, i, (unsigned)StageNum, Schedule, in generateProlog()
2328 rewritePhiValues(NewBB, i, Schedule, VRMap, InstrMap); in generateProlog()
2349 void SwingSchedulerDAG::generateEpilog(SMSchedule &Schedule, unsigned LastStage, in generateEpilog() argument
2395 if (Schedule.isScheduledAtStage(getSUnit(In), StageNum)) { in generateEpilog()
2397 updateInstruction(NewMI, i == 1, EpilogStage, 0, Schedule, VRMap); in generateEpilog()
2403 generateExistingPhis(NewBB, PrologBBs[i - 1], PredBB, KernelBB, Schedule, in generateEpilog()
2405 generatePhis(NewBB, PrologBBs[i - 1], PredBB, KernelBB, Schedule, VRMap, in generateEpilog()
2473 MachineBasicBlock *KernelBB, SMSchedule &Schedule, ValueMapTy *VRMap, in generateExistingPhis() argument
2506 int StageScheduled = Schedule.stageScheduled(getSUnit(&*BBI)); in generateExistingPhis()
2508 Schedule.stageScheduled(getSUnit(MRI.getVRegDef(LoopVal))); in generateExistingPhis()
2509 unsigned NumStages = Schedule.getStagesForReg(Def, CurStageNum); in generateExistingPhis()
2514 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, 0, &*BBI, in generateExistingPhis()
2566 int PhiStage = Schedule.stageScheduled(getSUnit(InstOp1)); in generateExistingPhis()
2572 int PhiOpStage = Schedule.stageScheduled(getSUnit(InstOp1)); in generateExistingPhis()
2626 int LVNumStages = Schedule.getStagesForPhi(LoopVal); in generateExistingPhis()
2632 if (Schedule.isLoopCarried(this, *PhiInst)) in generateExistingPhis()
2639 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, np, in generateExistingPhis()
2673 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, np, &*BBI, in generateExistingPhis()
2678 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, np, &*BBI, in generateExistingPhis()
2697 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, NumPhis, in generateExistingPhis()
2713 MachineBasicBlock *KernelBB, SMSchedule &Schedule, ValueMapTy *VRMap, in generatePhis() argument
2739 int StageScheduled = Schedule.stageScheduled(getSUnit(&*BBI)); in generatePhis()
2742 unsigned NumPhis = Schedule.getStagesForReg(Def, CurStageNum); in generatePhis()
2787 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, np, in generatePhis()
2789 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, np, in generatePhis()
2797 rewriteScheduledInstr(NewBB, Schedule, InstrMap, CurStageNum, np, in generatePhis()
2889 SMSchedule &Schedule) { in splitLifetimes() argument
2956 SMSchedule &Schedule, ValueMapTy *VRMap) { in addBranches() argument
3014 updateInstruction(&*I, false, j, 0, Schedule, VRMap); in addBranches()
3104 SMSchedule &Schedule) { in cloneAndChangeInstr() argument
3115 if (Schedule.stageScheduled(getSUnit(LoopDef)) > (signed)InstStageNum) in cloneAndChangeInstr()
3128 SMSchedule &Schedule, in updateInstruction() argument
3146 int DefStageNum = Schedule.stageScheduled(getSUnit(Def)); in updateInstruction()
3214 SMSchedule &Schedule, in rewritePhiValues() argument
3226 (unsigned)Schedule.stageScheduled(getSUnit(MRI.getVRegDef(PhiDef))); in rewritePhiValues()
3228 (unsigned)Schedule.stageScheduled(getSUnit(MRI.getVRegDef(LoopVal))); in rewritePhiValues()
3229 unsigned NumPhis = Schedule.getStagesForPhi(PhiDef); in rewritePhiValues()
3237 rewriteScheduledInstr(NewBB, Schedule, InstrMap, StageNum - np, np, &*BBI, in rewritePhiValues()
3247 MachineBasicBlock *BB, SMSchedule &Schedule, InstrMapTy &InstrMap, in rewriteScheduledInstr() argument
3250 bool InProlog = (CurStageNum < Schedule.getMaxStageCount()); in rewriteScheduledInstr()
3251 int StagePhi = Schedule.stageScheduled(getSUnit(Phi)) + PhiNum; in rewriteScheduledInstr()
3271 int StageSched = Schedule.stageScheduled(OrigMISU); in rewriteScheduledInstr()
3272 int CycleSched = Schedule.cycleScheduled(OrigMISU); in rewriteScheduledInstr()
3276 int CyclePhi = Schedule.cycleScheduled(getSUnit(Phi)); in rewriteScheduledInstr()
3279 else if (PrevReg && !Schedule.isLoopCarried(this, *Phi) && in rewriteScheduledInstr()
3288 !Schedule.isLoopCarried(this, *Phi)) in rewriteScheduledInstr()
3360 SMSchedule &Schedule, in applyInstrChange() argument
3372 int DefStageNum = Schedule.stageScheduled(getSUnit(LoopDef)); in applyInstrChange()
3373 int DefCycleNum = Schedule.cycleScheduled(getSUnit(LoopDef)); in applyInstrChange()
3374 int BaseStageNum = Schedule.stageScheduled(SU); in applyInstrChange()
3375 int BaseCycleNum = Schedule.cycleScheduled(SU); in applyInstrChange()