[PATCH] Quick look-up for block in loop
Andrew Trick
atrick at apple.com
Fri Oct 25 15:00:22 PDT 2013
Thanks Xiaofei. If you address my two inline comments, I think this is ready to checkin.
================
Comment at: include/llvm/Analysis/LoopInfo.h:278-281
@@ -274,1 +277,6 @@
+
+ void reverseBlock(unsigned from) {
+ std::reverse(Blocks.begin() + from, Blocks.end());
+ DenseBlockSet.clear();
+ DenseBlockSet.insert(Blocks.begin(), Blocks.end());
}
----------------
Why does this clear the cache?
================
Comment at: include/llvm/Analysis/LoopInfoImpl.h:421
@@ -420,3 +400,2 @@
L->getSubLoopsVector().reserve(NumSubloops);
- L->getBlocksVector().reserve(NumBlocks);
}
----------------
Oh no. Why don't we reserve the block vector any more? Can you just add an API for it?
http://llvm-reviews.chandlerc.com/D2014
More information about the llvm-commits
mailing list