17#ifndef LLVM_LIB_TARGET_AMDGPU_GCNITERATIVESCHEDULER_H
18#define LLVM_LIB_TARGET_AMDGPU_GCNITERATIVESCHEDULER_H
48 unsigned RegionInstrs)
override;
83 template <
typename Range>
85 Range &&Schedule)
const;
104 template <
typename Range>
109 std::numeric_limits<unsigned>::max());
113 void scheduleILP(
bool TryMaximizeOccupancy =
true);
This file defines the GCNRegPressure class, which tracks registry pressure by bookkeeping number of S...
ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High))
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
SpecificBumpPtrAllocator< Region > Alloc
void printSchedRP(raw_ostream &OS, const GCNRegPressure &Before, const GCNRegPressure &After) const
void enterRegion(MachineBasicBlock *BB, MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End, unsigned RegionInstrs) override
Implement the ScheduleDAGInstrs interface for handling the next scheduling region.
void sortRegionsByPressure(unsigned TargetOcc)
std::vector< Region * > Regions
void scheduleILP(bool TryMaximizeOccupancy=true)
GCNUpwardRPTracker UPTracker
void scheduleBest(Region &R)
MachineSchedContext * Context
void printSchedResult(raw_ostream &OS, const Region *R, const GCNRegPressure &RP) const
unsigned tryMaximizeOccupancy(unsigned TargetOcc=std::numeric_limits< unsigned >::max())
void printRegions(raw_ostream &OS) const
@ SCHEDULE_LEGACYMAXOCCUPANCY
void setBestSchedule(Region &R, ScheduleRef Schedule, const GCNRegPressure &MaxRP=GCNRegPressure())
void finalizeSchedule() override
Allow targets to perform final scheduling actions at the level of the whole MachineFunction.
void scheduleLegacyMaxOccupancy(bool TryMaximizeOccupancy=true)
void schedule() override
Implement ScheduleDAGInstrs interface for scheduling a sequence of reorderable instructions.
GCNRegPressure getSchedulePressure(const Region &R, Range &&Schedule) const
void scheduleMinReg(bool force=false)
GCNRegPressure getRegionPressure(MachineBasicBlock::iterator Begin, MachineBasicBlock::iterator End) const
ArrayRef< const SUnit * > ScheduleRef
void scheduleRegion(Region &R, Range &&Schedule, const GCNRegPressure &MaxRP=GCNRegPressure())
const StrategyKind Strategy
GCNRegPressure getRegionPressure(const Region &R) const
std::vector< MachineInstr * > detachSchedule(ScheduleRef Schedule) const
MachineBasicBlock * BB
The block in which to insert instructions.
ScheduleDAGMILive is an implementation of ScheduleDAGInstrs that schedules machine instructions while...
A BumpPtrAllocator that allows only elements of a specific type to be allocated.
This class implements an extremely fast bulk output stream that can only output to a stream.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
const unsigned NumRegionInstrs
const MachineBasicBlock::iterator End
GCNRegPressure MaxPressure
std::unique_ptr< TentativeSchedule > BestSchedule
MachineBasicBlock::iterator Begin
GCNRegPressure MaxPressure
std::vector< MachineInstr * > Schedule
MachineSchedContext provides enough context from the MachineScheduler pass for the target to instanti...