diff mbox series

rs6000: Rename adjust_vectorization_cost

Message ID 670110ec-454f-100c-6c67-c3836d8b78b9@linux.ibm.com
State New
Headers show
Series rs6000: Rename adjust_vectorization_cost | expand

Commit Message

Kewen.Lin July 22, 2020, 1:44 a.m. UTC
Hi,

This trivial patch is to rename adjust_vectorization_cost to 
adjust_vect_cost_per_stmt.  Hope it's more meaningful, as well
as to avoid the confusion between the possible to be landed
function "adjust_vect_cost" and "adjust_vectorization_cost".

Even without "adjust_vect_cost", I guess it's still good?

Is it OK for trunk?

BR,
Kewen
-----
gcc/ChangeLog:

	* config/rs6000/rs6000.c (adjust_vectorization_cost): Renamed to ...
	(adjust_vect_cost_per_stmt): ... here. 
	(rs6000_add_stmt_cost): Rename adjust_vectorization_cost to
	adjust_vect_cost_per_stmt.

Comments

Segher Boessenkool July 22, 2020, 8:26 a.m. UTC | #1
Hi!

On Wed, Jul 22, 2020 at 09:44:52AM +0800, Kewen.Lin wrote:
> This trivial patch is to rename adjust_vectorization_cost to 
> adjust_vect_cost_per_stmt.  Hope it's more meaningful, as well
> as to avoid the confusion between the possible to be landed
> function "adjust_vect_cost" and "adjust_vectorization_cost".
> 
> Even without "adjust_vect_cost", I guess it's still good?

It is an improvement for sure, so it is okay for trunk of course.  It
still isn't very clear from the name how this would differ from
adjust_vect_cost, but that _is_ obviously the more generic name, so
that is good.

Thanks,


Segher
Kewen.Lin July 22, 2020, 3:53 p.m. UTC | #2
Hi Segher,

on 2020/7/22 下午4:26, Segher Boessenkool wrote:
> Hi!
> 
> On Wed, Jul 22, 2020 at 09:44:52AM +0800, Kewen.Lin wrote:
>> This trivial patch is to rename adjust_vectorization_cost to 
>> adjust_vect_cost_per_stmt.  Hope it's more meaningful, as well
>> as to avoid the confusion between the possible to be landed
>> function "adjust_vect_cost" and "adjust_vectorization_cost".
>>
>> Even without "adjust_vect_cost", I guess it's still good?
> 
> It is an improvement for sure, so it is okay for trunk of course.  It
> still isn't very clear from the name how this would differ from
> adjust_vect_cost, but that _is_ obviously the more generic name, so
> that is good.
> 

Thanks!  To make adjust_vect_cost more meaningful, I just updated it
to adjust_vect_cost_per_loop in the latest version, hope it gets
a bit better.  :-)

BR,
Kewen
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index f2724e792c9..4337fe42147 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5124,7 +5124,7 @@  rs6000_init_cost (struct loop *loop_info)
    compare + branch or compare + isel instructions.  */
 
 static unsigned
-adjust_vectorization_cost (enum vect_cost_for_stmt kind,
+adjust_vect_cost_per_stmt (enum vect_cost_for_stmt kind,
 			   struct _stmt_vec_info *stmt_info)
 {
   if (kind == scalar_stmt && stmt_info && stmt_info->stmt
@@ -5153,7 +5153,7 @@  rs6000_add_stmt_cost (class vec_info *vinfo, void *data, int count,
     {
       int stmt_cost = rs6000_builtin_vectorization_cost (kind, vectype,
 							 misalign);
-      stmt_cost += adjust_vectorization_cost (kind, stmt_info);
+      stmt_cost += adjust_vect_cost_per_stmt (kind, stmt_info);
       /* Statements in an inner loop relative to the loop being
 	 vectorized are weighted more heavily.  The value here is
 	 arbitrary and could potentially be improved with analysis.  */