diff mbox

[AArch64] Prevent generic pipeline description from dominating other pipeline descriptions.

Message ID 1378801388-2131-1-git-send-email-james.greenhalgh@arm.com
State New
Headers show

Commit Message

James Greenhalgh Sept. 10, 2013, 8:23 a.m. UTC
Hi,

Looking at the way we handle the generic scheduler in AArch64, the order
of includes suggests that we will always match to the generic unit, even
when tuning for a non-generic pipeline.

This patch explicitly prevents that by defining a "generic_sched" attribute,
which is only true when the generic scheduler should be used. We could
probably get away with just including the generic scheduler last in the
list of pipeline descriptions, but this solution is more robust and
prevents us from erroneously using the generic scheduler units where we
would otherwise return "nothing".

Regression tested on aarch64-none-elf with no regressions.

OK?

Thanks,
James

---
2013-09-10  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.md (generic_sched): New.
	* config/aarch64/aarch64-generic.md (load): Make conditional
	on generic_sched attribute.
	(nonload): Likewise.

Comments

Marcus Shawcroft Sept. 10, 2013, 12:51 p.m. UTC | #1
On 10 September 2013 09:23, James Greenhalgh <james.greenhalgh@arm.com> wrote:

> 2013-09-10  James Greenhalgh  <james.greenhalgh@arm.com>
>
>         * config/aarch64/aarch64.md (generic_sched): New.
>         * config/aarch64/aarch64-generic.md (load): Make conditional
>         on generic_sched attribute.
>         (nonload): Likewise.

OK
/Marcus
diff mbox

Patch

diff --git a/gcc/config/aarch64/aarch64-generic.md b/gcc/config/aarch64/aarch64-generic.md
index cbb75600389efe69f16dd30837ad02b2b254232e..12faac84348c72c44c1c144d268ea9751a0665ac 100644
--- a/gcc/config/aarch64/aarch64-generic.md
+++ b/gcc/config/aarch64/aarch64-generic.md
@@ -30,9 +30,11 @@  (define_attr "is_load" "yes,no"
 	(const_string "no")))
 
 (define_insn_reservation "load" 2
-  (eq_attr "is_load" "yes")
+  (and (eq_attr "generic_sched" "yes")
+       (eq_attr "is_load" "yes"))
   "core")
 
 (define_insn_reservation "nonload" 1
-  (eq_attr "is_load" "no")
+  (and (eq_attr "generic_sched" "yes")
+       (eq_attr "is_load" "no"))
   "core")
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index f37f98f9994bb773785d8573a7efd1e625b5e23a..b56254dbbd78aae9f135b1aeabcf7c43f0f5fd84 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -308,6 +308,14 @@  (define_attr "enabled" "no,yes"
 ;; Processor types.
 (include "aarch64-tune.md")
 
+;; True if the generic scheduling description should be used.
+
+(define_attr "generic_sched" "yes,no"
+  (const (if_then_else
+          (eq_attr "tune" "large,small,cortexa53")
+          (const_string "no")
+          (const_string "yes"))))
+
 ;; Scheduling
 (include "aarch64-generic.md")
 (include "large.md")