public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
@ 2014-12-12 15:19 Wilco Dijkstra
  2014-12-16 10:37 ` Marcus Shawcroft
  0 siblings, 1 reply; 2+ messages in thread
From: Wilco Dijkstra @ 2014-12-12 15:19 UTC (permalink / raw)
  To: gcc-patches

Add an override for TARGET_MIN_DIVISIONS_FOR_RECIP_MUL and set the minimum number of divisions to 2.
This gives ~0.5% speedup on SPECFP2000/2006.

OK for trunk?

ChangeLog:
2014-12-13  Wilco Dijkstra  wdijkstr@arm.com

	* gcc/config/aarch64/aarch64.c (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL):
	Define. (aarch64_min_divisions_for_recip_mul): New function.

---
 gcc/config/aarch64/aarch64.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index f2d390b..8c23064 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -462,6 +462,12 @@ static const char * const aarch64_condition_codes[] =
   "hi", "ls", "ge", "lt", "gt", "le", "al", "nv"
 };
 
+static unsigned int
+aarch64_min_divisions_for_recip_mul (enum machine_mode mode ATTRIBUTE_UNUSED)
+{
+  return 2;
+}
+
 static int
 aarch64_reassociation_width (unsigned opc ATTRIBUTE_UNUSED,
 			     enum machine_mode mode)
@@ -11026,6 +11032,9 @@ aarch64_gen_adjusted_ldpstp (rtx *operands, bool load,
 #undef TARGET_MEMORY_MOVE_COST
 #define TARGET_MEMORY_MOVE_COST aarch64_memory_move_cost
 
+#undef TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
+#define TARGET_MIN_DIVISIONS_FOR_RECIP_MUL aarch64_min_divisions_for_recip_mul
+
 #undef TARGET_MUST_PASS_IN_STACK
 #define TARGET_MUST_PASS_IN_STACK must_pass_in_stack_var_size
 
-- 
1.9.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL
  2014-12-12 15:19 [PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL Wilco Dijkstra
@ 2014-12-16 10:37 ` Marcus Shawcroft
  0 siblings, 0 replies; 2+ messages in thread
From: Marcus Shawcroft @ 2014-12-16 10:37 UTC (permalink / raw)
  To: Wilco Dijkstra; +Cc: gcc-patches

On 12 December 2014 at 15:19, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> Add an override for TARGET_MIN_DIVISIONS_FOR_RECIP_MUL and set the minimum number of divisions to 2.
> This gives ~0.5% speedup on SPECFP2000/2006.
>
> OK for trunk?
>
> ChangeLog:
> 2014-12-13  Wilco Dijkstra  wdijkstr@arm.com
>
>         * gcc/config/aarch64/aarch64.c (TARGET_MIN_DIVISIONS_FOR_RECIP_MUL):
>         Define. (aarch64_min_divisions_for_recip_mul): New function.

Ok /Marcus

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-16 10:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-12 15:19 [PATCH][AArch64] Add TARGET_MIN_DIVISIONS_FOR_RECIP_MUL Wilco Dijkstra
2014-12-16 10:37 ` Marcus Shawcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).