diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-13 23:14:04 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-13 23:14:04 +0000 |
commit | 16a1ea05f12c19bb563b5d5712cc84f0dfb2b6fd (patch) | |
tree | 81a0f72673be5558699c49acd88285a2fa5ce0f6 /gcc/expr.h | |
parent | 6c74b72ea547ac65e0458469eb9e9e8c9087c5cb (diff) | |
download | gcc-16a1ea05f12c19bb563b5d5712cc84f0dfb2b6fd.tar.gz |
* lang.c (java_estimate_num_insns_1): Fix bug in MODIFY_EXPR cost
estimation.
* c-common.c (c_estimate_num_insns_1): Fix bug in MODIFY_EXPR
cost estimation.
* expr.c (MOVE_RATIO, CLEAR_RATIO): Move to ...
* expr.h (MOVE_RATIO, CLEAR_RATIO): ... here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.h')
-rw-r--r-- | gcc/expr.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/expr.h b/gcc/expr.h index bdfd4902f92..000011340e5 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -66,6 +66,30 @@ enum expand_modifier {EXPAND_NORMAL = 0, EXPAND_STACK_PARM = 2, EXPAND_SUM, more information. */ #define OK_DEFER_POP (inhibit_defer_pop -= 1) +/* If a memory-to-memory move would take MOVE_RATIO or more simple + move-instruction sequences, we will do a movstr or libcall instead. */ + +#ifndef MOVE_RATIO +#if defined (HAVE_movstrqi) || defined (HAVE_movstrhi) || defined (HAVE_movstrsi) || defined (HAVE_movstrdi) || defined (HAVE_movstrti) +#define MOVE_RATIO 2 +#else +/* If we are optimizing for space (-Os), cut down the default move ratio. */ +#define MOVE_RATIO (optimize_size ? 3 : 15) +#endif +#endif + +/* If a clear memory operation would take CLEAR_RATIO or more simple + move-instruction sequences, we will do a clrstr or libcall instead. */ + +#ifndef CLEAR_RATIO +#if defined (HAVE_clrstrqi) || defined (HAVE_clrstrhi) || defined (HAVE_clrstrsi) || defined (HAVE_clrstrdi) || defined (HAVE_clrstrti) +#define CLEAR_RATIO 2 +#else +/* If we are optimizing for space, cut down the default clear ratio. */ +#define CLEAR_RATIO (optimize_size ? 3 : 15) +#endif +#endif + enum direction {none, upward, downward}; /* Structure to record the size of a sequence of arguments |