This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Vectorizer cost model implementation
- From: Eric Christopher <echristo at apple dot com>
- To: "Linthicum, Tony" <tony dot linthicum at amd dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 5 Apr 2007 14:35:10 -0700
- Subject: Re: [patch] Vectorizer cost model implementation
- References: <C98D5BFDB76BA04EA54EF07896B1BDD40103D576@SAUSEXMB2.amd.com>
(thanks for doing this work!)
A few style things I noticed:
a)
+ if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) &&
+ LOOP_VINFO_INT_NITERS (loop_vinfo) < (unsigned) required_iters)
coding standard nit. The && needs to be on the next line. And instead
of casting
to unsigned, why not just compare < since we already know that
required_iters
is >= 0?
b)
+#ifdef ADJUST_IN_EPILOG
We actually use the 'epilogue' spelling in the rest of the compiler.
c)
+ if (!VECTOR_MODE_P (mode) || optab->handlers[mode].insn_code ==
+ CODE_FOR_nothing)
Put the full || body on the second line.
d)
+ cost = ncopies * exact_log2(group_size) * group_size *
+ TARG_VEC_TO_SCALAR_COST;
Same sort of thing here.
Otherwise it looks nice. Not that I can approve it.
-eric