diff options
author | Francis Visoiu Mistrih <fvisoiumistrih@apple.com> | 2017-05-17 01:07:53 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <fvisoiumistrih@apple.com> | 2017-05-17 01:07:53 +0000 |
commit | b52e0366008436f6f994ce94cb6ad0f51d65ba8a (patch) | |
tree | c6067844f69347f2f77a9094caff2644ddcffcf6 /llvm/lib/CodeGen/StackColoring.cpp | |
parent | de83fec0299ac4bae25d7e36ef30feddba2b48ad (diff) | |
download | bcm5719-llvm-b52e0366008436f6f994ce94cb6ad0f51d65ba8a.tar.gz bcm5719-llvm-b52e0366008436f6f994ce94cb6ad0f51d65ba8a.zip |
BitVector: add iterators for set bits
Differential revision: https://reviews.llvm.org/D32060
llvm-svn: 303227
Diffstat (limited to 'llvm/lib/CodeGen/StackColoring.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackColoring.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp index f51d959a089..86a16187fcb 100644 --- a/llvm/lib/CodeGen/StackColoring.cpp +++ b/llvm/lib/CodeGen/StackColoring.cpp @@ -703,12 +703,10 @@ void StackColoring::calculateLiveIntervals(unsigned NumSlots) { // Create the interval of the blocks that we previously found to be 'alive'. BlockLifetimeInfo &MBBLiveness = BlockLiveness[&MBB]; - for (int pos = MBBLiveness.LiveIn.find_first(); pos != -1; - pos = MBBLiveness.LiveIn.find_next(pos)) { + for (unsigned pos : MBBLiveness.LiveIn.set_bits()) { Starts[pos] = Indexes->getMBBStartIdx(&MBB); } - for (int pos = MBBLiveness.LiveOut.find_first(); pos != -1; - pos = MBBLiveness.LiveOut.find_next(pos)) { + for (unsigned pos : MBBLiveness.LiveOut.set_bits()) { Finishes[pos] = Indexes->getMBBEndIdx(&MBB); } |