aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorYunQiang Su <syq@gcc.gnu.org>2023-12-30 00:17:52 +0800
committerYunQiang Su <syq@gcc.gnu.org>2024-01-04 09:55:08 +0800
commitffdbb8e02280e37b2f81ed40b98f7168dc502c52 (patch)
tree92d86ea8077fe098a9e97984f663a2e743b8d37f /gcc
parent4a0a8dc1b88408222b88e10278017189f6144602 (diff)
downloadgcc-ffdbb8e02280e37b2f81ed40b98f7168dc502c52.zip
gcc-ffdbb8e02280e37b2f81ed40b98f7168dc502c52.tar.gz
gcc-ffdbb8e02280e37b2f81ed40b98f7168dc502c52.tar.bz2
MIPS: define_attr perf_ratio in mips.md
The accurate cost of an pattern can get with insn_count * perf_ratio The default value is set to 0 instead of 1, since that we will need to distinguish the default value and it is really set for an pattern. Since it is not set for most patterns yet, to use it, we will need to be sure that it's value is greater than 0. This attr will be used in `mips_insn_cost`. gcc * config/mips/mips.md (perf_ratio): New attribute.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/mips/mips.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md
index 6d47241..e1762ce 100644
--- a/gcc/config/mips/mips.md
+++ b/gcc/config/mips/mips.md
@@ -312,6 +312,10 @@
;; "11" specifies MEMMODEL_ACQUIRE.
(define_attr "sync_memmodel" "" (const_int 10))
+;; Performance ratio. Add this attr to the slow INSNs.
+;; Used by mips_insn_cost.
+(define_attr "perf_ratio" "" (const_int 0))
+
;; Accumulator operand for madd patterns.
(define_attr "accum_in" "none,0,1,2,3,4,5" (const_string "none"))