Index: include/llvm/CodeGen/ScheduleDAG.h =================================================================== --- include/llvm/CodeGen/ScheduleDAG.h +++ include/llvm/CodeGen/ScheduleDAG.h @@ -738,6 +738,10 @@ /// current node \p M. void RemovePred(SUnit *M, SUnit *N); + /// Get a reference to Node2Index, the topological sort + /// of the nodes. + const std::vector &getNode2Index() { return Node2Index; } + typedef std::vector::iterator iterator; typedef std::vector::const_iterator const_iterator; iterator begin() { return Index2Node.begin(); }