Lines Matching defs:SchedGroup

65 // classified into a SchedGroup.
84 class SchedGroup;
87 // not an SU maps to a given SchedGroup. It contains complementary data
100 SmallVectorImpl<SchedGroup> &) {
120 class SchedGroup {
123 // SchedGroup. The instruction types correspond to the mask from SCHED_BARRIER
137 // The different rules each instruction in this SchedGroup must conform to
147 // SchedGroup object.
157 // Returns true if SU can be added to this SchedGroup.
160 // Add DAG dependencies from all SUnits in this SchedGroup and this SU. If
162 // SchedGroup, otherwise SU will be a successor.
170 // Add DAG dependencies from all SUnits in this SchedGroup and this SU.
172 // true) or a successor (P = false) of this SchedGroup.
177 void link(SchedGroup &OtherGroup);
183 // SchedGroup. Since many rules involve the relationship between a SchedGroup
185 // time (rather than SchedGroup init time.)
192 SmallVectorImpl<SchedGroup> &SyncPipe) const {
200 // Add SU to the SchedGroup.
202 LLVM_DEBUG(dbgs() << "For SchedGroup with mask "
208 // Remove last element in the SchedGroup
211 // Identify and add all relevant SUs from the DAG to this SchedGroup.
214 // Add instructions to the SchedGroup bottom up starting from RIter.
216 // SchedGroup even when the other conditions for adding it are satisfied.
217 // RIter will be added to the SchedGroup as well, and dependencies will be
230 SchedGroup(SchedGroupMask SGMask, std::optional<unsigned> MaxSize,
236 SchedGroup(SchedGroupMask SGMask, std::optional<unsigned> MaxSize, int SyncID,
267 // assigned to a SchedGroup. The PipelineSolver class implements two algorithms
278 DenseMap<int, SmallVector<SchedGroup, 4>> SyncedSchedGroups;
280 SmallVector<SmallVector<SchedGroup, 4>, 4> CurrPipeline;
282 SmallVector<SmallVector<SchedGroup, 4>, 4> BestPipeline;
291 // The cost penalty of not assigning a SU to a SchedGroup
322 // Find the best SchedGroup for the current SU using the heuristic given all
324 // the SchedGroup iterator (either reverse or forward).
331 // Templated against the SchedGroup iterator (either reverse or forward).
338 // Tmplated against the SchedGroup iterator (either reverse or forward).
342 int addEdges(SmallVectorImpl<SchedGroup> &SyncPipeline, SUnit *SU, int SGID,
344 /// Link the pipeline as if \p SU was in the SchedGroup with ID \p SGID. It
362 PipelineSolver(DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
452 LLVM_DEBUG(dbgs() << "SchedGroup with SGID " << SG.getSGID()
493 SmallVectorImpl<SchedGroup> &SyncPipeline, SUnit *SU, int SGID,
496 // For IsBottomUp, the first SchedGroup in SyncPipeline contains the
499 // candidate SGID are successors of the candidate SchedGroup, thus the current
592 SchedGroup *Match = llvm::find_if(SyncPipeline, [CandSGID](SchedGroup &SG) {
634 // SchedGroup -> Cost pairs
655 SchedGroup *Match;
667 LLVM_DEBUG(dbgs() << "Assigning to SchedGroup with Mask "
724 SchedGroup *BestGroup = nullptr;
737 SchedGroup *Match = llvm::find_if(SyncPipeline, [CandSGID](SchedGroup &SG) {
850 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
870 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
886 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
895 SchedGroup *SG = nullptr;
943 SmallVectorImpl<SchedGroup> &SyncPipe) override {
977 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1019 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1068 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1109 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1144 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1157 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1169 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1177 /// of the SchedGroup \p Distance steps before.
1184 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1185 SchedGroup *OtherGroup = nullptr;
1214 /// instruction the the SchedGroup \p Distance steps before.
1221 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1222 SchedGroup *OtherGroup = nullptr;
1256 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1274 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1316 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1341 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
1565 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
1580 SchedGroup *SG = nullptr;
1860 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1893 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1927 // Whether the SU is a successor of any element in previous SchedGroup
1931 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1932 SchedGroup *OtherGroup = nullptr;
1963 SmallVectorImpl<SchedGroup> &SyncPipe) override {
1996 /// Whether the SU shares a V_PERM predecessor with any SU in the SchedGroup
2004 SmallVectorImpl<SchedGroup> &SyncPipe) override {
2005 SchedGroup *OtherGroup = nullptr;
2050 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
2070 DenseMap<int, SmallVector<SchedGroup, 4>> &SyncedSchedGroups,
2157 SchedGroup *SG;
2337 DenseMap<int, SmallVector<SchedGroup, 4>> SyncedSchedGroups;
2366 // SchedGroup for a PipelineInstr. BOTTOM_UP will try to add SUs to the last
2367 // created SchedGroup first, and will consider that as the ultimate
2369 // first created SchedGroup first.
2379 unsigned SchedGroup::NumSchedGroups = 0;
2381 bool SchedGroup::tryAddEdge(SUnit *A, SUnit *B) {
2389 bool SchedGroup::canAddMI(const MachineInstr &MI) const {
2442 dbgs() << "For SchedGroup with mask " << format_hex((int)SGMask, 10, true)
2448 int SchedGroup::link(SUnit &SU, bool MakePred,
2473 void SchedGroup::link(SUnit &SU, bool MakePred) {
2485 void SchedGroup::link(SUnit &SU,
2496 void SchedGroup::link(SchedGroup &OtherGroup) {
2501 bool SchedGroup::canAddSU(SUnit &SU) const {
2516 void SchedGroup::initSchedGroup() {
2526 void SchedGroup::initSchedGroup(std::vector<SUnit>::reverse_iterator RIter,
2543 void SchedGroup::initSchedGroup(SUnitsToCandidateSGsMap &SyncedInstrs) {
2602 LLVM_DEBUG(dbgs() << "Building SchedGroup for SchedBarrier with Mask: "
2606 SchedGroup SG(InvertedMask, std::nullopt, DAG, TII);
2649 LLVM_DEBUG(dbgs() << "After Inverting, SchedGroup Mask: " << (int)InvertedMask