[PATCH] D62411: LiveIntervals: add LiveRange::findIndexesLiveAt function - return a list of SlotIndexes the LiveRange live at.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 11:01:17 PDT 2019


arsenm added inline comments.


================
Comment at: include/llvm/CodeGen/LiveInterval.h:612-613
+    template <typename Range>
+    std::vector<SlotIndex> findIndexesLiveAt(Range &&R) const {
+      std::vector<SlotIndex> IndexesLiveAt;
+      auto I = R.begin(), E = R.end();
----------------
Probably should use a SmallVectorImpl out argument


================
Comment at: include/llvm/CodeGen/LiveInterval.h:616-618
+        auto Lower = std::lower_bound(I, E, S.start);
+        if (Lower == E)
+          break;
----------------
Aren't the segment sorted already, so you should be able to restrict the search bounds?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62411/new/

https://reviews.llvm.org/D62411





More information about the llvm-commits mailing list