[polly] r238090 - Use unique_ptr to clarify ownership of ScopStmt

Johannes Doerfert doerfert at cs.uni-saarland.de
Sat May 23 03:19:16 PDT 2015


On 05/23, Tobias Grosser wrote:
> Author: grosser
> Date: Sat May 23 00:14:09 2015
> New Revision: 238090
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=238090&view=rev
> Log:
> Use unique_ptr to clarify ownership of ScopStmt
> 
> -  typedef std::vector<ScopStmt *> StmtSet;
> +  typedef std::vector<std::unique_ptr<ScopStmt>> StmtSet;
I'm not sure about this. Why/Where do you need clarification for the
ownership?

>    SmallPtrSet<const Value *, 8> ReductionBaseValues;
> -  for (ScopStmt *Stmt : S)
> +  for (auto &Stmt : S)
I liked the * in the type better as you knew what you get. Now I can see
only a reference which I usually do not suspected to be a capsuled pointer.

-- 

Johannes Doerfert
Researcher / PhD Student

Compiler Design Lab (Prof. Hack)
Saarland University, Computer Science
Building E1.3, Room 4.31

Tel. +49 (0)681 302-57521 : doerfert at cs.uni-saarland.de
Fax. +49 (0)681 302-3065  : http://www.cdl.uni-saarland.de/people/doerfert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150523/a413ba68/attachment.sig>


More information about the llvm-commits mailing list