[arm][aarch64] Make no_insn issue to nothing
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 17 Sep 2019 17:00:58 +0000 (17:00 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 17 Sep 2019 17:00:58 +0000 (17:00 +0000)
no_insn is documented as:

  an insn which does not represent an instruction in the final output,
  thus having no impact on scheduling.

and is used in that way by the arm port (e.g. for define_insns that
expand to comments).  However, most scheduling descriptions instead
assigned units to no_insn patterns, in some cases treating them as more
expensive than a plain move.

This patch removes the no_insn handling from individual scheduling
descriptions and uses a common define_insn_reservation for all CPUs.

2019-09-17  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/arm/types.md (no_reservation): New reservation.
* config/aarch64/falkor.md (falkor_other_0_nothing): Don't handle
no_insn here.
* config/aarch64/saphira.md (saphira_other_0_nothing): Likewise.
* config/aarch64/thunderx2t99.md (thunderx2t99_nothing): Likewise.
* config/aarch64/tsv110.md (tsv110_alu): Likewise.
* config/arm/arm1020e.md (1020alu_op): Likewise.
* config/arm/arm1026ejs.md (alu_op): Likewise.
* config/arm/arm1136jfs.md (11_alu_op): Likewise.
* config/arm/arm926ejs.md (9_alu_op): Likewise.
* config/arm/cortex-a15.md (cortex_a15_alu): Likewise.
* config/arm/cortex-a17.md (cortex_a17_alu): Likewise.
* config/arm/cortex-a5.md (cortex_a5_alu): Likewise.
* config/arm/cortex-a53.md (cortex_a53_alu): Likewise.
* config/arm/cortex-a57.md (cortex_a57_alu): Likewise.
* config/arm/cortex-a7.md (cortex_a7_alu_shift): Likewise.
* config/arm/cortex-a8.md (cortex_a8_alu): Likewise.
* config/arm/cortex-a9.md (cortex_a9_dp): Likewise.
* config/arm/cortex-m4.md (cortex_m4_alu): Likewise.
* config/arm/cortex-m7.md (cortex_m7_alu_simple): Likewise.
* config/arm/cortex-r4.md (cortex_r4_alu_shift_reg): Likewise.
* config/arm/fa526.md (526_alu_op): Likewise.
* config/arm/fa606te.md (606te_alu_op): Likewise.
* config/arm/fa626te.md (626te_alu_op): Likewise.
* config/arm/fa726te.md (726te_alu_op): Likewise.
* config/arm/xgene1.md (xgene1_nop): Likewise.

From-SVN: r275807

26 files changed:
gcc/ChangeLog
gcc/config/aarch64/falkor.md
gcc/config/aarch64/saphira.md
gcc/config/aarch64/thunderx2t99.md
gcc/config/aarch64/tsv110.md
gcc/config/arm/arm1020e.md
gcc/config/arm/arm1026ejs.md
gcc/config/arm/arm1136jfs.md
gcc/config/arm/arm926ejs.md
gcc/config/arm/cortex-a15.md
gcc/config/arm/cortex-a17.md
gcc/config/arm/cortex-a5.md
gcc/config/arm/cortex-a53.md
gcc/config/arm/cortex-a57.md
gcc/config/arm/cortex-a7.md
gcc/config/arm/cortex-a8.md
gcc/config/arm/cortex-a9.md
gcc/config/arm/cortex-m4.md
gcc/config/arm/cortex-m7.md
gcc/config/arm/cortex-r4.md
gcc/config/arm/fa526.md
gcc/config/arm/fa606te.md
gcc/config/arm/fa626te.md
gcc/config/arm/fa726te.md
gcc/config/arm/types.md
gcc/config/arm/xgene1.md

index b0a11853583f05a8ef9644c3fefb064aa80ade4c..26d061909ca56a05236e8113ec5308ab2bf8911c 100644 (file)
@@ -1,3 +1,32 @@
+2019-09-17  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * config/arm/types.md (no_reservation): New reservation.
+       * config/aarch64/falkor.md (falkor_other_0_nothing): Don't handle
+       no_insn here.
+       * config/aarch64/saphira.md (saphira_other_0_nothing): Likewise.
+       * config/aarch64/thunderx2t99.md (thunderx2t99_nothing): Likewise.
+       * config/aarch64/tsv110.md (tsv110_alu): Likewise.
+       * config/arm/arm1020e.md (1020alu_op): Likewise.
+       * config/arm/arm1026ejs.md (alu_op): Likewise.
+       * config/arm/arm1136jfs.md (11_alu_op): Likewise.
+       * config/arm/arm926ejs.md (9_alu_op): Likewise.
+       * config/arm/cortex-a15.md (cortex_a15_alu): Likewise.
+       * config/arm/cortex-a17.md (cortex_a17_alu): Likewise.
+       * config/arm/cortex-a5.md (cortex_a5_alu): Likewise.
+       * config/arm/cortex-a53.md (cortex_a53_alu): Likewise.
+       * config/arm/cortex-a57.md (cortex_a57_alu): Likewise.
+       * config/arm/cortex-a7.md (cortex_a7_alu_shift): Likewise.
+       * config/arm/cortex-a8.md (cortex_a8_alu): Likewise.
+       * config/arm/cortex-a9.md (cortex_a9_dp): Likewise.
+       * config/arm/cortex-m4.md (cortex_m4_alu): Likewise.
+       * config/arm/cortex-m7.md (cortex_m7_alu_simple): Likewise.
+       * config/arm/cortex-r4.md (cortex_r4_alu_shift_reg): Likewise.
+       * config/arm/fa526.md (526_alu_op): Likewise.
+       * config/arm/fa606te.md (606te_alu_op): Likewise.
+       * config/arm/fa626te.md (626te_alu_op): Likewise.
+       * config/arm/fa726te.md (726te_alu_op): Likewise.
+       * config/arm/xgene1.md (xgene1_nop): Likewise.
+
 2019-09-17  Richard Sandiford  <richard.sandiford@arm.com>
 
        * config/arm/thumb1.md (*thumb1_tablejump): Change type from
index 41955af814d8d3f870d680735134ca218994b0ec..2bcc661e5f09fe26b8433b9646a44d019d57a864 100644 (file)
 
 (define_insn_reservation "falkor_other_0_nothing" 0
   (and (eq_attr "tune" "falkor")
-       (eq_attr "type" "no_insn,trap,block"))
+       (eq_attr "type" "trap,block"))
   "nothing")
 
 (define_insn_reservation "falkor_other_2_z" 2
index 853deeef02a4f35328ffaee87496bbd38d678627..3cc7bc41074ce4658b1aaa10b788f50b234d27f0 100644 (file)
 
 (define_insn_reservation "saphira_other_0_nothing" 0
   (and (eq_attr "tune" "saphira")
-       (eq_attr "type" "no_insn,trap,block"))
+       (eq_attr "type" "trap,block"))
   "nothing")
 
 (define_insn_reservation "saphira_other_2_ld" 2
index c43c39ecdc8d7074c59c898677843e0d1f1ff63d..bb6e0abb03c0a774a916e0f63c04991a020d3f54 100644 (file)
@@ -74,7 +74,7 @@
 
 (define_insn_reservation "thunderx2t99_nothing" 0
   (and (eq_attr "tune" "thunderx2t99")
-       (eq_attr "type" "no_insn,block"))
+       (eq_attr "type" "block"))
   "nothing")
 
 (define_insn_reservation "thunderx2t99_mrs" 0
index 680c48a68c57438c933313fefa5645e69c27fa70..f20055dae08cd9513ffdf015e4635f5dfe378252 100644 (file)
                        shift_imm,shift_reg,\
                        mov_imm,mov_reg,\
                        mvn_imm,mvn_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
   "tsv110_alu1|tsv110_alu2|tsv110_alu3")
   
 (define_insn_reservation "tsv110_alus" 1
index b835cbaaa68bfdf401d634f905fc7a0c1a5cce93..c4c038b04c4e19d375de0906d98723324ce8d7c4 100644 (file)
@@ -72,7 +72,7 @@
                        adr,bfm,rev,\
                        shift_imm,shift_reg,\
                        mov_imm,mov_reg,mvn_imm,mvn_reg,\
-                       multiple,no_insn"))
+                       multiple"))
  "1020a_e,1020a_m,1020a_w")
 
 ;; ALU operations with a shift-by-constant operand
index 05f4d724f5785e138f2fb55f6de54173be146fc3..88546872a118cb6b6ef3dae69b15d9f79e66c9ba 100644 (file)
@@ -72,7 +72,7 @@
                        adr,bfm,rev,\
                        shift_imm,shift_reg,\
                        mov_imm,mov_reg,mvn_imm,mvn_reg,\
-                       multiple,no_insn"))
+                       multiple"))
  "a_e,a_m,a_w")
 
 ;; ALU operations with a shift-by-constant operand
index ae0b54f5e3dfdb48dfdf1c3a006c1e5a8a95c2df..e7fd53afe33f99d19714be7fe6c577089d621371 100644 (file)
@@ -81,7 +81,7 @@
                        adr,bfm,rev,\
                        shift_imm,shift_reg,\
                        mov_imm,mov_reg,mvn_imm,mvn_reg,\
-                       multiple,no_insn"))
+                       multiple"))
  "e_1,e_2,e_3,e_wb")
 
 ;; ALU operations with a shift-by-constant operand
index db4c7db8c812bf9a6819a4cdd044af11d18017d7..b4f503159988aea376aa85b3308b6324e2a29d1e 100644 (file)
@@ -67,7 +67,7 @@
                        shift_imm,shift_reg,extend,\
                        mov_imm,mov_reg,mov_shift,\
                        mvn_imm,mvn_reg,mvn_shift,\
-                       multiple,no_insn"))
+                       multiple"))
  "e,m,w")
 
 ;; ALU operations with a shift-by-register operand
index f57f98675e7230ce4d99eb05f87e68c9322b47ed..26765c3db9c981f426646b914229be8dbb302c89 100644 (file)
@@ -68,7 +68,7 @@
                         shift_imm,shift_reg,\
                         mov_imm,mov_reg,\
                         mvn_imm,mvn_reg,\
-                        mrs,multiple,no_insn"))
+                        mrs,multiple"))
   "ca15_issue1,(ca15_sx1,ca15_sx1_alu)|(ca15_sx2,ca15_sx2_alu)")
 
 ;; ALU ops with immediate shift
index a0c6e51417f583a5aeccedd4e39e3193634d7b65..97b71641413c5047e7a8f9be85d1fd8a72bdacd3 100644 (file)
@@ -42,7 +42,7 @@
                         adc_imm,adcs_imm,adc_reg,adcs_reg,\
                         adr, mov_imm,mov_reg,\
                         mvn_imm,mvn_reg,extend,\
-                        mrs,multiple,no_insn"))
+                        mrs,multiple"))
   "ca17_alu")
 
 (define_insn_reservation "cortex_a17_alu_shiftimm" 2
index efced646a26493a44dbc02d6d10a645a760a23fc..08aa908562c6da4ce52e229b119649cdf0a5e227 100644 (file)
@@ -64,7 +64,7 @@
                         adr,bfm,clz,rbit,rev,alu_dsp_reg,\
                         shift_imm,shift_reg,\
                         mov_imm,mov_reg,mvn_imm,mvn_reg,\
-                        mrs,multiple,no_insn"))
+                        mrs,multiple"))
   "cortex_a5_ex1")
 
 (define_insn_reservation "cortex_a5_alu_shift" 2
index 58619aa2286164fde5063cef7ded6d545523f9f1..c6992fa3b2738a1bf382514d777250a9c71a954b 100644 (file)
@@ -86,7 +86,7 @@
                        alu_sreg,alus_sreg,logic_reg,logics_reg,
                        adc_imm,adcs_imm,adc_reg,adcs_reg,
                        csel,clz,rbit,rev,alu_dsp_reg,
-                       mov_reg,mvn_reg,mrs,multiple,no_insn"))
+                       mov_reg,mvn_reg,mrs,multiple"))
   "cortex_a53_slot_any")
 
 (define_insn_reservation "cortex_a53_alu_shift" 3
index 2d96a9cdd5a0d8a4533d0265e557e71fb2eb9427..046024303e00dff2e62d0bdb111871d9a9679aeb 100644 (file)
                        rotate_imm,shift_imm,shift_reg,\
                        mov_imm,mov_reg,\
                        mvn_imm,mvn_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
   "ca57_sx1|ca57_sx2")
 
 ;; ALU ops with immediate shift
index 1f9d6414eb08d87a23c00eb190e949ef84609b75..f1b60aa27e0ae2c86bc00d2220541c59c2c582e7 100644 (file)
                         logic_shift_reg,logics_shift_reg,\
                         mov_shift,mov_shift_reg,\
                         mvn_shift,mvn_shift_reg,\
-                        mrs,multiple,no_insn"))
+                        mrs,multiple"))
   "cortex_a7_ex1")
 
 ;; Forwarding path for unshifted operands.
index 980aed86e5505d03789a557be41b14f8c507b5ad..e3372453dc2093a48fbcfc09c8dacb1967797aad 100644 (file)
@@ -90,7 +90,7 @@
                         adc_imm,adcs_imm,adc_reg,adcs_reg,\
                         adr,bfm,clz,rbit,rev,alu_dsp_reg,\
                         shift_imm,shift_reg,\
-                        multiple,no_insn"))
+                        multiple"))
   "cortex_a8_default")
 
 (define_insn_reservation "cortex_a8_alu_shift" 2
index 6402a44387aeecdde84320d8cb2a567b9c3ced97..c8474152cc6f926da60ed83903c49f4040900a69 100644 (file)
@@ -87,7 +87,7 @@ cortex_a9_p1_e2 + cortex_a9_p0_e1 + cortex_a9_p1_e1")
                         shift_imm,shift_reg,\
                         mov_imm,mov_reg,mvn_imm,mvn_reg,\
                         mov_shift_reg,mov_shift,\
-                        mrs,multiple,no_insn"))
+                        mrs,multiple"))
   "cortex_a9_p0_default|cortex_a9_p1_default")
 
 ;; An instruction using the shifter will go down E1.
index 60038c1e776137c78db8e775ab86666b12eff99d..f8efcfcfc0c3a279b5f987f669895fdf7505cfba 100644 (file)
@@ -42,7 +42,7 @@
                              logic_shift_reg,logics_shift_reg,\
                              mov_imm,mov_reg,mov_shift,mov_shift_reg,\
                              mvn_imm,mvn_reg,mvn_shift,mvn_shift_reg,\
-                             mrs,multiple,no_insn")
+                             mrs,multiple")
            (ior (eq_attr "mul32" "yes")
                 (eq_attr "widen_mul64" "yes"))))
   "cortex_m4_ex")
index e4695ad666f14929388ce06b011bde95245b9c01..dfe9a742ce3f0101b5d69aafbbcac69b035bda83 100644 (file)
@@ -48,7 +48,7 @@
                         logic_shift_imm,logics_shift_imm,\
                         alu_shift_reg,alus_shift_reg,\
                         logic_shift_reg,logics_shift_reg,\
-                        mrs,clz,f_mcr,f_mrc,multiple,no_insn"))
+                        mrs,clz,f_mcr,f_mrc,multiple"))
   "cm7_i0|cm7_i1,cm7_a0|cm7_a1")
 
 ;; Simple alu with inline shift operation.
index d7c0135fcd594f1fea4a9985b38f99b7e45c9e4f..af5db23a6c02517aa4f02138611f1db6bcb8cd77 100644 (file)
        (eq_attr "type" "alu_shift_reg,alus_shift_reg,\
                        logic_shift_reg,logics_shift_reg,\
                        mov_shift_reg,mvn_shift_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
   "cortex_r4_alu_shift_reg")
 
 ;; An ALU instruction followed by an ALU instruction with no early dep.
index e6625b011b39a10c94b26c76d18743e9cf8b6b56..294b7969297787ea70c3be2a1d53f85b1951e187 100644 (file)
@@ -68,7 +68,7 @@
                        adr,bfm,rev,\
                        shift_imm,shift_reg,\
                        mov_imm,mov_reg,mvn_imm,mvn_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
  "fa526_core")
 
 (define_insn_reservation "526_alu_shift_op" 2
index f2c104fb131c5c2e7d5453cdd2f7ae56bae8452d..9007050ed77c59c750880ac8994108f4b29d4477 100644 (file)
@@ -73,7 +73,7 @@
                        logic_shift_reg,logics_shift_reg,\
                        mov_imm,mov_reg,mov_shift,mov_shift_reg,\
                        mvn_imm,mvn_reg,mvn_shift,mvn_shift_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
  "fa606te_core")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
index 880090fd7a090afdcaaaf553ec8f21708cf4254f..6bdc2e8b56341f9db6f3fca8a1db489a304bea5f 100644 (file)
@@ -74,7 +74,7 @@
                        adr,bfm,rev,\
                        shift_imm,shift_reg,\
                        mov_imm,mov_reg,mvn_imm,mvn_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
  "fa626te_core")
 
 (define_insn_reservation "626te_alu_shift_op" 2
index cb5fbaf99a6d810809e130acc6ec16012487db4b..f6f2531c809ba2a21528d50781a0fd9a11ab8116 100644 (file)
@@ -91,7 +91,7 @@
                        adc_imm,adcs_imm,adc_reg,adcs_reg,\
                        adr,bfm,rev,\
                        shift_imm,shift_reg,\
-                       mrs,multiple,no_insn"))
+                       mrs,multiple"))
   "fa726te_issue+(fa726te_alu0_pipe|fa726te_alu1_pipe)")
 
 ;; ALU operations with a shift-by-register operand.
index 03d6b67c30d514b0ba09554d52fed24b9bd91e88..60faad6597935607ed3c5593f941a04bbc924252 100644 (file)
           crypto_sha256_fast, crypto_sha256_slow")
         (const_string "yes")
         (const_string "no")))
+
+(define_insn_reservation "no_reservation" 0
+  (eq_attr "type" "no_insn")
+  "nothing")
index 14156421d00e9db718bc1ca00c60cb8dc49c0f2f..81498daa0ffd939791920579909e1bbbfd321ede 100644 (file)
        (eq_attr "type" "branch"))
   "xgene1_decode1op")
 
-(define_insn_reservation "xgene1_nop" 1
-  (and (eq_attr "tune" "xgene1")
-       (eq_attr "type" "no_insn"))
-  "xgene1_decode1op")
-
 (define_insn_reservation "xgene1_call" 1
   (and (eq_attr "tune" "xgene1")
        (eq_attr "type" "call"))