[llvm-commits] [PATCH] add get(Extract/Insert)SubvectorCost to VTTI

Nadav Rotem nrotem at apple.com
Tue Nov 6 09:24:35 PST 2012


On Nov 5, 2012, at 11:03 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Nadav, et al.,
> 
> Most of the shuffles that the BB vectorizer forms are subvector extractions and insertions. On some targets, some of these extractions and insertions are cheaper than general shuffles, and I'd like to add a cost interface to capture that.
> 
> I've attached a small patch to add these interfaces. What do you think?

I like this approach. 

> Will it matter to the costs whether either of the vectors being used will be used again?

I don't think that it matters. 

> (meaning will there be cheaper 'destructive' extracts than otherwise?). The default implementation does not contain any logic to detected trivial insertions and extractions (between a type and a type to which the first is promoted). If we like this interface, I'll add that logic as well.

I think that usually the insertion and extraction operation are symmetrical. So, maybe we can have a single function with a boolean variable to indicate if this is insert or extract. 

Thanks,
Nadav

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121106/8074cf20/attachment.html>


More information about the llvm-commits mailing list