diff mbox series

[committed] rs6000: Remove typedef for struct rs6000_cost_data

Message ID c5369b69-65c4-f6b4-b72b-8c959a761eb0@linux.ibm.com
State New
Headers show
Series [committed] rs6000: Remove typedef for struct rs6000_cost_data | expand

Commit Message

Kewen.Lin Sept. 13, 2021, 6:42 a.m. UTC
Hi,

This patch follows Segher's suggestion here[1] to get rid of 
the typedef, it's pre-approved as [1].

Bootstrapped and regtested on powerpc64le-linux-gnu Power9.

Pushed to trunk as r12-3468.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579115.html

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

	* config/rs6000/rs6000.c (struct rs6000_cost_data): Remove typedef.
	(rs6000_init_cost): Adjust.

--

Comments

Segher Boessenkool Sept. 13, 2021, 7:22 a.m. UTC | #1
On Mon, Sep 13, 2021 at 02:42:10PM +0800, Kewen.Lin wrote:
> This patch follows Segher's suggestion here[1] to get rid of 
> the typedef, it's pre-approved as [1].

Thanks!


Segher
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b7ea1483da5..39d428db8e6 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -5262,7 +5262,7 @@  rs6000_preferred_simd_mode (scalar_mode mode)
   return word_mode;
 }

-typedef struct _rs6000_cost_data
+struct rs6000_cost_data
 {
   struct loop *loop_info;
   unsigned cost[3];
@@ -5271,7 +5271,7 @@  typedef struct _rs6000_cost_data
   bool vect_nonmem;
   /* Indicates this is costing for the scalar version of a loop or block.  */
   bool costing_for_scalar;
-} rs6000_cost_data;
+};

 /* Test for likely overcommitment of vector hardware resources.  If a
    loop iteration is relatively large, and too large a percentage of
@@ -5337,7 +5337,7 @@  rs6000_density_test (rs6000_cost_data *data)
 static void *
 rs6000_init_cost (struct loop *loop_info, bool costing_for_scalar)
 {
-  rs6000_cost_data *data = XNEW (struct _rs6000_cost_data);
+  rs6000_cost_data *data = XNEW (rs6000_cost_data);
   data->loop_info = loop_info;
   data->cost[vect_prologue] = 0;
   data->cost[vect_body]     = 0;