[PATCH] D31587: MachineScheduler/ScheduleDAG: Add support for getNode2Index

Axel Davy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 2 14:38:01 PDT 2017


axeldavy created this revision.

Add support for getNode2Index to ScheduleDAGTopologicalSort.
Node2Index is a topological sort on the SUs.
Node2Index[SU->NodeNum] (when not boundary SU) gives the topological index in the topological sort of ScheduleDAGTopologicalSort.

I would like to use Node2Index in my updated register tracking for https://reviews.llvm.org/D31124.


Repository:
  rL LLVM

https://reviews.llvm.org/D31587

Files:
  include/llvm/CodeGen/ScheduleDAG.h


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<int> &getNode2Index() { return Node2Index; }
+
     typedef std::vector<int>::iterator iterator;
     typedef std::vector<int>::const_iterator const_iterator;
     iterator begin() { return Index2Node.begin(); }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31587.93814.patch
Type: text/x-patch
Size: 600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170402/f5da4437/attachment.bin>


More information about the llvm-commits mailing list