diff options
author | Matthias Braun <matze@braunis.de> | 2016-11-11 22:37:34 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-11-11 22:37:34 +0000 |
commit | 66ee0bfced8e10ac437cd8984685d7be6463d0d2 (patch) | |
tree | eed88023f56123e31880da297f6e8caaabf30f3b /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | 40639885f50b0b23e4f958f5ab4217802c8498d1 (diff) | |
download | bcm5719-llvm-66ee0bfced8e10ac437cd8984685d7be6463d0d2.tar.gz bcm5719-llvm-66ee0bfced8e10ac437cd8984685d7be6463d0d2.zip |
MachineScheduler/ScheduleDAG: Add support to skipping a node.
The DAG mutators in the scheduler cannot really remove DAG nodes as
additional anlysis information such as ScheduleDAGToplogicalSort are
already computed at this point and rely on a fixed number of DAG nodes.
Alleviate the missing removal with a new flag: Setting the new skip
flag on a node ignores it during scheduling.
llvm-svn: 286655
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 3984a15861d..f7dd53b9b9b 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -707,6 +707,7 @@ void ScheduleDAGMI::schedule() { DEBUG(dbgs() << "** ScheduleDAGMI::schedule picking next node\n"); SUnit *SU = SchedImpl->pickNode(IsTopNode); if (!SU) break; + assert(!SU->skip); assert(!SU->isScheduled && "Node already scheduled"); if (!checkSchedLimit()) @@ -764,6 +765,8 @@ findRootsAndBiasEdges(SmallVectorImpl<SUnit*> &TopRoots, SmallVectorImpl<SUnit*> &BotRoots) { for (std::vector<SUnit>::iterator I = SUnits.begin(), E = SUnits.end(); I != E; ++I) { + if (I->skip) + continue; SUnit *SU = &(*I); assert(!SU->isBoundaryNode() && "Boundary node should not be in SUnits"); @@ -1518,6 +1521,8 @@ void BaseMemOpClusterMutation::apply(ScheduleDAGInstrs *DAGInstrs) { SmallVector<SmallVector<SUnit*,4>, 32> StoreChainDependents; for (unsigned Idx = 0, End = DAG->SUnits.size(); Idx != End; ++Idx) { SUnit *SU = &DAG->SUnits[Idx]; + if (SU->skip) + continue; if ((IsLoad && !SU->getInstr()->mayLoad()) || (!IsLoad && !SU->getInstr()->mayStore())) continue; @@ -1810,6 +1815,8 @@ void CopyConstrain::apply(ScheduleDAGInstrs *DAGInstrs) { for (unsigned Idx = 0, End = DAG->SUnits.size(); Idx != End; ++Idx) { SUnit *SU = &DAG->SUnits[Idx]; + if (SU->skip) + continue; if (!SU->getInstr()->isCopy()) continue; |