[PATCH] Quick look-up for block in loop
Wan, Xiaofei
xiaofei.wan at intel.com
Fri Oct 25 17:52:54 PDT 2013
Andy:
Thanks for review
1. No need to clear cache since the set doesn’t care about the order.
2. If it will cause performance penalty, reserveBlock(unsigned size) is added.
Patch updated, please review, thanks
http://llvm-reviews.chandlerc.com/D2014
Thanks
Wan Xiaofei
-----Original Message-----
From: Andrew Trick [mailto:atrick at apple.com]
Sent: Saturday, October 26, 2013 6:00 AM
To: atrick at apple.com; Wan, Xiaofei
Cc: llvm-commits at cs.uiuc.edu; hfinkel at anl.gov
Subject: Re: [PATCH] Quick look-up for block in loop
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