aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-05-19 13:54:15 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-05-19 13:54:15 +0000
commit31a52b868a209f0c8f3ade10a91148664526dc9b (patch)
tree2708e7bc3111a8f768bf18005fc086587b092f1b /gcc
parentd28f752bd30791925d7c6fbf08cf426026cd3279 (diff)
downloadgcc-31a52b868a209f0c8f3ade10a91148664526dc9b.zip
gcc-31a52b868a209f0c8f3ade10a91148664526dc9b.tar.gz
gcc-31a52b868a209f0c8f3ade10a91148664526dc9b.tar.bz2
tm.texi (TARGET_RTX_COSTS): Document that instruction costs should be based on code size when...
* doc/tm.texi (TARGET_RTX_COSTS): Document that instruction costs should be based on code size when optimizing for size. From-SVN: r82025
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/doc/tm.texi8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3b61615..ca2069d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-19 Roger Sayle <roger@eyesopen.com>
+
+ * doc/tm.texi (TARGET_RTX_COSTS): Document that instruction
+ costs should be based on code size when optimizing for size.
+
2004-05-19 Paolo Bonzini <bonzini@gnu.org>
* fold-const.c: Remove non-printable character 160.
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 43543a8..67f4b76 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -5456,7 +5456,13 @@ instructions.
On entry to the hook, @code{*@var{total}} contains a default estimate
for the cost of the expression. The hook should modify this value as
-necessary.
+necessary. Traditionally, the default costs are @code{COSTS_N_INSNS (5)}
+for multiplications, @code{COSTS_N_INSNS (7)} for division and modulus
+operations, and @code{COSTS_N_INSNS (1)} for all other operations.
+
+When optimizing for code size, i.e@. when @code{optimize_size} is
+non-zero, this target hook should be used to estimate the relative
+size cost of an expression, again relative to @code{COSTS_N_INSNS}.
The hook returns true when all subexpressions of @var{x} have been
processed, and false when @code{rtx_cost} should recurse.