summaryrefslogtreecommitdiff
path: root/gcc/opts.c
diff options
context:
space:
mode:
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-02 22:17:49 +0000
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-02 22:17:49 +0000
commit8ba44f354ac06fbd58e1de59ea057920d2756027 (patch)
tree7bd1908b5f7dc0533ac54bcf9321ac234d85e874 /gcc/opts.c
parenta55228d849f803e5670dddb6f4ce4de40b1caa88 (diff)
downloadgcc-8ba44f354ac06fbd58e1de59ea057920d2756027.tar.gz
2004-04-02 Gabor Loki <loki@inf.u-szeged.hu>
* opts.c (decode_options): Do function inlining with very small max-inline-insns-* parameters when optimizing for size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80359 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.c')
-rw-r--r--gcc/opts.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/opts.c b/gcc/opts.c
index f21cf250d21..b5cb3d99c0a 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -594,6 +594,15 @@ decode_options (unsigned int argc, const char **argv)
flag_reorder_blocks = 0;
}
+ if (optimize_size)
+ {
+ /* Inlining of very small functions usually reduces total size. */
+ set_param_value ("max-inline-insns-single", 5);
+ set_param_value ("max-inline-insns-auto", 5);
+ set_param_value ("max-inline-insns-rtl", 10);
+ flag_inline_functions = 1;
+ }
+
/* Initialize whether `char' is signed. */
flag_signed_char = DEFAULT_SIGNED_CHAR;
/* Initialize how much space enums occupy, by default. */