[llvm-commits] Cost Table Draft
Evan Cheng
evan.cheng at apple.com
Fri Jan 18 16:00:12 PST 2013
Please watch out for 80-col violations.
+CostTable::CostTable(const CostTableEntry *table, const size_t size, unsigned numTypes)
Another stylistic nitpick:
+unsigned CostTable::_findCost(int ISD, MVT *Types) const {
+ for (unsigned i = 0; i < size; ++i) {
+ if (table[i].ISD == ISD) {
This is almost always better because it reduces indentation.
+unsigned CostTable::_findCost(int ISD, MVT *Types) const {
+ for (unsigned i = 0; i < size; ++i) {
+ if (table[i].ISD != ISD)
continue;
But my real question is whether the table should be sorted so the look up can be faster?
Evan
On Jan 16, 2013, at 1:30 PM, Renato Golin Linaro <renato.golin at linaro.org> wrote:
> On 16 January 2013 21:13, Nadav Rotem <nrotem at apple.com> wrote:
> LGTM!
>
> Thanks!
>
> committed in r172658.
>
> cheers,
> --renato
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130118/88f7a406/attachment.html>
More information about the llvm-commits
mailing list