[PATCH] Loop Vectorizer: Refactor code to compute vectorized memory instruction cost

Renato Golin renato.golin at linaro.org
Mon Feb 4 13:03:44 PST 2013


Looks good to me, though I think LoopVectorize.cpp is getting a bit too
big... If we repeat this pattern for other instructions, it'll be flooded
with little classes even before it gets to the vectorizer.

Nadav, do you think it's time to separate LoopVectorize into Cost / Legal /
Vect? Or maybe we should wait a bit more?

Implementation-wise, though, I think it's good to go.

cheers,
--renato


On 4 February 2013 20:49, Arnold Schwaighofer <aschwaighofer at apple.com>wrote:

> No you are not wrong. Fixed in the attached patch.
>
>
>
>
>
> On Feb 4, 2013, at 1:50 PM, Renato Golin <renato.golin at linaro.org> wrote:
>
> > Hi Arnold,
> >
> > I may be wrong, but I think these guys are only ever used internally:
> >
> > +    unsigned getOpcode() { return Opcode; }
> > +
> > +    unsigned getAlignment() { return Alignment; }
> > +
> > +    unsigned getPointerAddressSpace() { return AddressSpace; }
> > +
> > +    Value *getPointerOperand() { return PointerOperand; }
> > +
> > +    Type *getScalarType() { return ScalarTy; }
> > +
> > +    Type *getVectorType() { return VectorTy; }
> >
> > So, they don't need the getters, and you can use them directly in the
> other members of the MemoryOpCost class.
> >
> > cheers,
> > --renato
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130204/001ae362/attachment.html>


More information about the llvm-commits mailing list