[PATCH] Use value semantics for list of ScopStmt(s) instead of std::owningptr
Tobias Grosser
tobias at grosser.es
Tue May 26 22:23:54 PDT 2015
In http://reviews.llvm.org/D10041#179021, @jdoerfert wrote:
> If you do only worry about the order but you would like to use a list, define the begin()/end() function of a Scop as rbegin()/rend() of the underlying list of scopstmts, that should give us the same order but avoid the deque (which isn't that bad I guess).
I decided to stay with the deque as the use of rbegin()/rend() is possible, but would (only slightly) increase complexity. As I doubt this has any performance effect, I decided to minimize complexity.
REPOSITORY
rL LLVM
================
Comment at: lib/Analysis/ScopInfo.cpp:2024
@@ -2030,3 +2023,3 @@
ScopStmt *Scop::getStmtForBasicBlock(BasicBlock *BB) const {
- const auto &StmtMapIt = StmtMap.find(BB);
+ auto StmtMapIt = StmtMap.find(BB);
if (StmtMapIt == StmtMap.end())
----------------
jdoerfert wrote:
> Why no const &?
Changed.
http://reviews.llvm.org/D10041
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list