Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2015-04-23 Thread Kyrill Tkachov


On 14/04/15 20:09, Ramana Radhakrishnan wrote:

On Mon, Apr 13, 2015 at 2:49 PM, Kyrill Tkachov kyrylo.tkac...@arm.com wrote:

Hi all,

This is an update to
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html,
rebased on top of the new cores that went in since that time.

It's just a refactoring.

Bootstrapped and tested on arm-linux.

Ok for trunk (to commit after GCC 5 release)?

Ok - but hold off till 5.1 is released.


Thanks, I've committed this with r222356.

Kyrill



Thanks for the cleanup.

Ramana


Thanks,
Kyrill

2015-04-13  Kyrylo Tkachov  kyrylo.tkac...@arm.com

 * config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
 * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
 arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
 arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
 arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
 arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
 arm_fa726te_tune arm_cortex_a5_tune, arm_xgene1_tune):
 Specify issue_rate value.
 (arm_issue_rate): Look up issue rate from tuning structs. Remove
 large switch statement.
 (arm_marvell_pj4_tune): New struct.
 * config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
 struct.




Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2015-04-14 Thread Ramana Radhakrishnan
On Mon, Apr 13, 2015 at 2:49 PM, Kyrill Tkachov kyrylo.tkac...@arm.com wrote:
 Hi all,

 This is an update to
 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html,
 rebased on top of the new cores that went in since that time.

 It's just a refactoring.

 Bootstrapped and tested on arm-linux.

 Ok for trunk (to commit after GCC 5 release)?

Ok - but hold off till 5.1 is released.

Thanks for the cleanup.

Ramana


 Thanks,
 Kyrill

 2015-04-13  Kyrylo Tkachov  kyrylo.tkac...@arm.com

 * config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
 * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
 arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
 arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
 arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
 arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
 arm_fa726te_tune arm_cortex_a5_tune, arm_xgene1_tune):
 Specify issue_rate value.
 (arm_issue_rate): Look up issue rate from tuning structs. Remove
 large switch statement.
 (arm_marvell_pj4_tune): New struct.
 * config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
 struct.


[PATCH][ARM] Make issue rate part of per-core tuning structs

2015-04-13 Thread Kyrill Tkachov

Hi all,

This is an update to https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html,
rebased on top of the new cores that went in since that time.

It's just a refactoring.

Bootstrapped and tested on arm-linux.

Ok for trunk (to commit after GCC 5 release)?

Thanks,
Kyrill

2015-04-13  Kyrylo Tkachov  kyrylo.tkac...@arm.com

* config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
* config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
arm_fa726te_tune arm_cortex_a5_tune, arm_xgene1_tune):
Specify issue_rate value.
(arm_issue_rate): Look up issue rate from tuning structs. Remove
large switch statement.
(arm_marvell_pj4_tune): New struct.
* config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
struct.
commit ff6b444a330ab084834a6baa3f1ee67a029c5a7c
Author: Kyrylo Tkachov kyrylo.tkac...@arm.com
Date:   Fri Jan 16 16:51:25 2015 +

[ARM] Refactor issue_rate

diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
index 7ade8a1..103c314 100644
--- a/gcc/config/arm/arm-cores.def
+++ b/gcc/config/arm/arm-cores.def
@@ -158,7 +158,7 @@ ARM_CORE(cortex-r7,		cortexr7, cortexr7,		7R,  FL_LDSCHED | FL_ARM_DIV, cortex
 ARM_CORE(cortex-m7,		cortexm7, cortexm7,		7EM, FL_LDSCHED | FL_NO_VOLATILE_CE, cortex_m7)
 ARM_CORE(cortex-m4,		cortexm4, cortexm4,		7EM, FL_LDSCHED, v7m)
 ARM_CORE(cortex-m3,		cortexm3, cortexm3,		7M,  FL_LDSCHED, v7m)
-ARM_CORE(marvell-pj4,		marvell_pj4, marvell_pj4,	7A,  FL_LDSCHED, 9e)
+ARM_CORE(marvell-pj4,		marvell_pj4, marvell_pj4,	7A,  FL_LDSCHED, marvell_pj4)
 
 /* V7 big.LITTLE implementations */
 ARM_CORE(cortex-a15.cortex-a7, cortexa15cortexa7, cortexa7,	7A,  FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV, cortex_a15)
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index 16eb854..e2a0ccd 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -303,6 +303,8 @@ struct tune_params
   unsigned int fuseable_ops;
   /* Depth of scheduling queue to check for L2 autoprefetcher.  */
   enum arm_sched_autopref sched_autopref;
+  /* Issue rate of the processor.  */
+  unsigned int issue_rate;
 };
 
 extern const struct tune_params *current_tune;
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 0466399..1f4a9f0 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1699,7 +1699,8 @@ const struct tune_params arm_slowmul_tune =
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
   ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
-  ARM_SCHED_AUTOPREF_OFF			/* Sched L2 autopref.  */
+  ARM_SCHED_AUTOPREF_OFF,			/* Sched L2 autopref.  */
+  1		/* Issue rate.  */
 };
 
 const struct tune_params arm_fastmul_tune =
@@ -1720,7 +1721,8 @@ const struct tune_params arm_fastmul_tune =
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
   ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
-  ARM_SCHED_AUTOPREF_OFF			/* Sched L2 autopref.  */
+  ARM_SCHED_AUTOPREF_OFF,			/* Sched L2 autopref.  */
+  1		/* Issue rate.  */
 };
 
 /* StrongARM has early execution of branches, so a sequence that is worth
@@ -1744,7 +1746,8 @@ const struct tune_params arm_strongarm_tune =
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
   ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
-  ARM_SCHED_AUTOPREF_OFF			/* Sched L2 autopref.  */
+  ARM_SCHED_AUTOPREF_OFF,			/* Sched L2 autopref.  */
+  1		/* Issue rate.  */
 };
 
 const struct tune_params arm_xscale_tune =
@@ -1765,7 +1768,8 @@ const struct tune_params arm_xscale_tune =
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
   ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
-  ARM_SCHED_AUTOPREF_OFF			/* Sched L2 autopref.  */
+  ARM_SCHED_AUTOPREF_OFF,			/* Sched L2 autopref.  */
+  1		/* Issue rate.  */
 };
 
 const struct tune_params arm_9e_tune =
@@ -1786,7 +1790,30 @@ const struct tune_params arm_9e_tune =
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
   ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
-  ARM_SCHED_AUTOPREF_OFF			/* Sched L2 autopref.  */
+  ARM_SCHED_AUTOPREF_OFF,			/* Sched L2 autopref.  */
+  1		/* Issue rate.  */
+};
+
+const struct tune_params arm_marvell_pj4_tune =
+{
+  arm_9e_rtx_costs,
+  NULL,
+  NULL,		/* Sched adj cost.  */
+  1,		/* Constant limit.  */
+  5,		/* Max cond insns.  */
+  ARM_PREFETCH_NOT_BENEFICIAL,
+  true,		/* Prefer constant pool.  */
+  arm_default_branch_cost,
+  false,	/* Prefer 

Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2015-01-16 Thread Kyrill Tkachov

Hi,

This is a ping and a question.
Now that the xgene1 support has gone in, is it ok if I update this patch 
to include the xgene tuning struct? Will it still be acceptable for GCC5?


Thanks,
Kyrill


On 09/01/15 11:32, Kyrill Tkachov wrote:

Ping.

Thanks,
Kyrill
On 12/12/14 13:57, Kyrill Tkachov wrote:

Ping (after the macro fusion patch)...
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html

Thanks,
Kyrill
On 20/11/14 16:48, Kyrill Tkachov wrote:

I should say that the patch context depends on the macro fusion hook
implementation posted here:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00958.html

Kyrill

On 20/11/14 16:43, Kyrill Tkachov wrote:

Hi all,

This patch makes the arm_issue_rate function lookup the issue rate of
the process from the tuning structs.
This makes it look more like the aarch64 mechanism and centralises a
processor-specific construct to the
tuning structs, thus not forcing us to remember to update the
arm_issue_rate function every time a new core
is added.

A new tuning struct is added for the marvell-pj4 in order to decouple it
from the 9e tuning struct and
enable us to set it's correct issue rate to 2.

Bootstrapped and tested on arm-none-gnueabihf.

Ok for trunk?

Thanks,
Kyrill

2014-11-19  Kyrylo Tkachov  kyrylo.tkac...@arm.com

 * config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
 * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
 arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
 arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
 arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
 arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
 arm_fa726te_tune arm_cortex_a5_tune): Specify issue_rate value.
 (arm_issue_rate): Look up issue rate from tuning structs. Remove
 large switch statement.
 (arm_marvell_pj4_tune): New struct.
 * config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
 struct.










Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2015-01-16 Thread Richard Earnshaw
On 16/01/15 13:46, Kyrill Tkachov wrote:
 Hi,
 
 This is a ping and a question.
 Now that the xgene1 support has gone in, is it ok if I update this patch 
 to include the xgene tuning struct? Will it still be acceptable for GCC5?
 

In principle, that should be OK.  It's just work to make the patch work
with the latest version of the compiler.

Get it re-submitted quickly though.

R.

 Thanks,
 Kyrill
 
 
 On 09/01/15 11:32, Kyrill Tkachov wrote:
 Ping.

 Thanks,
 Kyrill
 On 12/12/14 13:57, Kyrill Tkachov wrote:
 Ping (after the macro fusion patch)...
 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html

 Thanks,
 Kyrill
 On 20/11/14 16:48, Kyrill Tkachov wrote:
 I should say that the patch context depends on the macro fusion hook
 implementation posted here:
 https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00958.html

 Kyrill

 On 20/11/14 16:43, Kyrill Tkachov wrote:
 Hi all,

 This patch makes the arm_issue_rate function lookup the issue rate of
 the process from the tuning structs.
 This makes it look more like the aarch64 mechanism and centralises a
 processor-specific construct to the
 tuning structs, thus not forcing us to remember to update the
 arm_issue_rate function every time a new core
 is added.

 A new tuning struct is added for the marvell-pj4 in order to decouple it
 from the 9e tuning struct and
 enable us to set it's correct issue rate to 2.

 Bootstrapped and tested on arm-none-gnueabihf.

 Ok for trunk?

 Thanks,
 Kyrill

 2014-11-19  Kyrylo Tkachov  kyrylo.tkac...@arm.com

  * config/arm/arm-protos.h (struct tune_params): Add issue_rate 
 field.
  * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
  arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
  arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
  arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
  arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, 
 arm_v6m_tune,
  arm_fa726te_tune arm_cortex_a5_tune): Specify issue_rate value.
  (arm_issue_rate): Look up issue rate from tuning structs. Remove
  large switch statement.
  (arm_marvell_pj4_tune): New struct.
  * config/arm/arm-cores.def (marvell-pj4): Use 
 arm_marvell_pj4_tune
  struct.



 




Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2015-01-09 Thread Kyrill Tkachov

Ping.

Thanks,
Kyrill
On 12/12/14 13:57, Kyrill Tkachov wrote:

Ping (after the macro fusion patch)...
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html

Thanks,
Kyrill
On 20/11/14 16:48, Kyrill Tkachov wrote:

I should say that the patch context depends on the macro fusion hook
implementation posted here:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00958.html

Kyrill

On 20/11/14 16:43, Kyrill Tkachov wrote:

Hi all,

This patch makes the arm_issue_rate function lookup the issue rate of
the process from the tuning structs.
This makes it look more like the aarch64 mechanism and centralises a
processor-specific construct to the
tuning structs, thus not forcing us to remember to update the
arm_issue_rate function every time a new core
is added.

A new tuning struct is added for the marvell-pj4 in order to decouple it
from the 9e tuning struct and
enable us to set it's correct issue rate to 2.

Bootstrapped and tested on arm-none-gnueabihf.

Ok for trunk?

Thanks,
Kyrill

2014-11-19  Kyrylo Tkachov  kyrylo.tkac...@arm.com

* config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
* config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
arm_fa726te_tune arm_cortex_a5_tune): Specify issue_rate value.
(arm_issue_rate): Look up issue rate from tuning structs. Remove
large switch statement.
(arm_marvell_pj4_tune): New struct.
* config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
struct.










Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2014-12-12 Thread Kyrill Tkachov

Ping (after the macro fusion patch)...
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg02706.html

Thanks,
Kyrill
On 20/11/14 16:48, Kyrill Tkachov wrote:

I should say that the patch context depends on the macro fusion hook
implementation posted here:
https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00958.html

Kyrill

On 20/11/14 16:43, Kyrill Tkachov wrote:

Hi all,

This patch makes the arm_issue_rate function lookup the issue rate of
the process from the tuning structs.
This makes it look more like the aarch64 mechanism and centralises a
processor-specific construct to the
tuning structs, thus not forcing us to remember to update the
arm_issue_rate function every time a new core
is added.

A new tuning struct is added for the marvell-pj4 in order to decouple it
from the 9e tuning struct and
enable us to set it's correct issue rate to 2.

Bootstrapped and tested on arm-none-gnueabihf.

Ok for trunk?

Thanks,
Kyrill

2014-11-19  Kyrylo Tkachov  kyrylo.tkac...@arm.com

   * config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
   * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
   arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
   arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
   arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
   arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
   arm_fa726te_tune arm_cortex_a5_tune): Specify issue_rate value.
   (arm_issue_rate): Look up issue rate from tuning structs. Remove
   large switch statement.
   (arm_marvell_pj4_tune): New struct.
   * config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
   struct.








[PATCH][ARM] Make issue rate part of per-core tuning structs

2014-11-20 Thread Kyrill Tkachov

Hi all,

This patch makes the arm_issue_rate function lookup the issue rate of 
the process from the tuning structs.
This makes it look more like the aarch64 mechanism and centralises a 
processor-specific construct to the
tuning structs, thus not forcing us to remember to update the 
arm_issue_rate function every time a new core

is added.

A new tuning struct is added for the marvell-pj4 in order to decouple it 
from the 9e tuning struct and

enable us to set it's correct issue rate to 2.

Bootstrapped and tested on arm-none-gnueabihf.

Ok for trunk?

Thanks,
Kyrill

2014-11-19  Kyrylo Tkachov  kyrylo.tkac...@arm.com

* config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
* config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
arm_fa726te_tune arm_cortex_a5_tune): Specify issue_rate value.
(arm_issue_rate): Look up issue rate from tuning structs. Remove
large switch statement.
(arm_marvell_pj4_tune): New struct.
* config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
struct.commit a2466d31869cd7edd0a9de14d96427d361d97dd7
Author: Kyrylo Tkachov kyrylo.tkac...@arm.com
Date:   Wed Nov 19 16:24:03 2014 +

[ARM] refactor issue_rate

diff --git a/gcc/config/arm/arm-cores.def b/gcc/config/arm/arm-cores.def
index 637be15..12625c7 100644
--- a/gcc/config/arm/arm-cores.def
+++ b/gcc/config/arm/arm-cores.def
@@ -158,7 +158,7 @@ ARM_CORE(cortex-r7,		cortexr7, cortexr7,		7R,  FL_LDSCHED | FL_ARM_DIV, cortex
 ARM_CORE(cortex-m7,		cortexm7, cortexm7,		7EM, FL_LDSCHED, cortex_m7)
 ARM_CORE(cortex-m4,		cortexm4, cortexm4,		7EM, FL_LDSCHED, v7m)
 ARM_CORE(cortex-m3,		cortexm3, cortexm3,		7M,  FL_LDSCHED, v7m)
-ARM_CORE(marvell-pj4,		marvell_pj4, marvell_pj4,	7A,  FL_LDSCHED, 9e)
+ARM_CORE(marvell-pj4,		marvell_pj4, marvell_pj4,	7A,  FL_LDSCHED, marvell_pj4)
 
 /* V7 big.LITTLE implementations */
 ARM_CORE(cortex-a15.cortex-a7, cortexa15cortexa7, cortexa7,	7A,  FL_LDSCHED | FL_THUMB_DIV | FL_ARM_DIV, cortex_a15)
diff --git a/gcc/config/arm/arm-protos.h b/gcc/config/arm/arm-protos.h
index 71ce362..7d5bfd3 100644
--- a/gcc/config/arm/arm-protos.h
+++ b/gcc/config/arm/arm-protos.h
@@ -291,6 +291,8 @@ struct tune_params
   int max_insns_inline_memset;
   /* Bitfield encoding the fuseable pairs of instructions.  */
   unsigned int fuseable_ops : 1;
+  /* Issue rate of the processor.  */
+  unsigned int issue_rate;
 };
 
 extern const struct tune_params *current_tune;
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 9aa402f..94db2b2 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1671,7 +1671,8 @@ const struct tune_params arm_slowmul_tune =
   false, false, /* Prefer 32-bit encodings.  */
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
-  ARM_FUSE_NOTHING/* Fuseable pairs of instructions.  */
+  ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
+  1		/* Issue rate.  */
 };
 
 const struct tune_params arm_fastmul_tune =
@@ -1691,7 +1692,8 @@ const struct tune_params arm_fastmul_tune =
   false, false, /* Prefer 32-bit encodings.  */
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
-  ARM_FUSE_NOTHING/* Fuseable pairs of instructions.  */
+  ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
+  1		/* Issue rate.  */
 };
 
 /* StrongARM has early execution of branches, so a sequence that is worth
@@ -1714,7 +1716,8 @@ const struct tune_params arm_strongarm_tune =
   false, false, /* Prefer 32-bit encodings.  */
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
-  ARM_FUSE_NOTHING/* Fuseable pairs of instructions.  */
+  ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
+  1		/* Issue rate.  */
 };
 
 const struct tune_params arm_xscale_tune =
@@ -1734,7 +1737,8 @@ const struct tune_params arm_xscale_tune =
   false, false, /* Prefer 32-bit encodings.  */
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
-  ARM_FUSE_NOTHING/* Fuseable pairs of instructions.  */
+  ARM_FUSE_NOTHING,/* Fuseable pairs of instructions.  */
+  1		/* Issue rate.  */
 };
 
 const struct tune_params arm_9e_tune =
@@ -1754,7 +1758,29 @@ const struct tune_params arm_9e_tune =
   false, false, /* Prefer 32-bit encodings.  */
   false,	/* Prefer Neon for stringops.  */
   8,		/* Maximum insns to inline memset.  */
-  ARM_FUSE_NOTHING/* Fuseable pairs of instructions.  */
+  

Re: [PATCH][ARM] Make issue rate part of per-core tuning structs

2014-11-20 Thread Kyrill Tkachov
I should say that the patch context depends on the macro fusion hook 
implementation posted here:

https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00958.html

Kyrill

On 20/11/14 16:43, Kyrill Tkachov wrote:

Hi all,

This patch makes the arm_issue_rate function lookup the issue rate of
the process from the tuning structs.
This makes it look more like the aarch64 mechanism and centralises a
processor-specific construct to the
tuning structs, thus not forcing us to remember to update the
arm_issue_rate function every time a new core
is added.

A new tuning struct is added for the marvell-pj4 in order to decouple it
from the 9e tuning struct and
enable us to set it's correct issue rate to 2.

Bootstrapped and tested on arm-none-gnueabihf.

Ok for trunk?

Thanks,
Kyrill

2014-11-19  Kyrylo Tkachov  kyrylo.tkac...@arm.com

  * config/arm/arm-protos.h (struct tune_params): Add issue_rate field.
  * config/arm/arm.c (arm_slowmul_tune, arm_fastmul_tune,
  arm_strongarm_tune, arm_xscale_tune, arm_9e_tune, arm_v6t2_tune,
  arm_cortex_tune, arm_cortex_a8_tune, arm_cortex_a7_tune,
  arm_cortex_a15_tune, arm_cortex_a53_tune, arm_cortex_a57_tune,
  arm_cortex_a9_tune, arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune,
  arm_fa726te_tune arm_cortex_a5_tune): Specify issue_rate value.
  (arm_issue_rate): Look up issue rate from tuning structs. Remove
  large switch statement.
  (arm_marvell_pj4_tune): New struct.
  * config/arm/arm-cores.def (marvell-pj4): Use arm_marvell_pj4_tune
  struct.