[llvm-commits] Cost Table Draft

Renato Golin Linaro renato.golin at linaro.org
Wed Jan 16 07:24:31 PST 2013


Hi David,

The CostTableEntry had originally two hard-coded types and only changed to
a list later, I'll see if I can make it simpler.

--renato


On 16 January 2013 15:14, David Tweed <David.Tweed at arm.com> wrote:

>  Hi Renato,****
>
> ** **
>
> I'm probably missing something but couldn't you make CostTable<> be a
> templated base class and then have proper classes UnaryCostTable and
> BinaryCostTable inherit from it, leaving only the search method in the
> base. That would add a small number of lines to the code, but that way you
> simply wouldn't be able to call the 4 argument version of addCost un a
> UnaryCostTable rather than needing to check at run-time? (To my
> understanding, the compiler should generate essentially identical actual
> code, so I don't think there's any performance loss.)****
>
> ** **
>
> Cheers,****
>
> Dave****
>
> ** **
>
> *From:* llvm-commits-bounces at cs.uiuc.edu [mailto:
> llvm-commits-bounces at cs.uiuc.edu] *On Behalf Of *Renato Golin Linaro
> *Sent:* 16 January 2013 14:50
> *To:* LLVM Commits; Nadav Rotem
> *Subject:* [llvm-commits] Cost Table Draft****
>
> ** **
>
> Hi Nadav,****
>
> ** **
>
> I had a look at the table and tried to unify both unary and binary tables
> into one, leaving it simple to use and more importantly, to initialize it
> statically in the cost functions. The usage syntax is still very similar.*
> ***
>
> ** **
>
> I have used it in both cases, one and two types, to give you an example
> how it works. If you're ok with the code and the style, I'll apply it to
> all other cases (and use it on the ARM model).****
>
> ** **
>
> cheers,****
>
> --renato****
>
> -- IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended
> recipient, please notify the sender immediately and do not disclose the
> contents to any other person, use it for any purpose, or store or copy the
> information in any medium. Thank you.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130116/dffd70ce/attachment.html>


More information about the llvm-commits mailing list