Patchwork [ARM] Improve pipeline description for NEON

login
register
mail settings
Submitter Jie Zhang
Date July 14, 2010, 6:26 a.m.
Message ID <4C3D58B3.4090707@codesourcery.com>
Download mbox | patch
Permalink /patch/58851/
State New
Headers show

Comments

Jie Zhang - July 14, 2010, 6:26 a.m.
I found many NEON instructions were using cortex_a8_default in scheduler 
instead of corresponding NEON reservations. The instruction patterns in 
neon.md usually don't set "type" attribute, which will default to "alu". 
Then "cortex_a8_alu" in cortex-a8.md would apply. It's not correct. This 
patch fixes it.

Tested on arm-none-eabi for NEON. Is it OK?

Regards,
Richard Earnshaw - July 14, 2010, 3:21 p.m.
On Wed, 2010-07-14 at 14:26 +0800, Jie Zhang wrote:
> I found many NEON instructions were using cortex_a8_default in scheduler 
> instead of corresponding NEON reservations. The instruction patterns in 
> neon.md usually don't set "type" attribute, which will default to "alu". 
> Then "cortex_a8_alu" in cortex-a8.md would apply. It's not correct. This 
> patch fixes it.
> 
> Tested on arm-none-eabi for NEON. Is it OK?
> 
> Regards,   

>       * config/arm/cortex-a8.md (cortex_a8_alu): Don't use
>         cortex_a8_default when neon_type is not none.

This is OK

R.
Jie Zhang - July 14, 2010, 3:42 p.m.
On 07/14/2010 11:21 PM, Richard Earnshaw wrote:
>
> On Wed, 2010-07-14 at 14:26 +0800, Jie Zhang wrote:
>> I found many NEON instructions were using cortex_a8_default in scheduler
>> instead of corresponding NEON reservations. The instruction patterns in
>> neon.md usually don't set "type" attribute, which will default to "alu".
>> Then "cortex_a8_alu" in cortex-a8.md would apply. It's not correct. This
>> patch fixes it.
>>
>> Tested on arm-none-eabi for NEON. Is it OK?
>>
>> Regards,
>
>>        * config/arm/cortex-a8.md (cortex_a8_alu): Don't use
>>          cortex_a8_default when neon_type is not none.
>
> This is OK
>
Thanks. I have committed it on trunk and 4.5 branch.

Patch


	* config/arm/cortex-a8.md (cortex_a8_alu): Don't use
	cortex_a8_default when neon_type is not none.

Index: config/arm/cortex-a8.md
===================================================================
--- config/arm/cortex-a8.md	(revision 162168)
+++ config/arm/cortex-a8.md	(working copy)
@@ -87,8 +87,9 @@ 
 ;; (source read in E2 and destination available at the end of that cycle).
 (define_insn_reservation "cortex_a8_alu" 2
   (and (eq_attr "tune" "cortexa8")
-       (ior (and (eq_attr "type" "alu")
-                (not (eq_attr "insn" "mov,mvn")))
+       (ior (and (and (eq_attr "type" "alu")
+		      (eq_attr "neon_type" "none"))
+		 (not (eq_attr "insn" "mov,mvn")))
             (eq_attr "insn" "clz")))
   "cortex_a8_default")