Richard Kenner [Fri, 19 Mar 1993 11:29:40 +0000 (06:29 -0500)]
(simplify_plus_minus): Count CONSTs coming in and going out...
(simplify_plus_minus): Count CONSTs coming in and going out; we have
simplified things if we have more CONSTs going out even if we have the
same number of total terms.
Richard Kenner [Fri, 19 Mar 1993 11:27:23 +0000 (06:27 -0500)]
(zero_cost): New variable.
(init_expmed): Always pass some insn to recog.
Set shift_cost[0], shiftadd_cost[0] and shiftsub_cost[0] to something
reasonable.
Compute zero_cost.
(enum alg_code): Remove alg_none; add alg_zero and alg_m.
(struct algorithm): Rename field COEFF to LOG.
(synth_mult): Use new ops alg_zero and alg_m for multiplication by zero and
one, respectively.
Use MIN when helpful.
Be consistent and don't test cost before recursive call.
Don't special-case shift counts of zero; already handled elsewhere.
(expand_mult): First operation is always alg_zero or alg_m; remaining
operations can't be one of those.
Use proper subtargets for computations.
Remove special-cases for shift counts of zero.
Track value computed so far and make REG_EQUAL notes.
Jim Wilson [Thu, 18 Mar 1993 22:01:56 +0000 (14:01 -0800)]
current_function_prototype_line): New variables.
(current_function_prototype_file,
current_function_prototype_line): New variables.
(start_function): Set them.
(store_parm_decls): Use them for error and warning messages.
Paul Eggert [Thu, 18 Mar 1993 21:28:43 +0000 (21:28 +0000)]
(expand_float): When converting an unsigned type U to a smaller or equal-sized floating type F where there's no hardware support for unsigned-to-float conversion...
(expand_float): When converting an unsigned type U
to a smaller or equal-sized floating type F where there's no
hardware support for unsigned-to-float conversion, use a temporary
floating type larger than F if possible, since this avoids
rounding problems that are worst when U is just greater than
the maximum signed integer of the same size.
Jeff Law [Wed, 17 Mar 1993 22:26:54 +0000 (15:26 -0700)]
pa.md (pre_ldwm, pre_stwm): Name these patterns to make generating them easier.
* pa.md (pre_ldwm, pre_stwm): Name these patterns to make
generating them easier.
*post_ldwm, post_stwm): New patterns.
(add_high_const): New pattern.
(return): New pattern.
Jeff Law [Wed, 17 Mar 1993 21:15:15 +0000 (14:15 -0700)]
pa.h (IS_RELOADING_PSEUDO_P): New subroutine for EXTRA_CONSTRAINT.
* pa.h (IS_RELOADING_PSEUDO_P): New subroutine for EXTRA_CONSTRAINT.
(EXTRA_CONSTRAINT): Use IS_RELOADING_PSEUDO_P. Accept any MEM for
`Q' constraint during hte reload pass.
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.