Richard Kenner [Mon, 15 Mar 1993 23:38:07 +0000 (18:38 -0500)]
(lea_max_mul): Delete.
(init_expmed): Delete unused variable I.
(enum alg_code): New tag alg_shift. Document it.
(synth_mult): Delete unused variable N. Handle new trivial case
first, for T <= 1. Generalize shifting code to shift whenever a
number is even; use alg_shift for this. Set best_alg->ops only in
trivial case. Clean up cost calculation code for the `simple case' at
the end; use shiftadd_cost when appropriate. Combine declarations of
Q and move to top of function. Eliminate use of Q in factoring cases.
If we are getting too long a sequence for `struct algorithm' to
record, fail.
(expand_mult): Handle alg_shift instead of alg_add_t_m2 as first
operation. In RLT emit loop, handle alg_shift; special case LOG == 0
for alg_add_t_m2 and alg_sub_t_m2.
Jim Wilson [Mon, 15 Mar 1993 19:48:38 +0000 (11:48 -0800)]
(reg_known_equiv_p): New variable.
(init_alias_analysis): Allocate and compute reg_known_equiv_p.
(sched_analyze_1): Reenable code for REG_EQUIV notes, using
reg_known_equiv_p so that it is only used on REG_EQUIV notes.
(sched_analyze_2): Likewise. Only pass memory addresses to the
sched_analyze_2 call.
Jeff Law [Mon, 15 Mar 1993 18:36:21 +0000 (11:36 -0700)]
pa.md (sh[123]add patterns): Use register_operand, not shadd_operand.
* pa.md (sh[123]add patterns): Use register_operand, not
shadd_operand.
(sh[123]add patterns for reload): Special patterns to avoid
lossage due to reload problems.
Richard Kenner [Mon, 15 Mar 1993 02:26:55 +0000 (21:26 -0500)]
(shift_cost): Now a vector.
(shiftadd_cost): New vector for cost of (N * a + b) instructions.
(shiftsub_cost): New vector for cost of (N * a - b) instructions.
(lea_cost): Removed.
(init_expmed): Initialize new vectors. Use ASHIFT, not LSHIFT.
Remove code initializing lea_cost.
(enum alg_code): New definition.
(synth_mult): Rewrite for better algorithms and faster operation.
(expand_mult): Rewrite code for constant multiplication.
Richard Kenner [Sun, 14 Mar 1993 22:21:33 +0000 (17:21 -0500)]
(build_objc_method_call, get_class_reference):
Call assemble_external on anything we are about to generate a call to.
(get_super_receiver): Likewise.
(handle_class_ref): Put constant in readonly-data section, not text.
(build_objc_symtab_template): Correctly build index type for 0-length array.
(truncdfsf2): Rewrite to allow FLOAT_REGS in constraints for better register preferences.
(truncdfsf2): Rewrite to allow FLOAT_REGS in constraints
for better register preferences.
(movM): If REG_WAS_0, make sure the reg hasn't changed since then.
(cmpM expanders): Don't allow both operands to be MEM.
Use VOIDmode for the COMPARE rtx instead of CCmode.
(cmpM recognizers): Likewise.
Remove constraints for constants from operand 0.
(cmpdf,cmpsf recognizers): When using VOIDmode as mode of the COMPARE rtx,
require that the mode be exactly VOIDmode.
(REGISTER_MOVE_COST): Use it instead of comparing to FLOAT_REGS.
(PREFERRED_RELOAD_CLASS): Likewise.
(SECONDARY_MEMORY_NEEDED): Likewise.
(CLASS_MAX_NREGS): Likewise.
(SELECT_CC_MODE): Use VOIDmode for non-FP-equality comparisons.
Jeff Law [Thu, 11 Mar 1993 12:46:36 +0000 (05:46 -0700)]
cse.c (set_nonvarying_address_components): New function.
* cse.c (set_nonvarying_address_components): New function.
(invalidate): Use set_nonvarying_address_components instead of
computing them.
(refers_to_mem_p): Likewise. Simplify checks for conflicting
memory accesses. Make static.
Jeff Law [Wed, 10 Mar 1993 17:31:38 +0000 (10:31 -0700)]
pa.c (cint_ok_for_move): New function.
* pa.c (cint_ok_for_move): New function. Returns 1 iff the given
CONST_INT can be loaded into a register in a single instruction.
(move_operand): Use cink_ok_for_move.
Richard Kenner [Mon, 8 Mar 1993 21:57:16 +0000 (16:57 -0500)]
(cse_gen_binary, simplify_plus_minus): New functions.
(find_best_addr): Use cse_gen_binary.
(simplify_binary_operation, fold_rtx): Likewise.
Remove most special-cases for PLUS and MINUS and call
simplify_plus_minus instead.
Clean up some tests for FP.
Richard Kenner [Fri, 5 Mar 1993 22:52:35 +0000 (17:52 -0500)]
(simplify_binary_operation): Move integer CONST_DOUBLE folding out of REAL_IS_NOT_DOUBLE conditional.
(simplify_binary_operation): Move integer CONST_DOUBLE folding out of
REAL_IS_NOT_DOUBLE conditional.
(simplify_relational_operation): Put float CONST_DOUBLE folding under a
REAL_IS_NOT_DOUBLE conditional.
Add folding for integer CONST_DOUBLE comparisons.
Jeff Law [Fri, 5 Mar 1993 20:13:59 +0000 (13:13 -0700)]
pa.h (FIXED_REGISTERS): %r2 is no longer fixed.
* pa.h (FIXED_REGISTERS): %r2 is no longer fixed.
(REG_ALLOC_ORDER): Treat %r2 as a caller-saved allocatable
register. %r30 is fixed and therefore a "special" register.
%fr22-%fr31 are caller-saved, so allocate them before the
callee-saved 1.1 fp registers. Allocate fp registers before
general registers. Fix typo for register 79.
* pa.h (FIRST_PSEUDO_REGISTER): Update to take into account
registers which are no longer known to the compiler.
(FIXED_REGISTERS): Likewise.
(CALL_USED_REGISTERS): Likewise.
(HARD_REGNO_NREGS): Likewise.
(HARD_REGNO_MODE_OK): Likewise.
(REGNO_REG_CLASS): Likewise.
(FUNCTION_VALUE): Likewise.
(LIBCALL_VALUE): Likewise.
(FUNCTION_VALUE_REGNO_P): Likewise.
(FUNCTION_ARG_REGNO_P): Likewise.
(FUNCTION_ARG): Likewise.
(REGNO_OK_FOR_FP_P): Likewise.
(REGISTER_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise. Add %r1 to GENERAL_OR_FP_REGS
and GENERAL_OR_SNAKE_FP_REGS.
(REG_ALLOC_ORDER): Likewise. Document and make allocation order
"regular" across 1.0 and 1.1 cpus.
Jeff Law [Fri, 5 Mar 1993 20:13:08 +0000 (13:13 -0700)]
pa.c (output_function_epilogue): Perform an early %r2 restore even if actual_fsize is zero.
* pa.c (output_function_epilogue): Perform an early %r2 restore
even if actual_fsize is zero. This can happen if %r2 is used
as a temporary in a leaf function.
* pa.c (compute_frame_size): Update to take into account
register which are no longer known to the compiler.
(output_function_prologue): Likewise.
(output_function_epilogue): Likewise.
(output_arg_descriptor): Likewise.