This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Vectorizer cost model implementation




(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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]