Commit fe352c29 by Dale Johannesen Committed by Dale Johannesen

emit-rtl.c (const_double_htab_hash): Use mode in the hash.

2003-01-28  Dale Johannesen  <dalej@apple.com>
        * emit-rtl.c (const_double_htab_hash):  Use mode in the hash.
        * loop.c (scan_loop):  Move movables on -Os rich-register targets.
        * config/rs6000/rs6000.md (sibcall*):  Use match_operand for LR.

From-SVN: r62004
parent 00d29f7d
2003-01-28 Dale Johannesen <dalej@apple.com>
* emit-rtl.c (const_double_htab_hash): Use mode in the hash.
* loop.c (scan_loop): Move movables on -Os rich-register targets.
* config/rs6000/rs6000.md (sibcall*): Use match_operand for LR.
2003-01-28 Richard Henderson <rth@redhat.com> 2003-01-28 Richard Henderson <rth@redhat.com>
* target.h (targetm.address_cost): New. * target.h (targetm.address_cost): New.
......
...@@ -11115,7 +11115,7 @@ ...@@ -11115,7 +11115,7 @@
[(parallel [(call (mem:SI (match_operand 0 "address_operand" "")) [(parallel [(call (mem:SI (match_operand 0 "address_operand" ""))
(match_operand 1 "" "")) (match_operand 1 "" ""))
(use (match_operand 2 "" "")) (use (match_operand 2 "" ""))
(use (scratch:SI)) (use (match_operand 3 "" ""))
(return)])] (return)])]
"" ""
" "
...@@ -11129,6 +11129,7 @@ ...@@ -11129,6 +11129,7 @@
abort (); abort ();
operands[0] = XEXP (operands[0], 0); operands[0] = XEXP (operands[0], 0);
operands[3] = gen_reg_rtx (SImode);
}") }")
...@@ -11140,7 +11141,7 @@ ...@@ -11140,7 +11141,7 @@
[(call (mem:SI (match_operand:SI 0 "current_file_function_operand" "s,s")) [(call (mem:SI (match_operand:SI 0 "current_file_function_operand" "s,s"))
(match_operand 1 "" "g,g")) (match_operand 1 "" "g,g"))
(use (match_operand:SI 2 "immediate_operand" "O,n")) (use (match_operand:SI 2 "immediate_operand" "O,n"))
(use (match_scratch:SI 3 "=l,l")) (use (match_operand:SI 3 "register_operand" "l,l"))
(return)] (return)]
"(INTVAL (operands[2]) & CALL_LONG) == 0" "(INTVAL (operands[2]) & CALL_LONG) == 0"
"* "*
...@@ -11160,7 +11161,7 @@ ...@@ -11160,7 +11161,7 @@
[(call (mem:SI (match_operand:DI 0 "current_file_function_operand" "s,s")) [(call (mem:SI (match_operand:DI 0 "current_file_function_operand" "s,s"))
(match_operand 1 "" "g,g")) (match_operand 1 "" "g,g"))
(use (match_operand:SI 2 "immediate_operand" "O,n")) (use (match_operand:SI 2 "immediate_operand" "O,n"))
(use (match_scratch:SI 3 "=l,l")) (use (match_operand:SI 3 "register_operand" "l,l"))
(return)] (return)]
"TARGET_64BIT && (INTVAL (operands[2]) & CALL_LONG) == 0" "TARGET_64BIT && (INTVAL (operands[2]) & CALL_LONG) == 0"
"* "*
...@@ -11181,7 +11182,7 @@ ...@@ -11181,7 +11182,7 @@
(call (mem:SI (match_operand:SI 1 "current_file_function_operand" "s,s")) (call (mem:SI (match_operand:SI 1 "current_file_function_operand" "s,s"))
(match_operand 2 "" "g,g"))) (match_operand 2 "" "g,g")))
(use (match_operand:SI 3 "immediate_operand" "O,n")) (use (match_operand:SI 3 "immediate_operand" "O,n"))
(use (match_scratch:SI 4 "=l,l")) (use (match_operand:SI 4 "register_operand" "l,l"))
(return)] (return)]
"(INTVAL (operands[3]) & CALL_LONG) == 0" "(INTVAL (operands[3]) & CALL_LONG) == 0"
"* "*
...@@ -11203,7 +11204,7 @@ ...@@ -11203,7 +11204,7 @@
(call (mem:SI (match_operand:DI 1 "current_file_function_operand" "s,s")) (call (mem:SI (match_operand:DI 1 "current_file_function_operand" "s,s"))
(match_operand 2 "" "g,g"))) (match_operand 2 "" "g,g")))
(use (match_operand:SI 3 "immediate_operand" "O,n")) (use (match_operand:SI 3 "immediate_operand" "O,n"))
(use (match_scratch:SI 4 "=l,l")) (use (match_operand:SI 4 "register_operand" "l,l"))
(return)] (return)]
"TARGET_64BIT && (INTVAL (operands[3]) & CALL_LONG) == 0" "TARGET_64BIT && (INTVAL (operands[3]) & CALL_LONG) == 0"
"* "*
...@@ -11223,7 +11224,7 @@ ...@@ -11223,7 +11224,7 @@
[(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s")) [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s"))
(match_operand 1 "" "g")) (match_operand 1 "" "g"))
(use (match_operand:SI 2 "immediate_operand" "O")) (use (match_operand:SI 2 "immediate_operand" "O"))
(use (match_scratch:SI 3 "=l")) (use (match_operand:SI 3 "register_operand" "l"))
(return)] (return)]
"TARGET_32BIT "TARGET_32BIT
&& DEFAULT_ABI == ABI_AIX && DEFAULT_ABI == ABI_AIX
...@@ -11236,7 +11237,7 @@ ...@@ -11236,7 +11237,7 @@
[(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s")) [(call (mem:SI (match_operand:DI 0 "symbol_ref_operand" "s"))
(match_operand 1 "" "g")) (match_operand 1 "" "g"))
(use (match_operand:SI 2 "immediate_operand" "O")) (use (match_operand:SI 2 "immediate_operand" "O"))
(use (match_scratch:SI 3 "=l")) (use (match_operand:SI 3 "register_operand" "l"))
(return)] (return)]
"TARGET_64BIT "TARGET_64BIT
&& DEFAULT_ABI == ABI_AIX && DEFAULT_ABI == ABI_AIX
...@@ -11250,7 +11251,7 @@ ...@@ -11250,7 +11251,7 @@
(call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s")) (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s"))
(match_operand 2 "" "g"))) (match_operand 2 "" "g")))
(use (match_operand:SI 3 "immediate_operand" "O")) (use (match_operand:SI 3 "immediate_operand" "O"))
(use (match_scratch:SI 4 "=l")) (use (match_operand:SI 4 "register_operand" "l"))
(return)] (return)]
"TARGET_32BIT "TARGET_32BIT
&& DEFAULT_ABI == ABI_AIX && DEFAULT_ABI == ABI_AIX
...@@ -11264,7 +11265,7 @@ ...@@ -11264,7 +11265,7 @@
(call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s")) (call (mem:SI (match_operand:DI 1 "symbol_ref_operand" "s"))
(match_operand 2 "" "g"))) (match_operand 2 "" "g")))
(use (match_operand:SI 3 "immediate_operand" "O")) (use (match_operand:SI 3 "immediate_operand" "O"))
(use (match_scratch:SI 4 "=l")) (use (match_operand:SI 4 "register_operand" "l"))
(return)] (return)]
"TARGET_64BIT "TARGET_64BIT
&& DEFAULT_ABI == ABI_AIX && DEFAULT_ABI == ABI_AIX
...@@ -11277,7 +11278,7 @@ ...@@ -11277,7 +11278,7 @@
[(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s")) [(call (mem:SI (match_operand:SI 0 "symbol_ref_operand" "s,s"))
(match_operand 1 "" "")) (match_operand 1 "" ""))
(use (match_operand 2 "immediate_operand" "O,n")) (use (match_operand 2 "immediate_operand" "O,n"))
(use (match_scratch:SI 3 "=l,l")) (use (match_operand:SI 3 "register_operand" "l,l"))
(return)] (return)]
"(DEFAULT_ABI == ABI_DARWIN "(DEFAULT_ABI == ABI_DARWIN
|| DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_V4
...@@ -11301,7 +11302,7 @@ ...@@ -11301,7 +11302,7 @@
(call (mem:SI (match_operand 1 "address_operand" "")) (call (mem:SI (match_operand 1 "address_operand" ""))
(match_operand 2 "" ""))) (match_operand 2 "" "")))
(use (match_operand 3 "" "")) (use (match_operand 3 "" ""))
(use (scratch:SI)) (use (match_operand 4 "" ""))
(return)])] (return)])]
"" ""
" "
...@@ -11315,6 +11316,7 @@ ...@@ -11315,6 +11316,7 @@
abort (); abort ();
operands[1] = XEXP (operands[1], 0); operands[1] = XEXP (operands[1], 0);
operands[4] = gen_reg_rtx (SImode);
}") }")
...@@ -11323,7 +11325,7 @@ ...@@ -11323,7 +11325,7 @@
(call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s")) (call (mem:SI (match_operand:SI 1 "symbol_ref_operand" "s,s"))
(match_operand 2 "" ""))) (match_operand 2 "" "")))
(use (match_operand:SI 3 "immediate_operand" "O,n")) (use (match_operand:SI 3 "immediate_operand" "O,n"))
(use (match_scratch:SI 4 "=l,l")) (use (match_operand:SI 4 "register_operand" "l,l"))
(return)] (return)]
"(DEFAULT_ABI == ABI_DARWIN "(DEFAULT_ABI == ABI_DARWIN
|| DEFAULT_ABI == ABI_V4 || DEFAULT_ABI == ABI_V4
......
...@@ -237,7 +237,11 @@ const_double_htab_hash (x) ...@@ -237,7 +237,11 @@ const_double_htab_hash (x)
if (GET_MODE (value) == VOIDmode) if (GET_MODE (value) == VOIDmode)
h = CONST_DOUBLE_LOW (value) ^ CONST_DOUBLE_HIGH (value); h = CONST_DOUBLE_LOW (value) ^ CONST_DOUBLE_HIGH (value);
else else
h = real_hash (CONST_DOUBLE_REAL_VALUE (value)); {
h = real_hash (CONST_DOUBLE_REAL_VALUE (value));
/* MODE is used in the comparison, so it should be in the hash. */
h ^= GET_MODE (value);
}
return h; return h;
} }
......
...@@ -1108,10 +1108,12 @@ scan_loop (loop, flags) ...@@ -1108,10 +1108,12 @@ scan_loop (loop, flags)
/* Now consider each movable insn to decide whether it is worth moving. /* Now consider each movable insn to decide whether it is worth moving.
Store 0 in regs->array[I].set_in_loop for each reg I that is moved. Store 0 in regs->array[I].set_in_loop for each reg I that is moved.
Generally this increases code size, so do not move moveables when For machines with few registers this increases code size, so do not
optimizing for code size. */ move moveables when optimizing for code size on such machines.
(The 18 below is the value for i386.) */
if (! optimize_size) if (!optimize_size
|| (reg_class_size[GENERAL_REGS] > 18 && !loop_info->has_call))
{ {
move_movables (loop, movables, threshold, insn_count); move_movables (loop, movables, threshold, insn_count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment