[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:29:46 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();
----------------
vpykhtin wrote:
> arsenm wrote:
> > Probably should use a SmallVectorImpl out argument
> I used std::vector to be able to search again: it can be used for example to search from subranges after a search in the main range. I'm not sure SmallVector has compatible random access iterators with std::upper/lower_bound. I also dislike that every access to SmallVector requires a check whether it is allocated or not.
>
> BTW I just realized that I want resulting array to be ascending sorted for that reason and it is currently so by the implentation.
All of the STL iterator functions should work
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