[llvm-commits] [Review Request][Patch]Introduce the VectorizeConfig class.

Hal Finkel hfinkel at anl.gov
Thu Apr 5 09:05:50 PDT 2012


On Thu, 5 Apr 2012 23:58:52 +0800
Hongbin Zheng <etherzhhb at gmail.com> wrote:

> On Thu, Apr 5, 2012 at 11:53 PM, Hongbin Zheng <etherzhhb at gmail.com>
> wrote:
> > Done now.
> >
> > On Thu, Apr 5, 2012 at 11:50 PM, Hongbin Zheng
> > <etherzhhb at gmail.com> wrote:
> >> On Thu, Apr 5, 2012 at 11:45 PM, Tobias Grosser
> >> <tobias at grosser.es> wrote:
> >>> On 04/05/2012 05:43 PM, Hongbin Zheng wrote:
> >>>>
> >>>> hi hal,
> >>>>
> >>>> I replace 4 places at list, they are:
> >>>>
> >>>> 1. bool vectorizeBasicBlock(Pass *P, BasicBlock&BB, const
> >>>> VectorizeConfig&C);
> >>>> 2. BasicBlockPass *createBBVectorizePass(const
> >>>> VectorizeConfig&C); 3. BBVectorize(Pass *P, const
> >>>> VectorizeConfig&C); 4. BBVectorize(const VectorizeConfig&C =
> >>>> VectorizeConfig())
> >>>
> >>>
> >>>> --- a/lib/Transforms/Vectorize/BBVectorize.cpp
> >>>> +++ b/lib/Transforms/Vectorize/BBVectorize.cpp
> >>>> @@ -140,11 +140,16 @@ STATISTIC(NumFusedOps, "Number of
> >>>> operations fused by bb-vectorize");
> >>>>  namespace {
> >>>>    struct BBVectorize : public BasicBlockPass {
> >>>>      static char ID; // Pass identification, replacement for
> >>>> typeid
> >>>> -    BBVectorize() : BasicBlockPass(ID) {
> >>>> +
> >>>> +    VectorizeConfig Config;
> >> You means the BBVectorize should store the reference to the Config?
> Looks like break the regression tests because the temporary expired?

Correct, you can't keep the reference to the temporary outside of the
constructor. But you can use it to initialize a const member of the
BBVectorize class.

 -Hal

> 
> Failing Tests (9):
>     LLVM :: Transforms/BBVectorize/cycle.ll
>     LLVM :: Transforms/BBVectorize/ld1.ll
>     LLVM :: Transforms/BBVectorize/loop1.ll
>     LLVM :: Transforms/BBVectorize/mem-op-depth.ll
>     LLVM :: Transforms/BBVectorize/req-depth.ll
>     LLVM :: Transforms/BBVectorize/search-limit.ll
>     LLVM :: Transforms/BBVectorize/simple-int.ll
>     LLVM :: Transforms/BBVectorize/simple-ldstr.ll
>     LLVM :: Transforms/BBVectorize/simple.ll
> 
> I afraid i had to go to bed now ...
> >>>
> >>>
> >>> Here is another one.
> >>
> >> best regards
> >> ether
> >>>
> >>> Tobi



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




More information about the llvm-commits mailing list