[llvm-commits] [Review Request][Patch]Introduce the VectorizeConfig class.
Hongbin Zheng
etherzhhb at gmail.com
Thu Apr 5 09:11:01 PDT 2012
On Fri, Apr 6, 2012 at 12:05 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> 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.
Done now.
Thanks you two to take your time :)
best regards
ether
More information about the llvm-commits
mailing list