public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM] Reduce size of arm1020e automaton
@ 2016-02-29 16:08 Kyrill Tkachov
  2016-03-21 10:56 ` Ramana Radhakrishnan
  0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2016-02-29 16:08 UTC (permalink / raw)
  To: GCC Patches; +Cc: Richard Earnshaw, Ramana Radhakrishnan

[-- Attachment #1: Type: text/plain, Size: 803 bytes --]

Hi all,

I've had this one sitting in my tree for some time.
The arm1020e automaton has no business being as large as it is (3185 states).
Most of the bloat is due to overly large reservation durations for calls and FP division.

This patch reduces the durations to something more sensible.
This brings down the number of states from 3185 states to 320 states.
There are bigger fish to fry on that front, but every little bit helps as we're
already approaching a gigabyte of memory required for genautomata processing.

Bootstrapped and tested on arm-none-linux-gnueabihf.

Ok for trunk or GCC 7?

Thanks,
Kyrill

2016-02-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/arm/arm1020e.md (1020call_op): Reduce reservation
     duration.
     (v10_fdivs): Likewise.
     (v10_fdivd): Likewise.

[-- Attachment #2: arm1020e.patch --]
[-- Type: text/x-patch, Size: 1339 bytes --]

diff --git a/gcc/config/arm/arm1020e.md b/gcc/config/arm/arm1020e.md
index 7cdab57ddb34346fa21f2935d2bc29c4f0b827d8..84a300d804541d63e82c08f517f4af136df2d642 100644
--- a/gcc/config/arm/arm1020e.md
+++ b/gcc/config/arm/arm1020e.md
@@ -246,13 +246,14 @@ (define_insn_reservation "1020branch_op" 0
       (eq_attr "type" "branch"))
  "1020a_e")
 
-;; The latency for a call is not predictable.  Therefore, we use 32 as
-;; roughly equivalent to positive infinity.
+;; The latency for a call is not predictable.  Therefore, we model as blocking
+;; execution for a number of cycles but we can't do anything more accurate
+;; than that.
 
 (define_insn_reservation "1020call_op" 32
  (and (eq_attr "tune" "arm1020e,arm1022e")
       (eq_attr "type" "call"))
- "1020a_e*32")
+ "1020a_e*4")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; VFP
@@ -300,12 +301,12 @@ (define_insn_reservation "v10_fmul" 6
 (define_insn_reservation "v10_fdivs" 18
  (and (eq_attr "vfp10" "yes")
       (eq_attr "type" "fdivs, fsqrts"))
- "1020a_e+v10_ds*14")
+ "1020a_e+v10_ds*4")
 
 (define_insn_reservation "v10_fdivd" 32
  (and (eq_attr "vfp10" "yes")
       (eq_attr "type" "fdivd, fsqrtd"))
- "1020a_e+v10_fmac+v10_ds*28")
+ "1020a_e+v10_fmac+v10_ds*4")
 
 (define_insn_reservation "v10_floads" 4
  (and (eq_attr "vfp10" "yes")

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

* Re: [PATCH][ARM] Reduce size of arm1020e automaton
  2016-02-29 16:08 [PATCH][ARM] Reduce size of arm1020e automaton Kyrill Tkachov
@ 2016-03-21 10:56 ` Ramana Radhakrishnan
  0 siblings, 0 replies; 2+ messages in thread
From: Ramana Radhakrishnan @ 2016-03-21 10:56 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Richard Earnshaw, Ramana Radhakrishnan

On Mon, Feb 29, 2016 at 4:08 PM, Kyrill Tkachov
<kyrylo.tkachov@foss.arm.com> wrote:
> Hi all,
>
> I've had this one sitting in my tree for some time.
> The arm1020e automaton has no business being as large as it is (3185
> states).
> Most of the bloat is due to overly large reservation durations for calls and
> FP division.
>
> This patch reduces the durations to something more sensible.
> This brings down the number of states from 3185 states to 320 states.
> There are bigger fish to fry on that front, but every little bit helps as
> we're
> already approaching a gigabyte of memory required for genautomata
> processing.
>
> Bootstrapped and tested on arm-none-linux-gnueabihf.
>
> Ok for trunk or GCC 7?
>
> Thanks,
> Kyrill
>
> 2016-02-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>     * config/arm/arm1020e.md (1020call_op): Reduce reservation
>     duration.
>     (v10_fdivs): Likewise.
>     (v10_fdivd): Likewise.


OK for trunk.

Ramana

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

end of thread, other threads:[~2016-03-21 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 16:08 [PATCH][ARM] Reduce size of arm1020e automaton Kyrill Tkachov
2016-03-21 10:56 ` Ramana Radhakrishnan

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).