reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

include/llvm/CodeGen/DFAPacketizer.h
   46 class SUnit;
include/llvm/CodeGen/ScheduleDAG.h
   41 class SUnit;
include/llvm/CodeGen/ScheduleHazardRecognizer.h
   20 class SUnit;
include/llvm/CodeGen/ScoreboardHazardRecognizer.h
   27 class SUnit;
include/llvm/CodeGen/TargetSubtargetInfo.h
   47 class SUnit;
lib/Target/AMDGPU/GCNIterativeScheduler.h
   24 class SUnit;
lib/Target/Hexagon/HexagonMachineScheduler.h
   33 class SUnit;
lib/Target/Hexagon/HexagonSubtarget.h
   38 class SUnit;

References

include/llvm/ADT/ArrayRef.h
   43     using iterator = const T *;
   44     using const_iterator = const T *;
   50     const T *Data = nullptr;
   66     /*implicit*/ ArrayRef(const T &OneElt)
   70     /*implicit*/ ArrayRef(const T *data, size_t length)
   74     ArrayRef(const T *begin, const T *end)
   74     ArrayRef(const T *begin, const T *end)
   81     /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<T, U> &Vec)
   87     /*implicit*/ ArrayRef(const std::vector<T, A> &Vec)
   92     /*implicit*/ constexpr ArrayRef(const std::array<T, N> &Arr)
   97     /*implicit*/ constexpr ArrayRef(const T (&Arr)[N]) : Data(Arr), Length(N) {}
  100     /*implicit*/ ArrayRef(const std::initializer_list<T> &Vec)
  108         const ArrayRef<U *> &A,
  110            std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  118       const SmallVectorTemplateCommon<U *, DummyT> &Vec,
  120           std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
  127     ArrayRef(const std::vector<U *, A> &Vec,
  129                  std::is_convertible<U *const *, T const *>::value>::type* = 0)
  145     const T *data() const { return Data; }
  151     const T &front() const {
  157     const T &back() const {
  163     template <typename Allocator> ArrayRef<T> copy(Allocator &A) {
  178     ArrayRef<T> slice(size_t N, size_t M) const {
  184     ArrayRef<T> slice(size_t N) const { return slice(N, size() - N); }
  187     ArrayRef<T> drop_front(size_t N = 1) const {
  193     ArrayRef<T> drop_back(size_t N = 1) const {
  200     template <class PredicateT> ArrayRef<T> drop_while(PredicateT Pred) const {
  206     template <class PredicateT> ArrayRef<T> drop_until(PredicateT Pred) const {
  211     ArrayRef<T> take_front(size_t N = 1) const {
  218     ArrayRef<T> take_back(size_t N = 1) const {
  226     template <class PredicateT> ArrayRef<T> take_while(PredicateT Pred) const {
  232     template <class PredicateT> ArrayRef<T> take_until(PredicateT Pred) const {
  239     const T &operator[](size_t Index) const {
  249     typename std::enable_if<std::is_same<U, T>::value, ArrayRef<T>>::type &
  257     typename std::enable_if<std::is_same<U, T>::value, ArrayRef<T>>::type &
  263     std::vector<T> vec() const {
  270     operator std::vector<T>() const {
include/llvm/ADT/DenseMapInfo.h
   39   static inline T* getEmptyKey() {
   41     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   45   static inline T* getTombstoneKey() {
   47     Val <<= PointerLikeTypeTraits<T*>::NumLowBitsAvailable;
   51   static unsigned getHashValue(const T *PtrVal) {
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
   56   static bool isEqual(const T *LHS, const T *RHS) { return LHS == RHS; }
include/llvm/ADT/SmallSet.h
  249 class SmallSet<PointeeType*, N> : public SmallPtrSet<PointeeType*, N> {};
include/llvm/CodeGen/DFAPacketizer.h
  156   std::map<MachineInstr*, SUnit*> MIToSUnit;
  209   virtual bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) {
  209   virtual bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) {
  214   virtual bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) {
  214   virtual bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) {
include/llvm/CodeGen/LatencyPriorityQueue.h
   29     bool operator()(const SUnit* LHS, const SUnit* RHS) const;
   29     bool operator()(const SUnit* LHS, const SUnit* RHS) const;
   34     std::vector<SUnit> *SUnits;
   43     std::vector<SUnit*> Queue;
   52     void initNodes(std::vector<SUnit> &sunits) override {
   57     void addNode(const SUnit *SU) override {
   61     void updateNode(const SUnit *SU) override {
   80     void push(SUnit *U) override;
   82     SUnit *pop() override;
   84     void remove(SUnit *SU) override;
   94     void scheduledNode(SUnit *SU) override;
   97     void AdjustPriorityOfUnscheduledPreds(SUnit *SU);
   98     SUnit *getSingleUnscheduledPred(SUnit *SU);
   98     SUnit *getSingleUnscheduledPred(SUnit *SU);
include/llvm/CodeGen/MachinePipeliner.h
  141   SetVector<SUnit *> NodeOrder;
  149   DenseMap<SUnit *, std::pair<unsigned, int64_t>> InstrChanges;
  160     std::vector<SUnit> &SUnits;
  161     SetVector<SUnit *> Stack;
  163     SmallVector<SmallPtrSet<SUnit *, 4>, 10> B;
  171     Circuits(std::vector<SUnit> &SUs, ScheduleDAGTopologicalSort &Topo)
  215   int getASAP(SUnit *Node) { return ScheduleInfo[Node->NodeNum].ASAP; }
  218   int getALAP(SUnit *Node) { return ScheduleInfo[Node->NodeNum].ALAP; }
  222   int getMOV(SUnit *Node) { return getALAP(Node) - getASAP(Node); }
  225   unsigned getDepth(SUnit *Node) { return Node->getDepth(); }
  229   int getZeroLatencyDepth(SUnit *Node) {
  234   unsigned getHeight(SUnit *Node) { return Node->getHeight(); }
  238   int getZeroLatencyHeight(SUnit *Node) {
  245   bool isBackedge(SUnit *Source, const SDep &Dep) {
  251   bool isLoopCarriedDep(SUnit *Source, const SDep &Dep, bool isSucc = true);
  255   unsigned getDistance(SUnit *U, SUnit *V, const SDep &Dep) {
  255   unsigned getDistance(SUnit *U, SUnit *V, const SDep &Dep) {
  265   void fixupRegisterOverlaps(std::deque<SUnit *> &Instrs);
  269   unsigned getInstrBaseReg(SUnit *SU) {
  270     DenseMap<SUnit *, std::pair<unsigned, int64_t>>::iterator It =
  297   void addConnectedNodes(SUnit *SU, NodeSet &NewSet,
  298                          SetVector<SUnit *> &NodesAdded);
  317   SetVector<SUnit *> Nodes;
  323   SUnit *ExceedPressure = nullptr;
  327   using iterator = SetVector<SUnit *>::const_iterator;
  338   bool insert(SUnit *SU) { return Nodes.insert(SU); }
  346   unsigned count(SUnit *SU) const { return Nodes.count(SU); }
  354   SUnit *getNode(unsigned i) const { return Nodes[i]; };
  360   void setExceedPressure(SUnit *SU) { ExceedPressure = SU; }
  362   bool isExceedSU(SUnit *SU) { return ExceedPressure == SU; }
  370     for (SUnit *SU : *this) {
  390   operator SetVector<SUnit *> &() { return Nodes; }
  484   DenseMap<int, std::deque<SUnit *>> ScheduledInstrs;
  487   std::map<SUnit *, int> InstrToCycle;
  537   void computeStart(SUnit *SU, int *MaxEarlyStart, int *MinLateStart,
  539   bool insert(SUnit *SU, int StartCycle, int EndCycle, int II);
  542   using sched_iterator = DenseMap<int, std::deque<SUnit *>>::iterator;
  544       DenseMap<int, std::deque<SUnit *>>::const_iterator;
  547   bool isScheduledAtStage(SUnit *SU, unsigned StageNum) {
  553   int stageScheduled(SUnit *SU) const {
  554     std::map<SUnit *, int>::const_iterator it = InstrToCycle.find(SU);
  562   unsigned cycleScheduled(SUnit *SU) const {
  563     std::map<SUnit *, int>::const_iterator it = InstrToCycle.find(SU);
  574   std::deque<SUnit *> &getInstructions(int cycle) {
  580   void orderDependence(SwingSchedulerDAG *SSD, SUnit *SU,
  581                        std::deque<SUnit *> &Insts);
include/llvm/CodeGen/MachineScheduler.h
  240   virtual SUnit *pickNode(bool &IsTopNode) = 0;
  247   virtual void schedNode(SUnit *SU, bool IsTopNode) = 0;
  251   virtual void releaseTopNode(SUnit *SU) = 0;
  255   virtual void releaseBottomNode(SUnit *SU) = 0;
  278   const SUnit *NextClusterPred = nullptr;
  279   const SUnit *NextClusterSucc = nullptr;
  341   const SUnit *getNextClusterPred() const { return NextClusterPred; }
  343   const SUnit *getNextClusterSucc() const { return NextClusterSucc; }
  356   void initQueues(ArrayRef<SUnit*> TopRoots, ArrayRef<SUnit*> BotRoots);
  356   void initQueues(ArrayRef<SUnit*> TopRoots, ArrayRef<SUnit*> BotRoots);
  359   void updateQueues(SUnit *SU, bool IsTopNode);
  370   void findRootsAndBiasEdges(SmallVectorImpl<SUnit*> &TopRoots,
  371                              SmallVectorImpl<SUnit*> &BotRoots);
  373   void releaseSucc(SUnit *SU, SDep *SuccEdge);
  374   void releaseSuccessors(SUnit *SU);
  375   void releasePred(SUnit *SU, SDep *PredEdge);
  376   void releasePredecessors(SUnit *SU);
  453   PressureDiff &getPressureDiff(const SUnit *SU) {
  456   const PressureDiff &getPressureDiff(const SUnit *SU) const {
  497   void initQueues(ArrayRef<SUnit*> TopRoots, ArrayRef<SUnit*> BotRoots);
  497   void initQueues(ArrayRef<SUnit*> TopRoots, ArrayRef<SUnit*> BotRoots);
  500   void scheduleMI(SUnit *SU, bool IsTopNode);
  508   void updateScheduledPressure(const SUnit *SU,
  511   void collectVRegUses(SUnit &SU);
  530   std::vector<SUnit*> Queue;
  540   bool isInQueue(SUnit *SU) const { return (SU->NodeQueueId & ID); }
  548   using iterator = std::vector<SUnit*>::iterator;
  554   ArrayRef<SUnit*> elements() { return Queue; }
  556   iterator find(SUnit *SU) { return llvm::find(Queue, SU); }
  558   void push(SUnit *SU) {
  715   unsigned getUnscheduledLatency(SUnit *SU) const {
  746   unsigned getLatencyStallCycles(SUnit *SU);
  754   bool checkHazard(SUnit *SU);
  756   unsigned findMaxLatency(ArrayRef<SUnit*> ReadySUs);
  760   void releaseNode(SUnit *SU, unsigned ReadyCycle);
  768   void bumpNode(SUnit *SU);
  772   void removeReady(SUnit *SU);
  777   SUnit *pickOnlyChoice();
  841     SUnit *SU;
  923 unsigned getWeakLeft(const SUnit *SU, bool isTop);
  924 int biasPhysReg(const SUnit *SU, bool isTop);
  950   SUnit *pickNode(bool &IsTopNode) override;
  952   void schedNode(SUnit *SU, bool IsTopNode) override;
  954   void releaseTopNode(SUnit *SU) override {
  962   void releaseBottomNode(SUnit *SU) override {
  988   void initCandidate(SchedCandidate &Cand, SUnit *SU, bool AtTop,
  995   SUnit *pickNodeBidirectional(bool &IsTopNode);
 1002   void reschedulePhysReg(SUnit *SU, bool isTop);
 1014   SmallVector<SUnit*, 8> BotRoots;
 1035   SUnit *pickNode(bool &IsTopNode) override;
 1041   void schedNode(SUnit *SU, bool IsTopNode) override;
 1043   void releaseTopNode(SUnit *SU) override {
 1050   void releaseBottomNode(SUnit *SU) override {
include/llvm/CodeGen/ResourcePriorityQueue.h
   34     bool operator()(const SUnit* LHS, const SUnit* RHS) const;
   34     bool operator()(const SUnit* LHS, const SUnit* RHS) const;
   39     std::vector<SUnit> *SUnits;
   48     std::vector<SUnit*> Queue;
   70     std::vector<SUnit*> Packet;
   81     void initNodes(std::vector<SUnit> &sunits) override;
   83     void addNode(const SUnit *SU) override {
   87     void updateNode(const SUnit *SU) override {}
  105     int SUSchedulingCost (SUnit *SU);
  109     void initNumRegDefsLeft(SUnit *SU);
  110     void updateNumRegDefsLeft(SUnit *SU);
  111     int regPressureDelta(SUnit *SU, bool RawPressure = false);
  112     int rawRegPressureDelta (SUnit *SU, unsigned RCId);
  116     void push(SUnit *U) override;
  118     SUnit *pop() override;
  120     void remove(SUnit *SU) override;
  123     void scheduledNode(SUnit *SU) override;
  124     bool isResourceAvailable(SUnit *SU);
  125     void reserveResources(SUnit *SU);
  128     void adjustPriorityOfUnscheduledPreds(SUnit *SU);
  129     SUnit *getSingleUnscheduledPred(SUnit *SU);
  129     SUnit *getSingleUnscheduledPred(SUnit *SU);
  130     unsigned numberRCValPredInSU (SUnit *SU, unsigned RCId);
  131     unsigned numberRCValSuccInSU (SUnit *SU, unsigned RCId);
include/llvm/CodeGen/ScheduleDAG.h
   80     PointerIntPair<SUnit *, 2, Kind> Dep;
  104     SDep(SUnit *S, Kind kind, unsigned Reg)
  123     SDep(SUnit *S, OrderKind kind)
  152     SUnit *getSUnit() const;
  155     void setSUnit(SUnit *SU);
  250     SUnit *OrigNode = nullptr; ///< If not this, the node from which this node
  384     bool addPredBarrier(SUnit *SU) {
  431     bool isPred(const SUnit *N) const {
  439     bool isSucc(const SUnit *N) const {
  480   inline SUnit *SDep::getSUnit() const { return Dep.getPointer(); }
  483   inline void SDep::setSUnit(SUnit *SU) { Dep.setPointer(SU); }
  509     virtual void initNodes(std::vector<SUnit> &SUnits) = 0;
  510     virtual void addNode(const SUnit *SU) = 0;
  511     virtual void updateNode(const SUnit *SU) = 0;
  520     virtual bool isReady(SUnit *) const {
  525     virtual void push(SUnit *U) = 0;
  527     void push_all(const std::vector<SUnit *> &Nodes) {
  528       for (std::vector<SUnit *>::const_iterator I = Nodes.begin(),
  533     virtual SUnit *pop() = 0;
  535     virtual void remove(SUnit *SU) = 0;
  542     virtual void scheduledNode(SUnit *) {}
  544     virtual void unscheduledNode(SUnit *) {}
  562     std::vector<SUnit> SUnits;          ///< The scheduling units.
  563     SUnit EntrySU;                      ///< Special node for the region entry.
  564     SUnit ExitSU;                       ///< Special node for the region exit.
  581     const MCInstrDesc *getInstrDesc(const SUnit *SU) const {
  590     virtual void dumpNode(const SUnit &SU) const = 0;
  592     void dumpNodeName(const SUnit &SU) const;
  595     virtual std::string getGraphNodeLabel(const SUnit *SU) const = 0;
  610     void dumpNodeAll(const SUnit &SU) const;
  618                                              SUnit, ptrdiff_t> {
  619     SUnit *Node;
  622     SUnitIterator(SUnit *N, unsigned Op) : Node(N), Operand(Op) {}
  643     static SUnitIterator begin(SUnit *N) { return SUnitIterator(N, 0); }
  644     static SUnitIterator end  (SUnit *N) {
  649     const SUnit *getNode() const { return Node; }
  664     typedef SUnit *NodeRef;
  666     static NodeRef getEntryNode(SUnit *N) { return N; }
  675   template <> struct GraphTraits<ScheduleDAG*> : public GraphTraits<SUnit*> {
  676     typedef pointer_iterator<std::vector<SUnit>::iterator> nodes_iterator;
  691     std::vector<SUnit> &SUnits;
  692     SUnit *ExitSU;
  698     SmallVector<std::pair<SUnit *, SUnit *>, 16> Updates;
  698     SmallVector<std::pair<SUnit *, SUnit *>, 16> Updates;
  710     void DFS(const SUnit *SU, int UpperBound, bool& HasLoop);
  725     ScheduleDAGTopologicalSort(std::vector<SUnit> &SUnits, SUnit *ExitSU);
  725     ScheduleDAGTopologicalSort(std::vector<SUnit> &SUnits, SUnit *ExitSU);
  735     std::vector<int> GetSubGraph(const SUnit &StartSU, const SUnit &TargetSU,
  735     std::vector<int> GetSubGraph(const SUnit &StartSU, const SUnit &TargetSU,
  739     bool IsReachable(const SUnit *SU, const SUnit *TargetSU);
  739     bool IsReachable(const SUnit *SU, const SUnit *TargetSU);
  742     bool WillCreateCycle(SUnit *TargetSU, SUnit *SU);
  742     bool WillCreateCycle(SUnit *TargetSU, SUnit *SU);
  746     void AddPred(SUnit *Y, SUnit *X);
  746     void AddPred(SUnit *Y, SUnit *X);
  750     void AddPredQueued(SUnit *Y, SUnit *X);
  750     void AddPredQueued(SUnit *Y, SUnit *X);
  755     void RemovePred(SUnit *M, SUnit *N);
  755     void RemovePred(SUnit *M, SUnit *N);
include/llvm/CodeGen/ScheduleDAGInstrs.h
   55     SUnit *SU;
   57     VReg2SUnit(unsigned VReg, LaneBitmask LaneMask, SUnit *SU)
   70                       unsigned OperandIndex, SUnit *SU)
   77     SUnit *SU;
   81     PhysRegSUOper(SUnit *su, int op, unsigned R): SU(su), OpIdx(op), Reg(R) {}
  158     DenseMap<MachineInstr*, SUnit*> MISUnitMap;
  182     SUnit *BarrierChain = nullptr;
  190     using SUList = std::list<SUnit *>;
  206     void addChainDependency(SUnit *SUa, SUnit *SUb,
  206     void addChainDependency(SUnit *SUa, SUnit *SUb,
  210     void addChainDependencies(SUnit *SU, SUList &SUs, unsigned Latency) {
  211       for (SUnit *Entry : SUs)
  216     void addChainDependencies(SUnit *SU, Value2SUsMap &Val2SUsMap);
  219     void addChainDependencies(SUnit *SU, Value2SUsMap &Val2SUsMap,
  265     const MCSchedClassDesc *getSchedClass(SUnit *SU) const {
  278     SUnit *newSUnit(MachineInstr *MI);
  281     SUnit *getSUnit(MachineInstr *MI) const;
  335     void dumpNode(const SUnit &SU) const override;
  339     std::string getGraphNodeLabel(const SUnit *SU) const override;
  349     bool canAddEdge(SUnit *SuccSU, SUnit *PredSU);
  349     bool canAddEdge(SUnit *SuccSU, SUnit *PredSU);
  356     bool addEdge(SUnit *SuccSU, const SDep &PredDep);
  360     void addPhysRegDataDeps(SUnit *SU, unsigned OperIdx);
  361     void addPhysRegDeps(SUnit *SU, unsigned OperIdx);
  362     void addVRegDefDeps(SUnit *SU, unsigned OperIdx);
  363     void addVRegUseDeps(SUnit *SU, unsigned OperIdx);
  384   inline SUnit *ScheduleDAGInstrs::newSUnit(MachineInstr *MI) {
  386     const SUnit *Addr = SUnits.empty() ? nullptr : &SUnits[0];
  395   inline SUnit *ScheduleDAGInstrs::getSUnit(MachineInstr *MI) const {
  396     DenseMap<MachineInstr*, SUnit*>::const_iterator I = MISUnitMap.find(MI);
include/llvm/CodeGen/ScheduleDFS.h
  141   void compute(ArrayRef<SUnit> SUnits);
  145   unsigned getNumInstrs(const SUnit *SU) const {
  158   ILPValue getILP(const SUnit *SU) const {
  169   unsigned getSubtreeID(const SUnit *SU) const {
include/llvm/CodeGen/ScheduleHazardRecognizer.h
   60   virtual HazardType getHazardType(SUnit *m, int Stalls = 0) {
   71   virtual void EmitInstruction(SUnit *) {}
   82   virtual unsigned PreEmitNoops(SUnit *) {
   95   virtual bool ShouldPreferAnother(SUnit *) {
include/llvm/CodeGen/ScoreboardHazardRecognizer.h
  118   HazardType getHazardType(SUnit *SU, int Stalls) override;
  120   void EmitInstruction(SUnit *SU) override;
include/llvm/CodeGen/TargetSubtargetInfo.h
  225   virtual void adjustSchedDependency(SUnit *def, SUnit *use, SDep &dep) const {}
  225   virtual void adjustSchedDependency(SUnit *def, SUnit *use, SDep &dep) const {}
include/llvm/Support/PointerLikeTypeTraits.h
   56   static inline void *getAsVoidPointer(T *P) { return P; }
   57   static inline T *getFromVoidPointer(void *P) { return static_cast<T *>(P); }
   59   enum { NumLowBitsAvailable = detail::ConstantLog2<alignof(T)>::value };
   91   typedef PointerLikeTypeTraits<T *> NonConst;
   93   static inline const void *getAsVoidPointer(const T *P) {
   96   static inline const T *getFromVoidPointer(const void *P) {
lib/CodeGen/AggressiveAntiDepBreaker.cpp
  265 static void AntiDepEdges(const SUnit *SU, std::vector<const SDep *> &Edges) {
  267   for (SUnit::const_pred_iterator P = SU->Preds.begin(), PE = SU->Preds.end();
  278 static const SUnit *CriticalPathStep(const SUnit *SU) {
  278 static const SUnit *CriticalPathStep(const SUnit *SU) {
  283     for (SUnit::const_pred_iterator P = SU->Preds.begin(), PE = SU->Preds.end();
  285       const SUnit *PredSU = P->getSUnit();
  754                               const std::vector<SUnit> &SUnits,
  772   std::map<MachineInstr *, const SUnit *> MISUnitMap;
  774     const SUnit *SU = &SUnits[i];
  782   const SUnit *CriticalPathSU = nullptr;
  786       const SUnit *SU = &SUnits[i];
  833     const SUnit *PathSU = MISUnitMap[&MI];
  852         SUnit *NextSU = Edge->getSUnit();
  894           for (SUnit::const_pred_iterator P = PathSU->Preds.begin(),
  903           for (SUnit::const_pred_iterator P = PathSU->Preds.begin(),
  980               const SUnit *SU = MISUnitMap[Q.second.Operand->getParent()];
lib/CodeGen/AggressiveAntiDepBreaker.h
  142     unsigned BreakAntiDependencies(const std::vector<SUnit> &SUnits,
lib/CodeGen/AntiDepBreaker.h
   43   virtual unsigned BreakAntiDependencies(const std::vector<SUnit> &SUnits,
lib/CodeGen/CriticalAntiDepBreaker.cpp
  145 static const SDep *CriticalPathStep(const SUnit *SU) {
  149   for (SUnit::const_pred_iterator P = SU->Preds.begin(), PE = SU->Preds.end();
  151     const SUnit *PredSU = P->getSUnit();
  437 BreakAntiDependencies(const std::vector<SUnit> &SUnits,
  450   DenseMap<MachineInstr *, const SUnit *> MISUnitMap;
  453   const SUnit *Max = nullptr;
  455     const SUnit *SU = &SUnits[i];
  477   const SUnit *CriticalPathSU = Max;
  556         const SUnit *NextSU = Edge->getSUnit();
  578             for (SUnit::const_pred_iterator P = CriticalPathSU->Preds.begin(),
  661           const SUnit *SU = MISUnitMap[Q->second->getParent()];
lib/CodeGen/CriticalAntiDepBreaker.h
   82     unsigned BreakAntiDependencies(const std::vector<SUnit> &SUnits,
lib/CodeGen/DFAPacketizer.cpp
  246   for (SUnit &SU : VLIWScheduler->SUnits)
  273     SUnit *SUI = MIToSUnit[&MI];
  289         SUnit *SUJ = MIToSUnit[MJ];
lib/CodeGen/LatencyPriorityQueue.cpp
   23 bool latency_sort::operator()(const SUnit *LHS, const SUnit *RHS) const {
   23 bool latency_sort::operator()(const SUnit *LHS, const SUnit *RHS) const {
   56 SUnit *LatencyPriorityQueue::getSingleUnscheduledPred(SUnit *SU) {
   56 SUnit *LatencyPriorityQueue::getSingleUnscheduledPred(SUnit *SU) {
   57   SUnit *OnlyAvailablePred = nullptr;
   58   for (SUnit::const_pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
   60     SUnit &Pred = *I->getSUnit();
   73 void LatencyPriorityQueue::push(SUnit *SU) {
   77   for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
   92 void LatencyPriorityQueue::scheduledNode(SUnit *SU) {
   93   for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
  105 void LatencyPriorityQueue::AdjustPriorityOfUnscheduledPreds(SUnit *SU) {
  108   SUnit *OnlyAvailablePred = getSingleUnscheduledPred(SU);
  120 SUnit *LatencyPriorityQueue::pop() {
  122   std::vector<SUnit *>::iterator Best = Queue.begin();
  123   for (std::vector<SUnit *>::iterator I = std::next(Queue.begin()),
  127   SUnit *V = *Best;
  134 void LatencyPriorityQueue::remove(SUnit *SU) {
  136   std::vector<SUnit *>::iterator I = find(Queue, SU);
  147   for (const SUnit *SU : Queue) {
lib/CodeGen/MachinePipeliner.cpp
  535     for (SUnit *SU : Schedule.getInstructions(Cycle)) {
  605 static bool isSuccOrder(SUnit *SUa, SUnit *SUb) {
  605 static bool isSuccOrder(SUnit *SUa, SUnit *SUb) {
  606   SmallPtrSet<SUnit *, 8> Visited;
  607   SmallVector<SUnit *, 8> Worklist;
  610     const SUnit *SU = Worklist.pop_back_val();
  612       SUnit *SuccSU = SI.getSUnit();
  661   MapVector<const Value *, SmallVector<SUnit *, 4>> PendingLoads;
  664   for (auto &SU : SUnits) {
  674         SmallVector<SUnit *, 4> &SUs = PendingLoads[V];
  683         MapVector<const Value *, SmallVector<SUnit *, 4>>::iterator I =
  760   for (SUnit &I : SUnits) {
  780           SUnit *SU = getSUnit(UseMI);
  800         SUnit *SU = getSUnit(DefMI);
  843   for (SUnit &I : SUnits) {
  855     SUnit *DefSU = getSUnit(DefMI);
  862     SUnit *LastSU = getSUnit(LastMI);
  871     for (SUnit::pred_iterator P = I.Preds.begin(), E = I.Preds.end(); P != E;
 1113 static void swapAntiDependences(std::vector<SUnit> &SUnits) {
 1114   SmallVector<std::pair<SUnit *, SDep>, 8> DepsAdded;
 1116     SUnit *SU = &SUnits[i];
 1117     for (SUnit::pred_iterator IP = SU->Preds.begin(), EP = SU->Preds.end();
 1124   for (SmallVector<std::pair<SUnit *, SDep>, 8>::iterator I = DepsAdded.begin(),
 1128     SUnit *SU = I->first;
 1130     SUnit *TargetSU = D.getSUnit();
 1199   SUnit *SV = &SUnits[V];
 1239   SmallPtrSet<SUnit *, 4> &BU = B[U];
 1241     SmallPtrSet<SUnit *, 4>::iterator SI = BU.begin();
 1243     SUnit *W = *SI;
 1288   for (SUnit &SU : DAG->SUnits) {
 1294     SmallVector<SUnit *, 4> PHISUs;
 1296     SmallVector<SUnit *, 4> SrcSUs;
 1299       SUnit *TmpSU = Dep.getSUnit();
 1316     SmallVector<SUnit *, 8> UseSUs;
 1322         SUnit *TmpSU = Dep.getSUnit();
 1382     SUnit *SU = &SUnits[*I];
 1383     for (SUnit::const_pred_iterator IP = SU->Preds.begin(),
 1386       SUnit *pred = IP->getSUnit();
 1406     SUnit *SU = &SUnits[*I];
 1407     for (SUnit::const_succ_iterator IS = SU->Succs.begin(),
 1410       SUnit *succ = IS->getSUnit();
 1445 static bool pred_L(SetVector<SUnit *> &NodeOrder,
 1446                    SmallSetVector<SUnit *, 8> &Preds,
 1449   for (SetVector<SUnit *>::iterator I = NodeOrder.begin(), E = NodeOrder.end();
 1451     for (SUnit::pred_iterator PI = (*I)->Preds.begin(), PE = (*I)->Preds.end();
 1461     for (SUnit::const_succ_iterator IS = (*I)->Succs.begin(),
 1478 static bool succ_L(SetVector<SUnit *> &NodeOrder,
 1479                    SmallSetVector<SUnit *, 8> &Succs,
 1482   for (SetVector<SUnit *>::iterator I = NodeOrder.begin(), E = NodeOrder.end();
 1484     for (SUnit::succ_iterator SI = (*I)->Succs.begin(), SE = (*I)->Succs.end();
 1493     for (SUnit::const_pred_iterator PI = (*I)->Preds.begin(),
 1509 static bool computePath(SUnit *Cur, SetVector<SUnit *> &Path,
 1509 static bool computePath(SUnit *Cur, SetVector<SUnit *> &Path,
 1510                         SetVector<SUnit *> &DestNodes,
 1511                         SetVector<SUnit *> &Exclude,
 1512                         SmallPtrSet<SUnit *, 8> &Visited) {
 1550   for (SUnit *SU : NS) {
 1564   for (SUnit *SU : NS)
 1595     std::vector<SUnit *> SUnits(NS.begin(), NS.end());
 1632     SmallSetVector<SUnit *, 8> S1;
 1639       SmallSetVector<SUnit *, 8> S2;
 1675   SetVector<SUnit *> NodesAdded;
 1676   SmallPtrSet<SUnit *, 8> Visited;
 1680     SmallSetVector<SUnit *, 8> N;
 1683       SetVector<SUnit *> Path;
 1684       for (SUnit *NI : N) {
 1694       SetVector<SUnit *> Path;
 1695       for (SUnit *NI : N) {
 1708   SmallSetVector<SUnit *, 8> N;
 1710     for (SUnit *I : N)
 1719     for (SUnit *I : N)
 1727     SUnit *SU = &SUnits[i];
 1738 void SwingSchedulerDAG::addConnectedNodes(SUnit *SU, NodeSet &NewSet,
 1739                                           SetVector<SUnit *> &NodesAdded) {
 1743     SUnit *Successor = SI.getSUnit();
 1748     SUnit *Predecessor = PI.getSUnit();
 1756 static bool isIntersect(SmallSetVector<SUnit *, 8> &Set1, const NodeSet &Set2,
 1757                         SmallSetVector<SUnit *, 8> &Result) {
 1760     SUnit *SU = Set1[i];
 1810   SmallSetVector<SUnit *, 8> R;
 1816     SmallSetVector<SUnit *, 8> N;
 1838       SUnit *maxASAP = nullptr;
 1839       for (SUnit *SU : Nodes) {
 1855           SUnit *maxHeight = nullptr;
 1856           for (SUnit *I : R) {
 1893         SmallSetVector<SUnit *, 8> N;
 1901           SUnit *maxDepth = nullptr;
 1902           for (SUnit *I : R) {
 1942         SmallSetVector<SUnit *, 8> N;
 1975     SetVector<SUnit *>::iterator NI = NodeOrder.begin();
 1976     SetVector<SUnit *>::iterator NE = NodeOrder.end();
 1978       SUnit *SU = *NI;
 2151   SUnit *SU = getSUnit(MI);
 2152   DenseMap<SUnit *, std::pair<unsigned, int64_t>>::iterator It =
 2204 bool SwingSchedulerDAG::isLoopCarriedDep(SUnit *Source, const SDep &Dep,
 2284 bool SMSchedule::insert(SUnit *SU, int StartCycle, int EndCycle, int II) {
 2303       std::deque<SUnit *> &cycleInstrs = ScheduledInstrs[checkCycle];
 2305       for (std::deque<SUnit *>::iterator I = cycleInstrs.begin(),
 2340   SmallPtrSet<SUnit *, 8> Visited;
 2346     SUnit *PrevSU = Cur.getSUnit();
 2349     std::map<SUnit *, int>::const_iterator it = InstrToCycle.find(PrevSU);
 2363   SmallPtrSet<SUnit *, 8> Visited;
 2369     SUnit *SuccSU = Cur.getSUnit();
 2372     std::map<SUnit *, int>::const_iterator it = InstrToCycle.find(SuccSU);
 2387 static SUnit *multipleIterations(SUnit *SU, SwingSchedulerDAG *DAG) {
 2387 static SUnit *multipleIterations(SUnit *SU, SwingSchedulerDAG *DAG) {
 2398 void SMSchedule::computeStart(SUnit *SU, int *MaxEarlyStart, int *MinLateStart,
 2407     for (SUnit *I : getInstructions(cycle)) {
 2429         SUnit *BE = multipleIterations(I, DAG);
 2459 void SMSchedule::orderDependence(SwingSchedulerDAG *SSD, SUnit *SU,
 2460                                  std::deque<SUnit *> &Insts) {
 2470   for (std::deque<SUnit *>::iterator I = Insts.begin(), E = Insts.end(); I != E;
 2565     SUnit *UseSU = Insts.at(MoveUse);
 2566     SUnit *DefSU = Insts.at(MoveDef);
 2592   SUnit *DefSU = SSD->getSUnit(&Phi);
 2599   SUnit *UseSU = SSD->getSUnit(MRI.getVRegDef(LoopVal));
 2644     SUnit &SU = SSD->SUnits[i];
 2671   typedef std::pair<SUnit *, unsigned> UnitIndex;
 2692     SUnit *SU = NodeOrder[i];
 2698     SUnit *Succ;
 2699     SUnit *Pred;
 2704       SUnit *PredSU = PredEdge.getSUnit();
 2715       SUnit *SuccSU = SuccEdge.getSUnit();
 2760 void SwingSchedulerDAG::fixupRegisterOverlaps(std::deque<SUnit *> &Instrs) {
 2763   for (SUnit *SU : Instrs) {
 2772         DenseMap<SUnit *, std::pair<unsigned, int64_t>>::iterator It =
 2814       std::deque<SUnit *> &cycleInstrs =
 2816       for (std::deque<SUnit *>::reverse_iterator I = cycleInstrs.rbegin(),
 2831     SUnit *SU = &SSD->SUnits[i];
 2838     std::deque<SUnit *> &cycleInstrs = ScheduledInstrs[Cycle];
 2839     std::deque<SUnit *> newOrderPhi;
 2841       SUnit *SU = cycleInstrs[i];
 2845     std::deque<SUnit *> newOrderI;
 2847       SUnit *SU = cycleInstrs[i];
 2875     for (SUnit *CI : cycleInstrs->second) {
lib/CodeGen/MachineScheduler.cpp
  598   for (const SUnit *SU : Queue)
  617 void ScheduleDAGMI::releaseSucc(SUnit *SU, SDep *SuccEdge) {
  618   SUnit *SuccSU = SuccEdge->getSUnit();
  645 void ScheduleDAGMI::releaseSuccessors(SUnit *SU) {
  654 void ScheduleDAGMI::releasePred(SUnit *SU, SDep *PredEdge) {
  655   SUnit *PredSU = PredEdge->getSUnit();
  682 void ScheduleDAGMI::releasePredecessors(SUnit *SU) {
  755   SmallVector<SUnit*, 8> TopRoots, BotRoots;
  772     SUnit *SU = SchedImpl->pickNode(IsTopNode);
  826 findRootsAndBiasEdges(SmallVectorImpl<SUnit*> &TopRoots,
  827                       SmallVectorImpl<SUnit*> &BotRoots) {
  828   for (SUnit &SU : SUnits) {
  845 void ScheduleDAGMI::initQueues(ArrayRef<SUnit*> TopRoots,
  846                                ArrayRef<SUnit*> BotRoots) {
  854   for (SUnit *SU : TopRoots)
  859   for (SmallVectorImpl<SUnit*>::const_reverse_iterator
  875 void ScheduleDAGMI::updateQueues(SUnit *SU, bool IsTopNode) {
  911     if (SUnit *SU = getSUnit(&(*MI)))
  928 void ScheduleDAGMILive::collectVRegUses(SUnit &SU) {
  995   for (SUnit &SU : SUnits)
 1067 updateScheduledPressure(const SUnit *SU,
 1112         SUnit &SU = *V2SU.SU;
 1144         SUnit *SU = V2SU.SU;
 1167   for (const SUnit &SU : SUnits) {
 1203   SmallVector<SUnit*, 8> TopRoots, BotRoots;
 1220     SUnit *SU = SchedImpl->pickNode(IsTopNode);
 1332     const SUnit *DefSU = getSUnit(DefMI);
 1341       SUnit *SU = V2SU.SU;
 1376 void ScheduleDAGMILive::initQueues(ArrayRef<SUnit*> TopRoots,
 1377                                    ArrayRef<SUnit*> BotRoots) {
 1386 void ScheduleDAGMILive::scheduleMI(SUnit *SU, bool IsTopNode) {
 1470     SUnit *SU;
 1474     MemOpInfo(SUnit *su, const MachineOperand *Op, int64_t ofs)
 1520   void clusterNeighboringMemOps(ArrayRef<SUnit *> MemOps, ScheduleDAGInstrs *DAG);
 1557     ArrayRef<SUnit *> MemOps, ScheduleDAGInstrs *DAG) {
 1559   for (SUnit *SU : MemOps) {
 1571     SUnit *SUa = MemOpRecords[Idx].SU;
 1572     SUnit *SUb = MemOpRecords[Idx+1].SU;
 1601   SmallVector<SmallVector<SUnit*,4>, 32> StoreChainDependents;
 1602   for (SUnit &SU : DAG->SUnits) {
 1652   void constrainLocalCopy(SUnit *CopySU, ScheduleDAGMILive *DAG);
 1686 void CopyConstrain::constrainLocalCopy(SUnit *CopySU, ScheduleDAGMILive *DAG) {
 1760   SUnit *GlobalSU = DAG->getSUnit(GlobalDef);
 1766   SmallVector<SUnit*,8> LocalUses;
 1769   SUnit *LastLocalSU = DAG->getSUnit(LastLocalDef);
 1781   SmallVector<SUnit*,8> GlobalUses;
 1784   SUnit *FirstLocalSU = DAG->getSUnit(FirstLocalDef);
 1796   for (SmallVectorImpl<SUnit*>::const_iterator
 1802   for (SmallVectorImpl<SUnit*>::const_iterator
 1823   for (SUnit &SU : DAG->SUnits) {
 1892   for (SUnit &SU : DAG->SUnits) {
 1934 unsigned SchedBoundary::getLatencyStallCycles(SUnit *SU) {
 1994 bool SchedBoundary::checkHazard(SUnit *SU) {
 2041 findMaxLatency(ArrayRef<SUnit*> ReadySUs) {
 2042   SUnit *LateSU = nullptr;
 2044   for (SUnit *SU : ReadySUs) {
 2088 void SchedBoundary::releaseNode(SUnit *SU, unsigned ReadyCycle) {
 2198 void SchedBoundary::bumpNode(SUnit *SU) {
 2351     SUnit *SU = *(Pending.begin()+i);
 2374 void SchedBoundary::removeReady(SUnit *SU) {
 2386 SUnit *SchedBoundary::pickOnlyChoice() {
 2845   for (const SUnit *SU : Bot.Available) {
 2900 unsigned getWeakLeft(const SUnit *SU, bool isTop) {
 2911 int biasPhysReg(const SUnit *SU, bool isTop) {
 2948 void GenericScheduler::initCandidate(SchedCandidate &Cand, SUnit *SU,
 3049   const SUnit *CandNextClusterSU =
 3051   const SUnit *TryCandNextClusterSU =
 3111   for (SUnit *SU : Q) {
 3129 SUnit *GenericScheduler::pickNodeBidirectional(bool &IsTopNode) {
 3132   if (SUnit *SU = Bot.pickOnlyChoice()) {
 3137   if (SUnit *SU = Top.pickOnlyChoice()) {
 3208 SUnit *GenericScheduler::pickNode(bool &IsTopNode) {
 3214   SUnit *SU;
 3253 void GenericScheduler::reschedulePhysReg(SUnit *SU, bool isTop) {
 3265     SUnit *DepSU = Dep.getSUnit();
 3284 void GenericScheduler::schedNode(SUnit *SU, bool IsTopNode) {
 3347   for (const SUnit *SU : BotRoots) {
 3401   for (SUnit *SU : Q) {
 3415 SUnit *PostGenericScheduler::pickNode(bool &IsTopNode) {
 3420   SUnit *SU;
 3448 void PostGenericScheduler::schedNode(SUnit *SU, bool IsTopNode) {
 3475   bool operator()(const SUnit *A, const SUnit *B) const {
 3475   bool operator()(const SUnit *A, const SUnit *B) const {
 3502   std::vector<SUnit*> ReadyQ;
 3525   SUnit *pickNode(bool &IsTopNode) override {
 3528     SUnit *SU = ReadyQ.back();
 3550   void schedNode(SUnit *SU, bool IsTopNode) override {
 3554   void releaseTopNode(SUnit *) override { /*only called for top roots*/ }
 3556   void releaseBottomNode(SUnit *SU) override {
 3587   bool operator()(SUnit *A, SUnit *B) const {
 3587   bool operator()(SUnit *A, SUnit *B) const {
 3603   PriorityQueue<SUnit*, std::vector<SUnit*>, SUnitOrder<false>>
 3603   PriorityQueue<SUnit*, std::vector<SUnit*>, SUnitOrder<false>>
 3607   PriorityQueue<SUnit*, std::vector<SUnit*>, SUnitOrder<true>>
 3607   PriorityQueue<SUnit*, std::vector<SUnit*>, SUnitOrder<true>>
 3622   SUnit *pickNode(bool &IsTopNode) override {
 3623     SUnit *SU;
 3644   void schedNode(SUnit *SU, bool IsTopNode) override {}
 3646   void releaseTopNode(SUnit *SU) override {
 3649   void releaseBottomNode(SUnit *SU) override {
 3692   static bool isNodeHidden(const SUnit *Node) {
 3701   static std::string getEdgeAttributes(const SUnit *Node,
 3711   static std::string getNodeLabel(const SUnit *SU, const ScheduleDAG *G) {
 3723   static std::string getNodeDescription(const SUnit *SU, const ScheduleDAG *G) {
 3727   static std::string getNodeAttributes(const SUnit *N, const ScheduleDAG *G) {
lib/CodeGen/MacroFusion.cpp
   39 static bool fuseInstructionPair(ScheduleDAGInstrs &DAG, SUnit &FirstSU,
   40                                 SUnit &SecondSU) {
   78       SUnit *SU = SI.getSUnit();
   91       SUnit *SU = SI.getSUnit();
  102       for (SUnit &SU : DAG.SUnits) {
  120   bool scheduleAdjacentImpl(ScheduleDAGInstrs &DAG, SUnit &AnchorSU);
  135     for (SUnit &ISU : DAG->SUnits)
  145 bool MacroFusion::scheduleAdjacentImpl(ScheduleDAGInstrs &DAG, SUnit &AnchorSU) {
  160     SUnit &DepSU = *Dep.getSUnit();
lib/CodeGen/PostRASchedulerList.cpp
  122     std::vector<SUnit*> PendingQueue;
  134     std::vector<SUnit*> Sequence;
  190     void ReleaseSucc(SUnit *SU, SDep *SuccEdge);
  191     void ReleaseSuccessors(SUnit *SU);
  192     void ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle);
  257     if (SUnit *SU = Sequence[i])
  453 void SchedulePostRATDList::ReleaseSucc(SUnit *SU, SDep *SuccEdge) {
  454   SUnit *SuccSU = SuccEdge->getSUnit();
  488 void SchedulePostRATDList::ReleaseSuccessors(SUnit *SU) {
  489   for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
  498 void SchedulePostRATDList::ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle) {
  549   std::vector<SUnit*> NotReady;
  569     SUnit *FoundSUnit = nullptr, *NotPreferredSUnit = nullptr;
  572       SUnit *CurSUnit = AvailableQueue.pop();
  680     if (SUnit *SU = Sequence[i])
lib/CodeGen/ScheduleDAG.cpp
  118         SUnit *PredSU = PredDep.getSUnit();
  136   SUnit *N = D.getSUnit();
  183   SUnit *N = D.getSUnit();
  219   SmallVector<SUnit*, 8> WorkList;
  222     SUnit *SU = WorkList.pop_back_val();
  225       SUnit *SuccSU = SuccDep.getSUnit();
  234   SmallVector<SUnit*, 8> WorkList;
  237     SUnit *SU = WorkList.pop_back_val();
  240       SUnit *PredSU = PredDep.getSUnit();
  265   SmallVector<SUnit*, 8> WorkList;
  268     SUnit *Cur = WorkList.back();
  273       SUnit *PredSU = PredDep.getSUnit();
  296   SmallVector<SUnit*, 8> WorkList;
  299     SUnit *Cur = WorkList.back();
  304       SUnit *SuccSU = SuccDep.getSUnit();
  329   SUnit::pred_iterator BestI = Preds.begin();
  331   for (SUnit::pred_iterator I = std::next(BestI), E = Preds.end(); I != E;
  354 LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeName(const SUnit &SU) const {
  363 LLVM_DUMP_METHOD void ScheduleDAG::dumpNodeAll(const SUnit &SU) const {
  393   for (const SUnit &SUnit : SUnits) {
  471   std::vector<SUnit*> WorkList;
  480   for (SUnit &SU : SUnits) {
  496     SUnit *SU = WorkList.back();
  501       SUnit *SU = PredDep.getSUnit();
  514   for (SUnit &SU : SUnits)  {
  536 void ScheduleDAGTopologicalSort::AddPredQueued(SUnit *Y, SUnit *X) {
  536 void ScheduleDAGTopologicalSort::AddPredQueued(SUnit *Y, SUnit *X) {
  548 void ScheduleDAGTopologicalSort::AddPred(SUnit *Y, SUnit *X) {
  548 void ScheduleDAGTopologicalSort::AddPred(SUnit *Y, SUnit *X) {
  566 void ScheduleDAGTopologicalSort::RemovePred(SUnit *M, SUnit *N) {
  566 void ScheduleDAGTopologicalSort::RemovePred(SUnit *M, SUnit *N) {
  570 void ScheduleDAGTopologicalSort::DFS(const SUnit *SU, int UpperBound,
  572   std::vector<const SUnit*> WorkList;
  598 std::vector<int> ScheduleDAGTopologicalSort::GetSubGraph(const SUnit &StartSU,
  599                                                          const SUnit &TargetSU,
  601   std::vector<const SUnit*> WorkList;
  620     const SUnit *SU = WorkList.back();
  623       const SUnit *Succ = SU->Succs[I].getSUnit();
  654     const SUnit *SU = WorkList.back();
  657       const SUnit *Pred = SU->Preds[I].getSUnit();
  704 bool ScheduleDAGTopologicalSort::WillCreateCycle(SUnit *TargetSU, SUnit *SU) {
  704 bool ScheduleDAGTopologicalSort::WillCreateCycle(SUnit *TargetSU, SUnit *SU) {
  716 bool ScheduleDAGTopologicalSort::IsReachable(const SUnit *SU,
  717                                              const SUnit *TargetSU) {
  740 ScheduleDAGTopologicalSort(std::vector<SUnit> &sunits, SUnit *exitsu)
  740 ScheduleDAGTopologicalSort(std::vector<SUnit> &sunits, SUnit *exitsu)
lib/CodeGen/ScheduleDAGInstrs.cpp
  101   for (const SUnit *su : L) {
  229 void ScheduleDAGInstrs::addPhysRegDataDeps(SUnit *SU, unsigned OperIdx) {
  246       SUnit *UseSU = I->SU;
  284 void ScheduleDAGInstrs::addPhysRegDeps(SUnit *SU, unsigned OperIdx) {
  303       SUnit *DefSU = I->SU;
  388 void ScheduleDAGInstrs::addVRegDefDeps(SUnit *SU, unsigned OperIdx) {
  437         SUnit *UseSU = I->SU;
  474     SUnit *DefSU = V2SU.SU;
  508 void ScheduleDAGInstrs::addVRegUseDeps(SUnit *SU, unsigned OperIdx) {
  539 void ScheduleDAGInstrs::addChainDependency (SUnit *SUa, SUnit *SUb,
  539 void ScheduleDAGInstrs::addChainDependency (SUnit *SUa, SUnit *SUb,
  569     SUnit *SU = newSUnit(&MI);
  623   void inline insert(SUnit *SU, ValueType V) {
  661 void ScheduleDAGInstrs::addChainDependencies(SUnit *SU,
  668 void ScheduleDAGInstrs::addChainDependencies(SUnit *SU,
  682     for (auto *SU : sus)
  808     SUnit *SU = MISUnitMap[&MI];
 1049     for (auto *SU : I.second)
 1052     for (auto *SU : I.second)
 1060   SUnit *newBarrierChain = &SUnits[*(NodeNums.end() - N)];
 1154 void ScheduleDAGInstrs::dumpNode(const SUnit &SU) const {
 1166   for (const SUnit &SU : SUnits)
 1173 std::string ScheduleDAGInstrs::getGraphNodeLabel(const SUnit *SU) const {
 1191 bool ScheduleDAGInstrs::canAddEdge(SUnit *SuccSU, SUnit *PredSU) {
 1191 bool ScheduleDAGInstrs::canAddEdge(SUnit *SuccSU, SUnit *PredSU) {
 1195 bool ScheduleDAGInstrs::addEdge(SUnit *SuccSU, const SDep &PredDep) {
 1221   std::vector<std::pair<const SUnit *, const SUnit*>> ConnectionPairs;
 1221   std::vector<std::pair<const SUnit *, const SUnit*>> ConnectionPairs;
 1246   bool isVisited(const SUnit *SU) const {
 1253   void visitPreorder(const SUnit *SU) {
 1261   void visitPostorderNode(const SUnit *SU) {
 1303   void visitPostorderEdge(const SDep &PredDep, const SUnit *Succ) {
 1310   void visitCrossEdge(const SDep &PredDep, const SUnit *Succ) {
 1339     for (const std::pair<const SUnit*, const SUnit*> &P : ConnectionPairs) {
 1339     for (const std::pair<const SUnit*, const SUnit*> &P : ConnectionPairs) {
 1353   bool joinPredSubtree(const SDep &PredDep, const SUnit *Succ,
 1358     const SUnit *PredSU = PredDep.getSUnit();
 1405   std::vector<std::pair<const SUnit *, SUnit::const_pred_iterator>> DFSStack;
 1405   std::vector<std::pair<const SUnit *, SUnit::const_pred_iterator>> DFSStack;
 1410   void follow(const SUnit *SU) {
 1420   const SUnit *getCurr() const { return DFSStack.back().first; }
 1422   SUnit::const_pred_iterator getPred() const { return DFSStack.back().second; }
 1424   SUnit::const_pred_iterator getPredEnd() const {
 1431 static bool hasDataSucc(const SUnit *SU) {
 1442 void SchedDFSResult::compute(ArrayRef<SUnit> SUnits) {
 1447   for (const SUnit &SU : SUnits) {
 1473       const SUnit *Child = DFS.getCurr();
lib/CodeGen/ScheduleDAGPrinter.cpp
   38     static bool isNodeHidden(const SUnit *Node) {
   42     static std::string getNodeIdentifierLabel(const SUnit *Node,
   52     static std::string getEdgeAttributes(const SUnit *Node,
   63     std::string getNodeLabel(const SUnit *SU, const ScheduleDAG *Graph);
   64     static std::string getNodeAttributes(const SUnit *N,
   76 std::string DOTGraphTraits<ScheduleDAG*>::getNodeLabel(const SUnit *SU,
lib/CodeGen/ScoreboardHazardRecognizer.cpp
  112 ScoreboardHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
  171 void ScoreboardHazardRecognizer::EmitInstruction(SUnit *SU) {
lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp
   67 ResourcePriorityQueue::numberRCValPredInSU(SUnit *SU, unsigned RCId) {
   73     SUnit *PredSU = Pred.getSUnit();
  104 unsigned ResourcePriorityQueue::numberRCValSuccInSU(SUnit *SU,
  111     SUnit *SuccSU = Succ.getSUnit();
  142 static unsigned numberCtrlDepsInSU(SUnit *SU) {
  151 static unsigned numberCtrlPredInSU(SUnit *SU) {
  163 void ResourcePriorityQueue::initNodes(std::vector<SUnit> &sunits) {
  168     SUnit *SU = &(*SUnits)[i];
  176 bool resource_sort::operator()(const SUnit *LHS, const SUnit *RHS) const {
  176 bool resource_sort::operator()(const SUnit *LHS, const SUnit *RHS) const {
  210 SUnit *ResourcePriorityQueue::getSingleUnscheduledPred(SUnit *SU) {
  210 SUnit *ResourcePriorityQueue::getSingleUnscheduledPred(SUnit *SU) {
  211   SUnit *OnlyAvailablePred = nullptr;
  213     SUnit &PredSU = *Pred.getSUnit();
  225 void ResourcePriorityQueue::push(SUnit *SU) {
  239 bool ResourcePriorityQueue::isResourceAvailable(SUnit *SU) {
  282 void ResourcePriorityQueue::reserveResources(SUnit *SU) {
  319 int ResourcePriorityQueue::rawRegPressureDelta(SUnit *SU, unsigned RCId) {
  353 int ResourcePriorityQueue::regPressureDelta(SUnit *SU, bool RawPressure) {
  389 int ResourcePriorityQueue::SUSchedulingCost(SUnit *SU) {
  460 void ResourcePriorityQueue::scheduledNode(SUnit *SU) {
  534 void ResourcePriorityQueue::initNumRegDefsLeft(SUnit *SU) {
  567 void ResourcePriorityQueue::adjustPriorityOfUnscheduledPreds(SUnit *SU) {
  570   SUnit *OnlyAvailablePred = getSingleUnscheduledPred(SU);
  586 SUnit *ResourcePriorityQueue::pop() {
  590   std::vector<SUnit *>::iterator Best = Queue.begin();
  608   SUnit *V = *Best;
  618 void ResourcePriorityQueue::remove(SUnit *SU) {
  620   std::vector<SUnit *>::iterator I = find(Queue, SU);
lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp
   49     SmallVector<SUnit *, 16> Queue;
   53     void push(SUnit *U) {
   57     SUnit *pop() {
   59       SUnit *V = Queue.back();
   77   std::vector<SUnit*> LiveRegDefs;
   88   void AddPred(SUnit *SU, const SDep &D) {
   94   void RemovePred(SUnit *SU, const SDep &D) {
   99   void ReleasePred(SUnit *SU, SDep *PredEdge);
  100   void ReleasePredecessors(SUnit *SU, unsigned CurCycle);
  101   void ScheduleNodeBottomUp(SUnit*, unsigned);
  102   SUnit *CopyAndMoveSuccessors(SUnit*);
  102   SUnit *CopyAndMoveSuccessors(SUnit*);
  103   void InsertCopiesAndMoveSuccs(SUnit*, unsigned,
  106                                 SmallVectorImpl<SUnit*>&);
  107   bool DelayForLiveRegsBottomUp(SUnit*, SmallVectorImpl<unsigned>&);
  139 void ScheduleDAGFast::ReleasePred(SUnit *SU, SDep *PredEdge) {
  140   SUnit *PredSU = PredEdge->getSUnit();
  160 void ScheduleDAGFast::ReleasePredecessors(SUnit *SU, unsigned CurCycle) {
  181 void ScheduleDAGFast::ScheduleNodeBottomUp(SUnit *SU, unsigned CurCycle) {
  210 SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
  210 SUnit *ScheduleDAGFast::CopyAndMoveSuccessors(SUnit *SU) {
  218   SUnit *NewSU;
  250     SUnit *NewSU = newSUnit(N);
  268     SUnit *LoadSU;
  317       SUnit *SuccDep = D.getSUnit();
  325       SUnit *SuccDep = D.getSUnit();
  358   SmallVector<std::pair<SUnit *, SDep>, 4> DelDeps;
  362     SUnit *SuccSU = Succ.getSUnit();
  380 void ScheduleDAGFast::InsertCopiesAndMoveSuccs(SUnit *SU, unsigned Reg,
  383                                               SmallVectorImpl<SUnit*> &Copies) {
  384   SUnit *CopyFromSU = newSUnit(static_cast<SDNode *>(nullptr));
  388   SUnit *CopyToSU = newSUnit(static_cast<SDNode *>(nullptr));
  394   SmallVector<std::pair<SUnit *, SDep>, 4> DelDeps;
  398     SUnit *SuccSU = Succ.getSUnit();
  446 static bool CheckForLiveRegDef(SUnit *SU, unsigned Reg,
  447                                std::vector<SUnit*> &LiveRegDefs,
  467 bool ScheduleDAGFast::DelayForLiveRegsBottomUp(SUnit *SU,
  532     SUnit *RootSU = &SUnits[DAG->getRoot().getNode()->getNodeId()];
  540   SmallVector<SUnit*, 4> NotReady;
  541   DenseMap<SUnit*, SmallVector<unsigned, 4> > LRegsMap;
  546     SUnit *CurSU = AvailableQueue.pop();
  567         SUnit *TrySU = NotReady[0];
  571         SUnit *LRDef = LiveRegDefs[Reg];
  584         SUnit *NewDef = nullptr;
  593           SmallVector<SUnit*, 2> Copies;
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
  150   std::vector<SUnit *> PendingQueue;
  169   std::unique_ptr<SUnit*[]> LiveRegDefs;
  170   std::unique_ptr<SUnit*[]> LiveRegGens;
  174   SmallVector<SUnit*, 4> Interferences;
  176   using LRegsMapT = DenseMap<SUnit *, SmallVector<unsigned, 4>>;
  186   DenseMap<SUnit*, SUnit*> CallSeqEndForStart;
  186   DenseMap<SUnit*, SUnit*> CallSeqEndForStart;
  212   bool IsReachable(const SUnit *SU, const SUnit *TargetSU) {
  212   bool IsReachable(const SUnit *SU, const SUnit *TargetSU) {
  218   bool WillCreateCycle(SUnit *SU, SUnit *TargetSU) {
  218   bool WillCreateCycle(SUnit *SU, SUnit *TargetSU) {
  225   void AddPredQueued(SUnit *SU, const SDep &D) {
  233   void AddPred(SUnit *SU, const SDep &D) {
  241   void RemovePred(SUnit *SU, const SDep &D) {
  247   bool isReady(SUnit *SU) {
  252   void ReleasePred(SUnit *SU, const SDep *PredEdge);
  253   void ReleasePredecessors(SUnit *SU);
  256   void AdvancePastStalls(SUnit *SU);
  257   void EmitNode(SUnit *SU);
  258   void ScheduleNodeBottomUp(SUnit*);
  260   void UnscheduleNodeBottomUp(SUnit*);
  262   void BacktrackBottomUp(SUnit*, SUnit*);
  262   void BacktrackBottomUp(SUnit*, SUnit*);
  263   SUnit *TryUnfoldSU(SUnit *);
  263   SUnit *TryUnfoldSU(SUnit *);
  264   SUnit *CopyAndMoveSuccessors(SUnit*);
  264   SUnit *CopyAndMoveSuccessors(SUnit*);
  265   void InsertCopiesAndMoveSuccs(SUnit*, unsigned,
  268                                 SmallVectorImpl<SUnit*>&);
  269   bool DelayForLiveRegsBottomUp(SUnit*, SmallVectorImpl<unsigned>&);
  273   SUnit *PickNodeToScheduleBottomUp();
  277   SUnit *CreateNewSUnit(SDNode *N) {
  279     SUnit *NewNode = newSUnit(N);
  287   SUnit *CreateClone(SUnit *N) {
  287   SUnit *CreateClone(SUnit *N) {
  289     SUnit *NewNode = Clone(N);
  365   LiveRegDefs.reset(new SUnit*[TRI->getNumRegs() + 1]());
  366   LiveRegGens.reset(new SUnit*[TRI->getNumRegs() + 1]());
  398 void ScheduleDAGRRList::ReleasePred(SUnit *SU, const SDep *PredEdge) {
  399   SUnit *PredSU = PredEdge->getSUnit();
  554 void ScheduleDAGRRList::ReleasePredecessors(SUnit *SU) {
  563       SUnit *RegDef = LiveRegDefs[Pred.getReg()]; (void)RegDef;
  587         SUnit *Def = &SUnits[N->getNodeId()];
  651 void ScheduleDAGRRList::AdvancePastStalls(SUnit *SU) {
  693 void ScheduleDAGRRList::EmitNode(SUnit *SU) {
  731 static void resetVRegCycle(SUnit *SU);
  736 void ScheduleDAGRRList::ScheduleNodeBottomUp(SUnit *SU) {
  821   SUnit *PredSU = PredEdge->getSUnit();
  835 void ScheduleDAGRRList::UnscheduleNodeBottomUp(SUnit *SU) {
  859       SUnit *SeqEnd = CallSeqEndForStart[SU];
  935   std::vector<SUnit *>::const_iterator I = (Sequence.end() - LookAhead);
  938     SUnit *SU = *I;
  948 void ScheduleDAGRRList::BacktrackBottomUp(SUnit *SU, SUnit *BtSU) {
  948 void ScheduleDAGRRList::BacktrackBottomUp(SUnit *SU, SUnit *BtSU) {
  949   SUnit *OldSU = Sequence.back();
  970 static bool isOperandOf(const SUnit *SU, SDNode *N) {
  980 SUnit *ScheduleDAGRRList::TryUnfoldSU(SUnit *SU) {
  980 SUnit *ScheduleDAGRRList::TryUnfoldSU(SUnit *SU) {
 1003   SUnit *LoadSU;
 1020   SUnit *NewSU;
 1093     SUnit *SuccDep = D.getSUnit();
 1104     SUnit *SuccDep = D.getSUnit();
 1134 SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {
 1134 SUnit *ScheduleDAGRRList::CopyAndMoveSuccessors(SUnit *SU) {
 1151   SUnit *NewSU;
 1173     SUnit *UnfoldSU = TryUnfoldSU(SU);
 1197   SmallVector<std::pair<SUnit *, SDep>, 4> DelDeps;
 1201     SUnit *SuccSU = Succ.getSUnit();
 1222 void ScheduleDAGRRList::InsertCopiesAndMoveSuccs(SUnit *SU, unsigned Reg,
 1225                                               SmallVectorImpl<SUnit*> &Copies) {
 1226   SUnit *CopyFromSU = CreateNewSUnit(nullptr);
 1230   SUnit *CopyToSU = CreateNewSUnit(nullptr);
 1236   SmallVector<std::pair<SUnit *, SDep>, 4> DelDeps;
 1240     SUnit *SuccSU = Succ.getSUnit();
 1297 static void CheckForLiveRegDef(SUnit *SU, unsigned Reg,
 1298                                SUnit **LiveRegDefs,
 1319 static void CheckForLiveRegDefMasked(SUnit *SU, const uint32_t *RegMask,
 1320                                      ArrayRef<SUnit*> LiveRegDefs,
 1346 DelayForLiveRegsBottomUp(SUnit *SU, SmallVectorImpl<unsigned> &LRegs) {
 1437     SUnit *SU = Interferences[i-1];
 1463 SUnit *ScheduleDAGRRList::PickNodeToScheduleBottomUp() {
 1464   SUnit *CurSU = AvailableQueue->empty() ? nullptr : AvailableQueue->pop();
 1500   for (SUnit *TrySU : Interferences) {
 1505     SUnit *BtSU = nullptr;
 1551     SUnit *TrySU = Interferences[0];
 1555     SUnit *LRDef = LiveRegDefs[Reg];
 1568     SUnit *NewDef = nullptr;
 1576       SmallVector<SUnit*, 2> Copies;
 1603     SUnit *RootSU = &SUnits[DAG->getRoot().getNode()->getNodeId()];
 1618     SUnit *SU = PickNodeToScheduleBottomUp();
 1645   bool isReady(SUnit* SU, unsigned CurCycle) const { return true; }
 1655   bool operator()(SUnit* left, SUnit* right) const {
 1655   bool operator()(SUnit* left, SUnit* right) const {
 1675   bool operator()(SUnit* left, SUnit* right) const;
 1675   bool operator()(SUnit* left, SUnit* right) const;
 1689   bool operator()(SUnit* left, SUnit* right) const;
 1689   bool operator()(SUnit* left, SUnit* right) const;
 1703   bool isReady(SUnit *SU, unsigned CurCycle) const;
 1705   bool operator()(SUnit* left, SUnit* right) const;
 1705   bool operator()(SUnit* left, SUnit* right) const;
 1720   bool isReady(SUnit *SU, unsigned CurCycle) const;
 1722   bool operator()(SUnit* left, SUnit* right) const;
 1722   bool operator()(SUnit* left, SUnit* right) const;
 1727   std::vector<SUnit *> Queue;
 1733   std::vector<SUnit> *SUnits;
 1780   void initNodes(std::vector<SUnit> &sunits) override;
 1782   void addNode(const SUnit *SU) override;
 1784   void updateNode(const SUnit *SU) override;
 1792   unsigned getNodePriority(const SUnit *SU) const;
 1794   unsigned getNodeOrdering(const SUnit *SU) const {
 1802   void push(SUnit *U) override {
 1808   void remove(SUnit *SU) override {
 1811     std::vector<SUnit *>::iterator I = llvm::find(Queue, SU);
 1822   bool HighRegPressure(const SUnit *SU) const;
 1824   bool MayReduceRegPressure(SUnit *SU) const;
 1826   int RegPressureDiff(SUnit *SU, unsigned &LiveUses) const;
 1828   void scheduledNode(SUnit *SU) override;
 1830   void unscheduledNode(SUnit *SU) override;
 1833   bool canClobber(const SUnit *SU, const SUnit *Op);
 1833   bool canClobber(const SUnit *SU, const SUnit *Op);
 1840 static SUnit *popFromQueueImpl(std::vector<SUnit *> &Q, SF &Picker) {
 1840 static SUnit *popFromQueueImpl(std::vector<SUnit *> &Q, SF &Picker) {
 1841   std::vector<SUnit *>::iterator Best = Q.begin();
 1845   SUnit *V = *Best;
 1853 SUnit *popFromQueue(std::vector<SUnit *> &Q, SF &Picker, ScheduleDAG *DAG) {
 1853 SUnit *popFromQueue(std::vector<SUnit *> &Q, SF &Picker, ScheduleDAG *DAG) {
 1888   bool isReady(SUnit *U) const override {
 1892   SUnit *pop() override {
 1895     SUnit *V = popFromQueue(Queue, Picker, scheduleDAG);
 1903     std::vector<SUnit *> DumpQueue = Queue;
 1906       SUnit *SU = popFromQueue(DumpQueue, DumpPicker, scheduleDAG);
 1931 static int checkSpecialNodes(const SUnit *left, const SUnit *right) {
 1931 static int checkSpecialNodes(const SUnit *left, const SUnit *right) {
 1942 CalcNodeSethiUllmanNumber(const SUnit *SU, std::vector<unsigned> &SUNumbers) {
 1948     WorkState(const SUnit *SU) : SU(SU) {}
 1949     const SUnit *SU;
 1963       SUnit *PredSU = Pred.getSUnit();
 1986       SUnit *PredSU = Pred.getSUnit();
 2012   for (const SUnit &SU : *SUnits)
 2016 void RegReductionPQBase::addNode(const SUnit *SU) {
 2023 void RegReductionPQBase::updateNode(const SUnit *SU) {
 2030 unsigned RegReductionPQBase::getNodePriority(const SUnit *SU) const {
 2083 bool RegReductionPQBase::HighRegPressure(const SUnit *SU) const {
 2090     SUnit *PredSU = Pred.getSUnit();
 2108 bool RegReductionPQBase::MayReduceRegPressure(SUnit *SU) const {
 2133 int RegReductionPQBase::RegPressureDiff(SUnit *SU, unsigned &LiveUses) const {
 2139     SUnit *PredSU = Pred.getSUnit();
 2172 void RegReductionPQBase::scheduledNode(SUnit *SU) {
 2182     SUnit *PredSU = Pred.getSUnit();
 2241 void RegReductionPQBase::unscheduledNode(SUnit *SU) {
 2264     SUnit *PredSU = Pred.getSUnit();
 2327 static unsigned closestSucc(const SUnit *SU) {
 2345 static unsigned calcMaxScratches(const SUnit *SU) {
 2356 static bool hasOnlyLiveInOpers(const SUnit *SU) {
 2360     const SUnit *PredSU = Pred.getSUnit();
 2378 static bool hasOnlyLiveOutUses(const SUnit *SU) {
 2382     const SUnit *SuccSU = Succ.getSUnit();
 2406 static void initVRegCycle(SUnit *SU) {
 2425 static void resetVRegCycle(SUnit *SU) {
 2431     SUnit *PredSU = Pred.getSUnit();
 2442 static bool hasVRegCycleUse(const SUnit *SU) {
 2461 static bool BUHasStall(SUnit *SU, int Height, RegReductionPQBase *SPQ) {
 2471 static int BUCompareLatency(SUnit *left, SUnit *right, bool checkPref,
 2471 static int BUCompareLatency(SUnit *left, SUnit *right, bool checkPref,
 2522 static bool BURRSort(SUnit *left, SUnit *right, RegReductionPQBase *SPQ) {
 2522 static bool BURRSort(SUnit *left, SUnit *right, RegReductionPQBase *SPQ) {
 2626 bool bu_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2626 bool bu_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2634 bool src_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2634 bool src_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2653 bool hybrid_ls_rr_sort::isReady(SUnit *SU, unsigned CurCycle) const {
 2668 bool hybrid_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2668 bool hybrid_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2700 bool ilp_ls_rr_sort::isReady(SUnit *SU, unsigned CurCycle) const {
 2710 static bool canEnableCoalescing(SUnit *SU) {
 2734 bool ilp_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2734 bool ilp_ls_rr_sort::operator()(SUnit *left, SUnit *right) const {
 2795 void RegReductionPQBase::initNodes(std::vector<SUnit> &sunits) {
 2808     for (SUnit &SU : sunits)
 2816 bool RegReductionPQBase::canClobber(const SUnit *SU, const SUnit *Op) {
 2816 bool RegReductionPQBase::canClobber(const SUnit *SU, const SUnit *Op) {
 2837 static bool canClobberReachingPhysRegUse(const SUnit *DepSU, const SUnit *SU,
 2837 static bool canClobberReachingPhysRegUse(const SUnit *DepSU, const SUnit *SU,
 2848     SUnit *SuccSU = Succ.getSUnit();
 2873 static bool canClobberPhysRegDefs(const SUnit *SuccSU, const SUnit *SU,
 2873 static bool canClobberPhysRegDefs(const SUnit *SuccSU, const SUnit *SU,
 2942   for (SUnit &SU : *SUnits) {
 2983     SUnit *PredSU = nullptr;
 3008       SUnit *PredSuccSU = PredSucc.getSUnit();
 3032       SUnit *SuccSU = Edge.getSUnit();
 3054   for (SUnit &SU : *SUnits) {
 3073       const SUnit *DUSU = &(*SUnits)[DU->getNodeId()];
 3079         SUnit *SuccSU = Succ.getSUnit();
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
   68 SUnit *ScheduleDAGSDNodes::newSUnit(SDNode *N) {
   70   const SUnit *Addr = nullptr;
   78   SUnit *SU = &SUnits.back();
   89 SUnit *ScheduleDAGSDNodes::Clone(SUnit *Old) {
   89 SUnit *ScheduleDAGSDNodes::Clone(SUnit *Old) {
   90   SUnit *SU = newSUnit(Old->getNode());
  345   SmallVector<SUnit*, 8> CallSUnits;
  360     SUnit *NodeSUnit = newSUnit(NI);
  423     SUnit *SU = CallSUnits.pop_back_val();
  430       SUnit *SrcSU = &SUnits[SrcN->getNodeId()];
  444     SUnit *SU = &SUnits[su];
  475         SUnit *OpSU = &SUnits[OpN->getNodeId()];
  575 ScheduleDAGSDNodes::RegDefIter::RegDefIter(const SUnit *SU,
  600 void ScheduleDAGSDNodes::InitNumRegDefsLeft(SUnit *SU) {
  608 void ScheduleDAGSDNodes::computeLatency(SUnit *SU) {
  669 void ScheduleDAGSDNodes::dumpNode(const SUnit &SU) const {
  697   for (const SUnit &SU : SUnits)
  707     if (SUnit *SU = Sequence[i])
  787 EmitPhysRegCopy(SUnit *SU, DenseMap<SUnit*, unsigned> &VRBaseMap,
  787 EmitPhysRegCopy(SUnit *SU, DenseMap<SUnit*, unsigned> &VRBaseMap,
  789   for (SUnit::const_pred_iterator I = SU->Preds.begin(), E = SU->Preds.end();
  794       DenseMap<SUnit*, unsigned>::iterator VRI = VRBaseMap.find(I->getSUnit());
  798       for (SUnit::const_succ_iterator II = SU->Succs.begin(),
  830   DenseMap<SUnit*, unsigned> CopyVRBaseMap;
  888     SUnit *SU = Sequence[i];
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h
   53     std::vector<SUnit*> Sequence;
   86     SUnit *newSUnit(SDNode *N);
   91     SUnit *Clone(SUnit *Old);
   91     SUnit *Clone(SUnit *Old);
  101     void InitNumRegDefsLeft(SUnit *SU);
  105     virtual void computeLatency(SUnit *SU);
  125     void dumpNode(const SUnit &SU) const override;
  129     std::string getGraphNodeLabel(const SUnit *SU) const override;
  146       RegDefIter(const SUnit *SU, const ScheduleDAGSDNodes *SD);
  187     void EmitPhysRegCopy(SUnit *SU, DenseMap<SUnit*, unsigned> &VRBaseMap,
  187     void EmitPhysRegCopy(SUnit *SU, DenseMap<SUnit*, unsigned> &VRBaseMap,
lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp
   61   std::vector<SUnit*> PendingQueue;
   85   void releaseSucc(SUnit *SU, const SDep &D);
   86   void releaseSuccessors(SUnit *SU);
   87   void scheduleNodeTopDown(SUnit *SU, unsigned CurCycle);
  113 void ScheduleDAGVLIW::releaseSucc(SUnit *SU, const SDep &D) {
  114   SUnit *SuccSU = D.getSUnit();
  137 void ScheduleDAGVLIW::releaseSuccessors(SUnit *SU) {
  139   for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
  151 void ScheduleDAGVLIW::scheduleNodeTopDown(SUnit *SU, unsigned CurCycle) {
  183   std::vector<SUnit*> NotReady;
  210     SUnit *FoundSUnit = nullptr;
  214       SUnit *CurSUnit = AvailableQueue->pop();
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
  274 std::string ScheduleDAGSDNodes::getGraphNodeLabel(const SUnit *SU) const {
lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  723     SUnit *SUa = nullptr;
  728     for (SUnit &SU : DAG->SUnits) {
  771   bool isSALU(const SUnit *SU) const {
  776   bool isVALU(const SUnit *SU) const {
  781   bool canAddEdge(const SUnit *Succ, const SUnit *Pred) const {
  781   bool canAddEdge(const SUnit *Succ, const SUnit *Pred) const {
  785     SmallVector<const SUnit*, 64> Succs({Succ}), Preds({Pred});
  789         const SUnit *SU = SI.getSUnit();
  795     SmallPtrSet<const SUnit*, 32> Visited;
  797       const SUnit *SU = Preds.pop_back_val();
  811   unsigned linkSALUChain(SUnit *From, SUnit *To, unsigned MaxChain,
  811   unsigned linkSALUChain(SUnit *From, SUnit *To, unsigned MaxChain,
  812                          SmallPtrSetImpl<SUnit *> &Visited) const {
  813     SmallVector<SUnit *, 8> Worklist({To});
  817       SUnit *SU = Worklist.pop_back_val();
  828         SUnit *SUv = SI.getSUnit();
  834         SUnit *Succ = SI.getSUnit();
  858     SmallPtrSet<SUnit*, 32> Visited;
  859     for (SUnit &SU : DAG->SUnits) {
lib/Target/AMDGPU/GCNHazardRecognizer.cpp
   53 void GCNHazardRecognizer::EmitInstruction(SUnit *SU) {
  132 GCNHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
  231 unsigned GCNHazardRecognizer::PreEmitNoops(SUnit *SU) {
lib/Target/AMDGPU/GCNHazardRecognizer.h
  104   void EmitInstruction(SUnit *SU) override;
  106   HazardType getHazardType(SUnit *SU, int Stalls) override;
  108   unsigned PreEmitNoops(SUnit *SU) override;
lib/Target/AMDGPU/GCNILPSched.cpp
   24     SUnit *SU;
   26     Candidate(SUnit *SU_)
   41   unsigned getNodePriority(const SUnit *SU) const;
   43   const SUnit *pickBest(const SUnit *left, const SUnit *right);
   43   const SUnit *pickBest(const SUnit *left, const SUnit *right);
   43   const SUnit *pickBest(const SUnit *left, const SUnit *right);
   48   void releasePredecessors(const SUnit* SU);
   51   std::vector<const SUnit*> schedule(ArrayRef<const SUnit*> TopRoots,
   51   std::vector<const SUnit*> schedule(ArrayRef<const SUnit*> TopRoots,
   59 CalcNodeSethiUllmanNumber(const SUnit *SU, std::vector<unsigned> &SUNumbers) {
   67     SUnit *PredSU = Pred.getSUnit();
   87 unsigned GCNILPScheduler::getNodePriority(const SUnit *SU) const {
  107 static unsigned closestSucc(const SUnit *SU) {
  122 static unsigned calcMaxScratches(const SUnit *SU) {
  133 static int BUCompareLatency(const SUnit *left, const SUnit *right) {
  133 static int BUCompareLatency(const SUnit *left, const SUnit *right) {
  163 const SUnit *GCNILPScheduler::pickBest(const SUnit *left, const SUnit *right)
  163 const SUnit *GCNILPScheduler::pickBest(const SUnit *left, const SUnit *right)
  163 const SUnit *GCNILPScheduler::pickBest(const SUnit *left, const SUnit *right)
  276 void GCNILPScheduler::releasePredecessors(const SUnit* SU) {
  290 std::vector<const SUnit*>
  291 GCNILPScheduler::schedule(ArrayRef<const SUnit*> BotRoots,
  295   std::vector<SUnit> SUSavedCopy;
  300   for (const SUnit &SU : SUnits)
  304   for (const SUnit &SU : SUnits)
  313   std::vector<const SUnit*> Schedule;
  351   for (auto &SU : SUnits)
  358 std::vector<const SUnit*> makeGCNILPScheduler(ArrayRef<const SUnit*> BotRoots,
  358 std::vector<const SUnit*> makeGCNILPScheduler(ArrayRef<const SUnit*> BotRoots,
lib/Target/AMDGPU/GCNIterativeScheduler.cpp
   40 std::vector<const SUnit *> makeMinRegSchedule(ArrayRef<const SUnit *> TopRoots,
   40 std::vector<const SUnit *> makeMinRegSchedule(ArrayRef<const SUnit *> TopRoots,
   43   std::vector<const SUnit*> makeGCNILPScheduler(ArrayRef<const SUnit*> BotRoots,
   43   std::vector<const SUnit*> makeGCNILPScheduler(ArrayRef<const SUnit*> BotRoots,
   51 static inline MachineInstr *getMachineInstr(const SUnit *SU) {
   54 static inline MachineInstr *getMachineInstr(const SUnit &SU) {
  145   SmallVector<SUnit *, 8> TopRoots;
  147   SmallVector<SUnit*, 8> BotRoots;
  166   ArrayRef<const SUnit *> getTopRoots() const {
  169   ArrayRef<SUnit*> getBottomRoots() const {
  230   SUnit *pickNode(bool &IsTopNode) override { return nullptr; }
  231   void schedNode(SUnit *SU, bool IsTopNode) override {}
  232   void releaseTopNode(SUnit *SU) override {}
  233   void releaseBottomNode(SUnit *SU) override {}
  381   for (const auto &I : Schedule) {
lib/Target/AMDGPU/GCNIterativeScheduler.h
   51   using ScheduleRef = ArrayRef<const SUnit *>;
lib/Target/AMDGPU/GCNMinRegStrategy.cpp
   31     const SUnit *SU;
   34     Candidate(const SUnit *SU_, int Priority_ = 0)
   44   bool isScheduled(const SUnit *SU) const {
   49   void setIsScheduled(const SUnit *SU)  {
   54   unsigned getNumPreds(const SUnit *SU) const {
   60   unsigned decNumPreds(const SUnit *SU) {
   68   int getReadySuccessors(const SUnit *SU) const;
   69   int getNotReadySuccessors(const SUnit *SU) const;
   76   void bumpPredsPriority(const SUnit *SchedSU, int Priority);
   77   void releaseSuccessors(const SUnit* SU, int Priority);
   80   std::vector<const SUnit*> schedule(ArrayRef<const SUnit*> TopRoots,
   80   std::vector<const SUnit*> schedule(ArrayRef<const SUnit*> TopRoots,
   92 int GCNMinRegScheduler::getReadySuccessors(const SUnit *SU) const {
  109 int GCNMinRegScheduler::getNotReadySuccessors(const SUnit *SU) const {
  183 void GCNMinRegScheduler::bumpPredsPriority(const SUnit *SchedSU, int Priority) {
  184   SmallPtrSet<const SUnit*, 32> Set;
  197   SmallVector<const SUnit*, 32> Worklist(Set.begin(), Set.end());
  220 void GCNMinRegScheduler::releaseSuccessors(const SUnit* SU, int Priority) {
  231 std::vector<const SUnit*>
  232 GCNMinRegScheduler::schedule(ArrayRef<const SUnit*> TopRoots,
  235   std::vector<const SUnit*> Schedule;
  278 std::vector<const SUnit*> makeMinRegSchedule(ArrayRef<const SUnit*> TopRoots,
  278 std::vector<const SUnit*> makeMinRegSchedule(ArrayRef<const SUnit*> TopRoots,
lib/Target/AMDGPU/GCNSchedStrategy.cpp
   61 void GCNMaxOccupancySchedStrategy::initCandidate(SchedCandidate &Cand, SUnit *SU,
  150   for (SUnit *SU : Q) {
  170 SUnit *GCNMaxOccupancySchedStrategy::pickNodeBidirectional(bool &IsTopNode) {
  173   if (SUnit *SU = Bot.pickOnlyChoice()) {
  177   if (SUnit *SU = Top.pickOnlyChoice()) {
  269 SUnit *GCNMaxOccupancySchedStrategy::pickNode(bool &IsTopNode) {
  275   SUnit *SU;
lib/Target/AMDGPU/GCNSchedStrategy.h
   32   SUnit *pickNodeBidirectional(bool &IsTopNode);
   38   void initCandidate(SchedCandidate &Cand, SUnit *SU,
   58   SUnit *pickNode(bool &IsTopNode) override;
lib/Target/AMDGPU/R600MachineScheduler.cpp
   45 void R600SchedStrategy::MoveUnits(std::vector<SUnit *> &QSrc,
   46                                   std::vector<SUnit *> &QDst)
   57 SUnit* R600SchedStrategy::pickNode(bool &IsTopNode) {
   58   SUnit *SU = nullptr;
  142 void R600SchedStrategy::schedNode(SUnit *SU, bool IsTopNode) {
  189 void R600SchedStrategy::releaseTopNode(SUnit *SU) {
  193 void R600SchedStrategy::releaseBottomNode(SUnit *SU) {
  219 R600SchedStrategy::AluKind R600SchedStrategy::getAluKind(SUnit *SU) const {
  293 int R600SchedStrategy::getInstKind(SUnit* SU) {
  317 SUnit *R600SchedStrategy::PopInst(std::vector<SUnit *> &Q, bool AnyALU) {
  317 SUnit *R600SchedStrategy::PopInst(std::vector<SUnit *> &Q, bool AnyALU) {
  320   for (std::vector<SUnit *>::reverse_iterator It = Q.rbegin(), E = Q.rend();
  322     SUnit *SU = *It;
  337   std::vector<SUnit *> &QSrc = Pending[IDAlu];
  387 SUnit *R600SchedStrategy::AttemptFillSlot(unsigned Slot, bool AnyAlu) {
  389   SUnit *SlotedSU = PopInst(AvailableAlus[IndexToID[Slot]], AnyAlu);
  392   SUnit *UnslotedSU = PopInst(AvailableAlus[AluAny], AnyAlu);
  406 SUnit* R600SchedStrategy::pickAlu() {
  431       SUnit *SU = AttemptFillSlot(3, true);
  440         SUnit *SU = AttemptFillSlot(Chan, false);
  453 SUnit* R600SchedStrategy::pickOther(int QID) {
  454   SUnit *SU = nullptr;
  455   std::vector<SUnit *> &AQ = Available[QID];
lib/Target/AMDGPU/R600MachineScheduler.h
   53   std::vector<SUnit *> Available[IDLast], Pending[IDLast];
   54   std::vector<SUnit *> AvailableAlus[AluLast];
   55   std::vector<SUnit *> PhysicalRegCopy;
   73   SUnit *pickNode(bool &IsTopNode) override;
   74   void schedNode(SUnit *SU, bool IsTopNode) override;
   75   void releaseTopNode(SUnit *SU) override;
   76   void releaseBottomNode(SUnit *SU) override;
   82   int getInstKind(SUnit *SU);
   84   AluKind getAluKind(SUnit *SU) const;
   87   SUnit *AttemptFillSlot (unsigned Slot, bool AnyAlu);
   89   SUnit *PopInst(std::vector<SUnit*> &Q, bool AnyALU);
   89   SUnit *PopInst(std::vector<SUnit*> &Q, bool AnyALU);
   92   SUnit* pickAlu();
   93   SUnit* pickOther(int QID);
   94   void MoveUnits(std::vector<SUnit *> &QSrc, std::vector<SUnit *> &QDst);
   94   void MoveUnits(std::vector<SUnit *> &QSrc, std::vector<SUnit *> &QDst);
lib/Target/AMDGPU/R600Packetizer.cpp
  182   bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) override {
  182   bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) override {
  217   bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) override {
  217   bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) override {
lib/Target/AMDGPU/SIMachineScheduler.cpp
  197 void SIScheduleBlock::addUnit(SUnit *SU) {
  262 SUnit* SIScheduleBlock::pickNode() {
  265   for (SUnit* SU : TopReadySUs) {
  293   for (SUnit* SU : SUnits) {
  299     SUnit *SU = TopReadySUs[0];
  337   for (SUnit* SU : ScheduledSUnits) {
  411   for (SUnit* SU : SUnits) {
  417     SUnit *SU = pickNode();
  431   for (SUnit* SU : SUnits) {
  441   for (SUnit* SU : SUnits) {
  453 void SIScheduleBlock::undoReleaseSucc(SUnit *SU, SDep *SuccEdge) {
  454   SUnit *SuccSU = SuccEdge->getSUnit();
  463 void SIScheduleBlock::releaseSucc(SUnit *SU, SDep *SuccEdge) {
  464   SUnit *SuccSU = SuccEdge->getSUnit();
  483 void SIScheduleBlock::releaseSuccessors(SUnit *SU, bool InOrOutBlock) {
  485     SUnit *SuccSU = Succ.getSUnit();
  499 void SIScheduleBlock::nodeScheduled(SUnit *SU) {
  502   std::vector<SUnit *>::iterator I = llvm::find(TopReadySUs, SU);
  528   for (SUnit* SU : SUnits) {
  613     for (const SUnit* SU : SUnits)
  616     for (const SUnit* SU : SUnits)
  652 bool SIScheduleBlockCreator::isSUInBlock(SUnit *SU, unsigned ID) {
  662     SUnit *SU = &DAG->SUnits[i];
  670 hasDataDependencyPred(const SUnit &SU, const SUnit &FromSU) {
  670 hasDataDependencyPred(const SUnit &SU, const SUnit &FromSU) {
  688     SUnit *SU = &DAG->SUnits[i];
  704     const SUnit &SU = DAG->SUnits[SUNum];
  817     SUnit *SU = &DAG->SUnits[SUNum];
  828       SUnit *Pred = PredDep.getSUnit();
  859     SUnit *SU = &DAG->SUnits[SUNum];
  870       SUnit *Succ = SuccDep.getSUnit();
  905     SUnit *SU = &DAG->SUnits[i];
  942     SUnit *SU = &DAG->SUnits[SUNum];
  954       SUnit *Succ = SuccDep.getSUnit();
  986     SUnit *SU = &DAG->SUnits[i];
 1012     SUnit *SU = &DAG->SUnits[SUNum];
 1024       SUnit *Succ = SuccDep.getSUnit();
 1038     SUnit *SU = &DAG->SUnits[SUNum];
 1045        SUnit *Succ = SuccDep.getSUnit();
 1059     SUnit *SU = &DAG->SUnits[SUNum];
 1066        SUnit *Succ = SuccDep.getSUnit();
 1081     SUnit *SU = &DAG->SUnits[SUNum];
 1087     SUnit *SU = &DAG->SUnits[SUNum];
 1098        SUnit *Succ = SuccDep.getSUnit();
 1120     SUnit *SU = &DAG->SUnits[SUNum];
 1127        SUnit *Succ = SuccDep.getSUnit();
 1152     const SUnit &SU = DAG->SUnits[SUNum];
 1227     SUnit *SU = &DAG->SUnits[i];
 1241     SUnit *SU = &DAG->SUnits[i];
 1244        SUnit *Succ = SuccDep.getSUnit();
 1252       SUnit *Pred = PredDep.getSUnit();
 1359     std::vector<SUnit*> SUs = Block->getScheduledUnits();
 1361     for (SUnit* SU : SUs) {
 1390     std::vector<SUnit*> SUs = Block->getScheduledUnits();
 1790     std::vector<SUnit*> SUs = Block->getScheduledUnits();
 1792     for (SUnit* SU : SUs)
 1836     SUnit *SU = &SUnits[ScheduledSUnits[i]];
 1841       SUnit *Pred = PredDep.getSUnit();
 1876         SUnit *Succ = SuccDep.getSUnit();
 1930   SmallVector<SUnit*, 8> TopRoots, BotRoots;
 1958     SUnit *SU = &SUnits[i];
 2033     SUnit *SU = &SUnits[*I];
lib/Target/AMDGPU/SIMachineScheduler.h
   65   std::vector<SUnit*> SUnits;
   67   std::vector<SUnit*> TopReadySUs;
   68   std::vector<SUnit*> ScheduledSUnits;
  113   void addUnit(SUnit *SU);
  145   std::vector<SUnit*> getScheduledUnits() { return ScheduledSUnits; }
  171     SUnit *SU = nullptr;
  198   void undoReleaseSucc(SUnit *SU, SDep *SuccEdge);
  199   void releaseSucc(SUnit *SU, SDep *SuccEdge);
  202   void releaseSuccessors(SUnit *SU, bool InOrOutBlock);
  204   void nodeScheduled(SUnit *SU);
  207   SUnit* pickNode();
  256   bool isSUInBlock(SUnit *SU, unsigned ID);
  433   std::vector<SUnit> SUnitsLinksBackup;
  462   SUnit& getEntrySU() { return EntrySU; }
  463   SUnit& getExitSU() { return ExitSU; }
lib/Target/ARM/ARMHazardRecognizer.cpp
   34 ARMHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
   81 void ARMHazardRecognizer::EmitInstruction(SUnit *SU) {
lib/Target/ARM/ARMHazardRecognizer.h
   39   HazardType getHazardType(SUnit *SU, int Stalls) override;
   41   void EmitInstruction(SUnit *SU) override;
lib/Target/Hexagon/HexagonHazardRecognizer.cpp
   39 HexagonHazardRecognizer::getHazardType(SUnit *SU, int stalls) {
  100 bool HexagonHazardRecognizer::ShouldPreferAnother(SUnit *SU) {
  108 void HexagonHazardRecognizer::EmitInstruction(SUnit *SU) {
lib/Target/Hexagon/HexagonHazardRecognizer.h
   28   SUnit *UsesDotCur = nullptr;
   39   SUnit *PrefVectorStoreNew = nullptr;
   63   HazardType getHazardType(SUnit *SU, int stalls) override;
   67   void EmitInstruction(SUnit *) override;
   72   bool ShouldPreferAnother(SUnit *) override;
lib/Target/Hexagon/HexagonMachineScheduler.cpp
   68 static bool hasDependence(const SUnit *SUd, const SUnit *SUu,
   68 static bool hasDependence(const SUnit *SUd, const SUnit *SUu,
   97 bool VLIWResourceModel::isResourceAvailable(SUnit *SU, bool IsTop) {
  138 bool VLIWResourceModel::reserveResources(SUnit *SU, bool IsTop) {
  204   SmallVector<SUnit*, 8> TopRoots, BotRoots;
  228     SUnit *SU = SchedImpl->pickNode(IsTopNode);
  288 void ConvergingVLIWScheduler::releaseTopNode(SUnit *SU) {
  304 void ConvergingVLIWScheduler::releaseBottomNode(SUnit *SU) {
  310   for (SUnit::succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
  336 bool ConvergingVLIWScheduler::VLIWSchedBoundary::checkHazard(SUnit *SU) {
  347 void ConvergingVLIWScheduler::VLIWSchedBoundary::releaseNode(SUnit *SU,
  389 void ConvergingVLIWScheduler::VLIWSchedBoundary::bumpNode(SUnit *SU) {
  427     SUnit *SU = *(Pending.begin()+i);
  447 void ConvergingVLIWScheduler::VLIWSchedBoundary::removeReady(SUnit *SU) {
  459 SUnit *ConvergingVLIWScheduler::VLIWSchedBoundary::pickOnlyChoice() {
  485       const ReadyQueue &Q, SUnit *SU, int Cost, PressureChange P) {
  521 static inline bool isSingleUnscheduledPred(SUnit *SU, SUnit *SU2) {
  521 static inline bool isSingleUnscheduledPred(SUnit *SU, SUnit *SU2) {
  536 static inline bool isSingleUnscheduledSucc(SUnit *SU, SUnit *SU2) {
  536 static inline bool isSingleUnscheduledSucc(SUnit *SU, SUnit *SU2) {
  553 int ConvergingVLIWScheduler::pressureChange(const SUnit *SU, bool isBotUp) {
  576 int ConvergingVLIWScheduler::SchedulingCost(ReadyQueue &Q, SUnit *SU,
  879 SUnit *ConvergingVLIWScheduler::pickNodeBidrectional(bool &IsTopNode) {
  882   if (SUnit *SU = Bot.pickOnlyChoice()) {
  887   if (SUnit *SU = Top.pickOnlyChoice()) {
  945 SUnit *ConvergingVLIWScheduler::pickNode(bool &IsTopNode) {
  951   SUnit *SU;
  994 void ConvergingVLIWScheduler::schedNode(SUnit *SU, bool IsTopNode) {
lib/Target/Hexagon/HexagonMachineScheduler.h
   45   std::vector<SUnit *> Packet;
   81   bool isResourceAvailable(SUnit *SU, bool IsTop);
   82   bool reserveResources(SUnit *SU, bool IsTop);
   84   bool isInPacket(SUnit *SU) const { return is_contained(Packet, SU); }
  115     SUnit *SU = nullptr;
  185         for (auto &SU : DAG->SUnits)
  195     bool checkHazard(SUnit *SU);
  197     void releaseNode(SUnit *SU, unsigned ReadyCycle);
  201     void bumpNode(SUnit *SU);
  205     void removeReady(SUnit *SU);
  207     SUnit *pickOnlyChoice();
  209     bool isLatencyBound(SUnit *SU) {
  239   SUnit *pickNode(bool &IsTopNode) override;
  241   void schedNode(SUnit *SU, bool IsTopNode) override;
  243   void releaseTopNode(SUnit *SU) override;
  245   void releaseBottomNode(SUnit *SU) override;
  253   SUnit *pickNodeBidrectional(bool &IsTopNode);
  255   int pressureChange(const SUnit *SU, bool isBotUp);
  258                      SUnit *SU, SchedCandidate &Candidate,
  265   void traceCandidate(const char *Label, const ReadyQueue &Q, SUnit *SU,
lib/Target/Hexagon/HexagonSubtarget.cpp
  129   for (SUnit &SU : DAG->SUnits) {
  142   for (SUnit &SU : DAG->SUnits) {
  181       const HexagonInstrInfo &HII, const SUnit &Inst1,
  182       const SUnit &Inst2) const {
  194   SUnit* LastSequentialCall = nullptr;
  199   DenseMap<unsigned, SUnit *> LastVRegUse;
  272     SUnit &S0 = DAG->SUnits[i];
  285       SUnit &S1 = DAG->SUnits[j];
  319 void HexagonSubtarget::adjustSchedDependency(SUnit *Src, SUnit *Dst,
  319 void HexagonSubtarget::adjustSchedDependency(SUnit *Src, SUnit *Dst,
  329   SmallSet<SUnit *, 4> ExclSrc;
  330   SmallSet<SUnit *, 4> ExclDst;
  418 void HexagonSubtarget::restoreLatency(SUnit *Src, SUnit *Dst) const {
  418 void HexagonSubtarget::restoreLatency(SUnit *Src, SUnit *Dst) const {
  457 void HexagonSubtarget::changeLatency(SUnit *Src, SUnit *Dst, unsigned Lat)
  457 void HexagonSubtarget::changeLatency(SUnit *Src, SUnit *Dst, unsigned Lat)
  474 static SUnit *getZeroLatency(SUnit *N, SmallVector<SDep, 4> &Deps) {
  474 static SUnit *getZeroLatency(SUnit *N, SmallVector<SDep, 4> &Deps) {
  486 bool HexagonSubtarget::isBestZeroLatency(SUnit *Src, SUnit *Dst,
  486 bool HexagonSubtarget::isBestZeroLatency(SUnit *Src, SUnit *Dst,
  487       const HexagonInstrInfo *TII, SmallSet<SUnit*, 4> &ExclSrc,
  488       SmallSet<SUnit*, 4> &ExclDst) const {
  510   SUnit *Best = nullptr;
  511   SUnit *DstBest = nullptr;
  512   SUnit *SrcBest = getZeroLatency(Dst, Dst->Preds);
lib/Target/Hexagon/HexagonSubtarget.h
   79           const SUnit &Inst1, const SUnit &Inst2) const;
   79           const SUnit &Inst1, const SUnit &Inst2) const;
  214   void adjustSchedDependency(SUnit *def, SUnit *use, SDep& dep) const override;
  214   void adjustSchedDependency(SUnit *def, SUnit *use, SDep& dep) const override;
  272   void restoreLatency(SUnit *Src, SUnit *Dst) const;
  272   void restoreLatency(SUnit *Src, SUnit *Dst) const;
  273   void changeLatency(SUnit *Src, SUnit *Dst, unsigned Lat) const;
  273   void changeLatency(SUnit *Src, SUnit *Dst, unsigned Lat) const;
  274   bool isBestZeroLatency(SUnit *Src, SUnit *Dst, const HexagonInstrInfo *TII,
  274   bool isBestZeroLatency(SUnit *Src, SUnit *Dst, const HexagonInstrInfo *TII,
  275       SmallSet<SUnit*, 4> &ExclSrc, SmallSet<SUnit*, 4> &ExclDst) const;
  275       SmallSet<SUnit*, 4> &ExclSrc, SmallSet<SUnit*, 4> &ExclDst) const;
lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
  400       const SUnit *PacketSU, unsigned DepReg, MachineBasicBlock::iterator &MII,
  508 bool HexagonPacketizerList::updateOffset(SUnit *SUI, SUnit *SUJ) {
  508 bool HexagonPacketizerList::updateOffset(SUnit *SUI, SUnit *SUJ) {
  665     SUnit *PacketSU = MIToSUnit.find(I)->second;
  751     SUnit *TempSU = MIToSUnit.find(I)->second;
  813       const SUnit *PacketSU, unsigned DepReg,
  843       const SUnit *PacketSU, unsigned DepReg, MachineBasicBlock::iterator &MII,
  913   SUnit *PacketSUDep = MIToSUnit.find(&MI)->second;
  921     SUnit *PacketSU = MIToSUnit.find(I)->second;
  967   SUnit *SU = MIToSUnit[&MI1];
  987     SUnit *PacketSU = MIToSUnit.find(I)->second;
 1310 bool HexagonPacketizerList::isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) {
 1310 bool HexagonPacketizerList::isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) {
 1621 bool HexagonPacketizerList::isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) {
 1621 bool HexagonPacketizerList::isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) {
 1835   SUnit *SUI = MIToSUnit[const_cast<MachineInstr *>(&I)];
 1859     SUnit *SUJ = MIToSUnit[J];
 1870     SUnit *SUJ = MIToSUnit[J];
lib/Target/Hexagon/HexagonVLIWPacketizer.h
   88   bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) override;
   88   bool isLegalToPacketizeTogether(SUnit *SUI, SUnit *SUJ) override;
   92   bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) override;
   92   bool isLegalToPruneDependencies(SUnit *SUI, SUnit *SUJ) override;
  114   bool canPromoteToDotCur(const MachineInstr &MI, const SUnit *PacketSU,
  122   bool canPromoteToDotNew(const MachineInstr &MI, const SUnit *PacketSU,
  125   bool canPromoteToNewValue(const MachineInstr &MI, const SUnit *PacketSU,
  132   bool updateOffset(SUnit *SUI, SUnit *SUJ);
  132   bool updateOffset(SUnit *SUI, SUnit *SUJ);
lib/Target/PowerPC/PPCHazardRecognizers.cpp
   24 bool PPCDispatchGroupSBHazardRecognizer::isLoadAfterStore(SUnit *SU) {
   54 bool PPCDispatchGroupSBHazardRecognizer::isBCTRAfterSet(SUnit *SU) {
  139 PPCDispatchGroupSBHazardRecognizer::getHazardType(SUnit *SU, int Stalls) {
  146 bool PPCDispatchGroupSBHazardRecognizer::ShouldPreferAnother(SUnit *SU) {
  155 unsigned PPCDispatchGroupSBHazardRecognizer::PreEmitNoops(SUnit *SU) {
  174 void PPCDispatchGroupSBHazardRecognizer::EmitInstruction(SUnit *SU) {
  325 getHazardType(SUnit *SU, int Stalls) {
  385 void PPCHazardRecognizer970::EmitInstruction(SUnit *SU) {
lib/Target/PowerPC/PPCHazardRecognizers.h
   27   SmallVector<SUnit *, 7> CurGroup;
   30   bool isLoadAfterStore(SUnit *SU);
   31   bool isBCTRAfterSet(SUnit *SU);
   39   HazardType getHazardType(SUnit *SU, int Stalls) override;
   40   bool ShouldPreferAnother(SUnit* SU) override;
   41   unsigned PreEmitNoops(SUnit *SU) override;
   42   void EmitInstruction(SUnit *SU) override;
   78   HazardType getHazardType(SUnit *SU, int Stalls) override;
   79   void EmitInstruction(SUnit *SU) override;
lib/Target/PowerPC/PPCMachineScheduler.cpp
   79 SUnit *PPCPostRASchedStrategy::pickNode(bool &IsTopNode) {
lib/Target/PowerPC/PPCMachineScheduler.h
   42   SUnit *pickNode(bool &IsTopNode) override;
lib/Target/SystemZ/SystemZHazardRecognizer.cpp
   46 getNumDecoderSlots(SUnit *SU) const {
   61 unsigned SystemZHazardRecognizer::getCurrCycleIdx(SUnit *SU) const {
   77 getHazardType(SUnit *m, int Stalls) {
   92 SystemZHazardRecognizer::fitsIntoCurrentGroup(SUnit *SU) const {
  167 void SystemZHazardRecognizer::dumpSU(SUnit *SU, raw_ostream &OS) const {
  271 EmitInstruction(SUnit *SU) {
  340 int SystemZHazardRecognizer::groupingCost(SUnit *SU) const {
  371 bool SystemZHazardRecognizer::isFPdOpPreferred_distance(SUnit *SU) const {
  387 resourcesCost(SUnit *SU) {
  413   SUnit SU(MI, 0);
lib/Target/SystemZ/SystemZHazardRecognizer.h
   72   inline unsigned getNumDecoderSlots(SUnit *SU) const;
   75   bool fitsIntoCurrentGroup(SUnit *SU) const;
   85   unsigned getCurrCycleIdx(SUnit *SU = nullptr) const;
  104   bool isFPdOpPreferred_distance(SUnit *SU) const;
  116   HazardType getHazardType(SUnit *m, int Stalls = 0) override;
  118   void EmitInstruction(SUnit *SU) override;
  121   const MCSchedClassDesc *getSchedClass(SUnit *SU) const {
  137   int groupingCost(SUnit *SU) const;
  142   int resourcesCost(SUnit *SU);
  147   void dumpSU(SUnit *SU, raw_ostream &OS) const;
lib/Target/SystemZ/SystemZMachineScheduler.cpp
  158 SUnit *SystemZPostRASchedStrategy::pickNode(bool &IsTopNode) {
  176   for (auto *SU : Available) {
  201 Candidate(SUnit *SU_, SystemZHazardRecognizer &HazardRec) : Candidate() {
  241 void SystemZPostRASchedStrategy::schedNode(SUnit *SU, bool IsTopNode) {
  251 void SystemZPostRASchedStrategy::releaseTopNode(SUnit *SU) {
lib/Target/SystemZ/SystemZMachineScheduler.h
   42     SUnit *SU = nullptr;
   51     Candidate(SUnit *SU_, SystemZHazardRecognizer &HazardRec);
   74     bool operator() (SUnit *lhs, SUnit *rhs) const {
   74     bool operator() (SUnit *lhs, SUnit *rhs) const {
   89   struct SUSet : std::set<SUnit*, SUSorter> {
  139   SUnit *pickNode(bool &IsTopNode) override;
  143   void schedNode(SUnit *SU, bool IsTopNode) override;
  147   void releaseTopNode(SUnit *SU) override;
  150   void releaseBottomNode(SUnit *SU) override {};
usr/include/c++/7.4.0/bits/alloc_traits.h
  387       using allocator_type = allocator<_Tp>;
  389       using value_type = _Tp;
  392       using pointer = _Tp*;
  395       using const_pointer = const _Tp*;
  474 	construct(allocator_type& __a, _Up* __p, _Args&&... __args)
  486 	destroy(allocator_type& __a, _Up* __p)
usr/include/c++/7.4.0/bits/allocator.h
  108     class allocator: public __allocator_base<_Tp>
  113       typedef _Tp*       pointer;
  114       typedef const _Tp* const_pointer;
  115       typedef _Tp&       reference;
  116       typedef const _Tp& const_reference;
  117       typedef _Tp        value_type;
  137 	allocator(const allocator<_Tp1>&) throw() { }
  158     operator!=(const allocator<_T1>&, const allocator<_T2>&)
  158     operator!=(const allocator<_T1>&, const allocator<_T2>&)
  164     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
  164     operator!=(const allocator<_Tp>&, const allocator<_Tp>&)
usr/include/c++/7.4.0/bits/move.h
   46     inline _GLIBCXX_CONSTEXPR _Tp*
   47     __addressof(_Tp& __r) _GLIBCXX_NOEXCEPT
   72     constexpr _Tp&&
   83     constexpr _Tp&&
  104     : public __and_<__not_<is_nothrow_move_constructible<_Tp>>,
  105                     is_copy_constructible<_Tp>>::type { };
usr/include/c++/7.4.0/bits/ptr_traits.h
  126       typedef _Tp* pointer;
  128       typedef _Tp  element_type;
  141       pointer_to(__make_not_void<element_type>& __r) noexcept
  141       pointer_to(__make_not_void<element_type>& __r) noexcept
usr/include/c++/7.4.0/bits/stl_construct.h
   74     _Construct(_T1* __p, _Args&&... __args)
   74     _Construct(_T1* __p, _Args&&... __args)
   75     { ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...); }
   97     _Destroy(_Tp* __pointer)
  204 	     allocator<_Tp>&)
usr/include/c++/7.4.0/bits/stl_iterator.h
 1224     __make_move_if_noexcept_iterator(_Tp* __i)
usr/include/c++/7.4.0/bits/stl_iterator_base_types.h
  123       typedef _Tp        value_type;
  181       typedef _Tp                         value_type;
  183       typedef _Tp*                        pointer;
  184       typedef _Tp&                        reference;
  192       typedef _Tp                         value_type;
  194       typedef const _Tp*                  pointer;
  195       typedef const _Tp&                  reference;
usr/include/c++/7.4.0/bits/stl_uninitialized.h
  288 			   _ForwardIterator __result, allocator<_Tp>&)
  644 				allocator<_Tp>&)
usr/include/c++/7.4.0/bits/stl_vector.h
   77 	rebind<_Tp>::other _Tp_alloc_type;
  216     class vector : protected _Vector_base<_Tp, _Alloc>
  227       typedef _Vector_base<_Tp, _Alloc>			_Base;
  232       typedef _Tp					value_type;
  919       _Tp*
  923       const _Tp*
 1561 	_Up*
 1562 	_M_data_ptr(_Up* __ptr) const _GLIBCXX_NOEXCEPT
usr/include/c++/7.4.0/ext/alloc_traits.h
  117       { typedef typename _Base_type::template rebind_alloc<_Tp> other; };
usr/include/c++/7.4.0/ext/new_allocator.h
   63       typedef _Tp*       pointer;
   64       typedef const _Tp* const_pointer;
   65       typedef _Tp&       reference;
   66       typedef const _Tp& const_reference;
   67       typedef _Tp        value_type;
  111 	return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
  130       { return size_t(-1) / sizeof(_Tp); }
  135 	construct(_Up* __p, _Args&&... __args)
  136 	{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
  140 	destroy(_Up* __p) { __p->~_Up(); }
  160     operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
  160     operator!=(const new_allocator<_Tp>&, const new_allocator<_Tp>&)
usr/include/c++/7.4.0/initializer_list
   50       typedef _E 		value_type;
   51       typedef const _E& 	reference;
   52       typedef const _E& 	const_reference;
   54       typedef const _E* 	iterator;
   55       typedef const _E* 	const_iterator;
usr/include/c++/7.4.0/type_traits
  215     : public __is_void_helper<typename remove_cv<_Tp>::type>::type
  326     : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
  354     : public __is_floating_point_helper<typename remove_cv<_Tp>::type>::type
  381     : public __is_pointer_helper<typename remove_cv<_Tp>::type>::type
  567     : public __is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
  581     : public __or_<is_lvalue_reference<_Tp>,
  582                    is_rvalue_reference<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  588     : public __or_<is_integral<_Tp>, is_floating_point<_Tp>>::type
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  601     : public __not_<__or_<is_function<_Tp>, is_reference<_Tp>,
  602                           is_void<_Tp>>>::type
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  611     : public __or_<is_arithmetic<_Tp>, is_enum<_Tp>, is_pointer<_Tp>,
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  612                    is_member_pointer<_Tp>, is_null_pointer<_Tp>>::type
  631     : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  638     : public __or_<is_object<_Tp>, is_reference<_Tp>>::type
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  777     : public __and_<is_array<_Tp>, __not_<extent<_Tp>>>
  798       typedef decltype(__test<_Tp>(0)) type;
  811                remove_all_extents<_Tp>::type>::type
  825     : public __is_destructible_safe<_Tp>::type
  984       typedef decltype(__test<_Tp, _Arg>(0)) type;
  989     : public __and_<is_destructible<_Tp>,
  990                     __is_direct_constructible_impl<_Tp, _Arg>>
 1072 			 __is_direct_constructible_ref_cast<_Tp, _Arg>,
 1073 			 __is_direct_constructible_new_safe<_Tp, _Arg>
 1079     : public __is_direct_constructible_new<_Tp, _Arg>::type
 1119     : public __is_direct_constructible<_Tp, _Arg>
 1130     : public __is_constructible_impl<_Tp, _Args...>::type
 1142     : public is_constructible<_Tp, const _Tp&>
 1142     : public is_constructible<_Tp, const _Tp&>
 1148     : public __is_copy_constructible_impl<_Tp>
 1215     : public __and_<is_constructible<_Tp, _Args...>,
 1216 		    __is_nt_constructible_impl<_Tp, _Args...>>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1246     : public is_nothrow_constructible<_Tp, _Tp&&>
 1252     : public __is_nothrow_move_constructible_impl<_Tp>
 1286     : public is_assignable<_Tp&, const _Tp&>
 1286     : public is_assignable<_Tp&, const _Tp&>
 1292     : public __is_copy_assignable_impl<_Tp>
 1554     { typedef _Tp     type; };
 1563     { typedef _Tp     type; };
 1574       remove_const<typename remove_volatile<_Tp>::type>::type     type;
 1633     { typedef _Tp   type; };
 1659     { typedef _Tp&&   type; };
 1955     { typedef _Tp     type; };
 1983     { typedef _Up     type; };
 2171     { typedef _Iffalse type; };