[llvm-commits] [llvm] r167942 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp

Hal Finkel hfinkel at anl.gov
Wed Nov 14 11:54:43 PST 2012


----- Original Message -----
> From: "Jakob Stoklund Olesen" <stoklund at 2pi.dk>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: llvm-commits at cs.uiuc.edu
> Sent: Wednesday, November 14, 2012 1:38:32 PM
> Subject: Re: [llvm-commits] [llvm] r167942 - /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
> 
> 
> On Nov 14, 2012, at 11:35 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
> > ----- Original Message -----
> >> From: "Jakob Stoklund Olesen" <stoklund at 2pi.dk>
> >> To: "Hal Finkel" <hfinkel at anl.gov>
> >> Cc: llvm-commits at cs.uiuc.edu
> >> Sent: Wednesday, November 14, 2012 1:19:54 PM
> >> Subject: Re: [llvm-commits] [llvm] r167942 -
> >> /llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
> >> 
> >> 
> >> On Nov 14, 2012, at 10:38 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> >> 
> >>> -      DenseMap<ValuePair, size_t> BestChildren;
> >>> +      std::vector<ValuePairWithDepth> BestChildren;
> >> 
> >> When in doubt, use SmallVector. There are very few cases where
> >> std::vector is preferable to SmallVector.
> > 
> > Good point. Thanks! Is one more efficient than the other when
> > elements in the middle need to be erased?
> 
> Not as far as I know. They should behave identically except for the
> first allocation. (And SmallVector asserts on out-of-bound
> indexing).

r167966. Thanks!

 -Hal

> 
> /jakob
> 
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list