On 20 May 14:40, Ilya Enkovich wrote:
> > Can you make all these --params then?  I think to be useful to users we'd 
> > want
> > them to be loop pragmas rather than options.
> 
> OK, I'll change it to params.  I didn't think about control via
> pragmas but will do now.
> 
> Thanks,
> Ilya
> 
> >
> > Richard.
> >

Hi,

Here is a set of params to be used instead of new flags.  Does this set looks 
OK?
I still use new option for cost model for convenient soct model enum re-use.

Thanks,
Ilya
--
gcc/

2016-06-16  Ilya Enkovich  <ilya.enkov...@intel.com>

        * common.opt (fvect-epilogue-cost-model=): New.
        * params.def (PARAM_VECT_EPILOGUES_COMBINE): New.
        (PARAM_VECT_EPILOGUES_MASK): New.
        (PARAM_VECT_EPILOGUES_NOMASK): New.
        (PARAM_VECT_SHORT_LOOPS): New.
        * doc/invoke.texi (-fvect-epilogue-cost-model): New.


diff --git a/gcc/common.opt b/gcc/common.opt
index fccd4b5..10cd75b 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -2582,6 +2582,10 @@ fsimd-cost-model=
 Common Joined RejectNegative Enum(vect_cost_model) Var(flag_simd_cost_model) 
Init(VECT_COST_MODEL_UNLIMITED) Optimization
 Specifies the vectorization cost model for code marked with a simd directive.
 
+fvect-epilogue-cost-model=
+Common Joined RejectNegative Enum(vect_cost_model) 
Var(flag_vect_epilogue_cost_model) Init(VECT_COST_MODEL_DEFAULT) Optimization
+Specifies the cost model for epilogue vectorization.
+
 Enum
 Name(vect_cost_model) Type(enum vect_cost_model) UnknownError(unknown 
vectorizer cost model %qs)
 
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ce162a0..ecbd7ce 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -7638,6 +7638,14 @@ or Cilk Plus simd directive.  The @var{model} argument 
should be one of
 have the same meaning as described in @option{-fvect-cost-model} and by
 default a cost model defined with @option{-fvect-cost-model} is used.
 
+@item -fvect-epilogue-cost-model=@var{model}
+@opindex fvect-epilogue-cost-model
+Alter the cost model used for vectorization of loop epilogues.  The
+@var{model} argument should be one of @samp{unlimited}, @samp{dynamic},
+@samp{cheap}.  All values of @var{model} have the same meaning as
+described in @option{-fvect-cost-model} and by default @samp{dynamic}
+cost model is used.
+
 @item -ftree-vrp
 @opindex ftree-vrp
 Perform Value Range Propagation on trees.  This is similar to the
diff --git a/gcc/params.def b/gcc/params.def
index 62a1e40..3bac68c 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -1220,6 +1220,28 @@ DEFPARAM (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS,
          "Maximum number of may-defs visited when devirtualizing "
          "speculatively", 50, 0, 0)
 
+DEFPARAM (PARAM_VECT_EPILOGUES_COMBINE,
+         "vect-epilogues-combine",
+         "Enable loop epilogue vectorization by combining it with "
+         "vectorized loop body.",
+         0, 0, 1)
+
+DEFPARAM (PARAM_VECT_EPILOGUES_MASK,
+         "vect-epilogues-mask",
+         "Enable loop epilogue vectorization using the same vector "
+         "size and masking.",
+         0, 0, 1)
+
+DEFPARAM (PARAM_VECT_EPILOGUES_NOMASK,
+         "vect-epilogues-nomask",
+         "Enable loop epilogue vectorization using smaller vector size.",
+         0, 0, 1)
+
+DEFPARAM (PARAM_VECT_SHORT_LOOPS,
+         "vect-short-loops",
+         "Enable vectorization of low trip count loops using masking.",
+         0, 0, 1)
+
 /*
 
 Local variables:

Reply via email to