Commit Graph

109 Commits

Author SHA1 Message Date
Richard Stallman
92b0556de3 (reload) [SMALL_REGISTER_CLASSES]: Try, at least,
to avoid 2-groups whose second register is explicitly used.

From-SVN: r6047
1993-11-10 00:39:17 +00:00
Richard Stallman
54c40e686a (reload): Cope when inherited register is larger than one word.
(choose_reload_regs): Ditto.

From-SVN: r5820
1993-10-20 04:08:47 +00:00
Jeff Law
51b8cba126 reload1.c (eliminate_regs_in_insn): Rerecognize some loads and stores.
* reload1.c (eliminate_regs_in_insn): Rerecognize some loads and
	stores.

From-SVN: r5792
1993-10-17 19:40:26 -06:00
Richard Kenner
af04ba4a01 (reload): Fix typo in RELOAD_FOR_INSN case when accounting for
reloads.

From-SVN: r5754
1993-10-12 16:49:35 -04:00
Jim Wilson
a7fd196c67 (gen_input_reload): Handle PLUS with MEM operand
exactly the same as a PLUS with a REG operand.

From-SVN: r5549
1993-10-01 15:29:09 -07:00
Jim Wilson
e568744797 (eliminate_regs): All recursive calls now pass INSN instead of NULL_RTX.
(eliminate_regs): All recursive calls now pass INSN
instead of NULL_RTX.  Second assignment to ref_outside_mem changed
to be same as first assignment.

From-SVN: r5517
1993-09-28 16:03:39 -07:00
Richard Stallman
572ca60a63 (eliminate_regs, SET case): Check for INSN_LIST along with EXPR_LIST.
From-SVN: r5489
1993-09-27 22:59:53 +00:00
Richard Kenner
e90d3cbbcd (eliminate_regs): Use new macros LOAD_EXTEND_OP and WORD_REGISTER_OPERATION...
(eliminate_regs): Use new macros LOAD_EXTEND_OP and
WORD_REGISTER_OPERATION instead of BYTE_LOADS_*_EXTEND and
LOAD_EXTEND.

From-SVN: r5476
1993-09-25 08:23:21 -04:00
Doug Evans
3ec2ea3e1d reload1.c: (init_reload): use HARD_FRAME_POINTER_REGNUM instead of FRAME_POINTER_REGNUM.
* reload1.c: (init_reload): use HARD_FRAME_POINTER_REGNUM instead of
FRAME_POINTER_REGNUM.
(reload): Only prohibit elimination of HARD_FRAME_POINTER_REGNUM, not
FRAME_POINTER_REGNUM if frame_pointer_needed.  Never prohibit
elimination of FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM.
Mark HARD_FRAME_POINTER_REGNUM as live at the start of a block if
it is still needed after elimination.
(eliminate_regs): For non-local goto's, don't delete stores into the
hard frame pointer.
(eliminate_regs_in_insn): adjust comment.
(mark_not_eliminable): if frame_pointer_rtx and hard_frame_pointer_rtx
are not the same, then frame_pointer_rtx is eliminable;
hard_frame_pointer_rtx never is if it is set..
(order_regs_for_reload): HARD_FRAME_POINTER_REGNUM is a bad spill reg.
(choose_reload_regs): HARD_FRAME_POINTER_REGNUM is a bad choice.

From-SVN: r5463
1993-09-24 19:51:49 +00:00
Richard Stallman
fe089a905a Fix typo in previous change.
From-SVN: r5448
1993-09-24 19:24:53 +00:00
Richard Stallman
ff32812a47 (eliminate_regs): Specially handle the case where INSN is a note (an EXPR_LIST or INSN_LIST).
(eliminate_regs): Specially handle the case where INSN
is a note (an EXPR_LIST or INSN_LIST).
(eliminate_regs_in_insn): Pass the notes as INSN,
when calling eliminate_insn to process the notes.

From-SVN: r5445
1993-09-24 19:07:10 +00:00
Richard Kenner
20748cab1f (eliminate_regs_in_insn): Fix typo in last change.
From-SVN: r5071
1993-08-04 19:12:26 -04:00
Richard Kenner
05b4c365bb (eliminate_regs_in_insn): Always do elimination in REG_NOTES if we
changed anything in the insn.

From-SVN: r5069
1993-08-04 18:28:48 -04:00
Richard Stallman
c8ab446488 (reload): Don't free scratch_list or scratch_block if 0.
From-SVN: r4925
1993-07-15 05:14:36 +00:00
Richard Kenner
3abe6f904a (emit_reload_insns): Don't use gen_lowpart_common to get reload
register into proper mode.

From-SVN: r4855
1993-07-05 17:59:42 -04:00
Richard Stallman
9f8373c352 (eliminate_regs): Fix typo in BYTE_LOADS_ZERO_EXTEND.
From-SVN: r4823
1993-07-02 00:56:37 +00:00
Richard Kenner
6491dbbb81 (reload): Use reg_equiv_address for invalid addresses
of the form (mem (reg)).

From-SVN: r4761
1993-06-26 17:08:49 -04:00
Richard Kenner
c307c23778 (mark_scratch_live): New function.
(reload): Call it on each SCRATCH.
Free scratch list and block.
(spill_hard_reg): Reallocate any SCRATCH whose register we want to spill.

From-SVN: r4712
1993-06-23 07:46:27 -04:00
Richard Kenner
922d9d40d1 (eliminate_regs_in_insn): Don't use a later elimination than
eliminate_regs would use.

From-SVN: r4663
1993-06-11 21:40:32 -04:00
Richard Stallman
9a6cde3a01 (reload): If only non-group need is unfilled, see if
regs spilled for earlier classes can satisfy it.

From-SVN: r4597
1993-05-30 23:41:55 +00:00
Richard Stallman
208dffa5cd (delete_output_reload): Don't delete output reload if cannot_omit_stores is set for that pseudo.
(delete_output_reload): Don't delete output reload
if cannot_omit_stores is set for that pseudo.
(reload): Init and clear cannot_omit_stores.
(eliminate_regs): Set cannot_omit_stores.

From-SVN: r4574
1993-05-26 05:10:41 +00:00
Richard Stallman
8908158db3 (choose_reload_regs): If inheriting a spill reg,
and reload_out has a wider mode, just copy from that spill reg,
don't use it for the reload.

From-SVN: r4555
1993-05-24 07:49:54 +00:00
Richard Stallman
c74fa651a0 (choose_reload_regs): Handle earlyclobbers
when inheriting from reg_last_reload_reg.

From-SVN: r4524
1993-05-21 03:17:44 +00:00
Richard Stallman
ee9f63c6cb (reload): Don't start 2-group unless it could be finished.
From-SVN: r4492
1993-05-18 04:44:56 +00:00
Richard Stallman
57697575a1 (reload): Don't start 2-group unless it could be finished.
From-SVN: r4464
1993-05-15 13:01:07 +00:00
Richard Kenner
4c05b187a1 (eliminate_regs, case {PRE,POST}_{INC,DEC}): Account for PUSH_ROUNDING.
From-SVN: r4375
1993-05-06 19:21:03 -04:00
Richard Stallman
9a881562eb (forget_old_reloads_1): Accept and ignore 2nd arg.
(reload_as_needed): Pass that second arg.

From-SVN: r4370
1993-05-06 18:17:46 +00:00
Richard Stallman
a3b75c072c (eliminate_regs...
(eliminate_regs, case SUBREG): Leave the SUBREG when
the inner object is a pseudo on machines that extend byte
loads (to be consistent with reload.c).

From-SVN: r4304
1993-05-02 14:01:25 +00:00
Doug Evans
a34a369b38 (emit_reload_insns): Advance following_insn if it is a clobber,
not if the next insn is a clobber.

From-SVN: r4198
1993-04-23 18:17:39 +00:00
Richard Kenner
1d2310f397 (last_spill_reg): Add missing "int".
From-SVN: r4166
1993-04-16 17:55:33 -04:00
Richard Stallman
196ddf8aff (emit_reload_insns): Cast enum array index to int.
From-SVN: r4026
1993-04-06 05:49:35 +00:00
Richard Kenner
2c9ce2effc (emit_reload_insns): Don't update the status of a register from an
input reload if it also has an output reload.

From-SVN: r3994
1993-04-03 17:39:33 -05:00
Richard Kenner
be7ae2a484 (reload_reg_used_for_inherit): New variable.
(clear_reload_reg_in_use): New function.
(allocate_reload_reg): Don't consider an inherited register as one that we
should share in the first pass.
Don't mark a register in use until we are sure it will fit.
(choose_reload_regs): Mark spill regs used for inheriting.
When we decide we can no longer use a register, show it isn't being used.

From-SVN: r3991
1993-04-02 18:43:16 -05:00
Richard Kenner
35be450715 (init_reload): Don't initialize optabs here.
From-SVN: r3926
1993-03-30 15:30:29 -05:00
Richard Kenner
d08ea79fd7 (emit_reload_insns): Properly track what was reloaded into what register when...
(emit_reload_insns): Properly track what was reloaded into what
register when what we reloaded was a hard register group.

From-SVN: r3921
1993-03-30 05:40:07 -05:00
Richard Kenner
546b63fb94 Add prototypes for static functions.
(REGISTER_MOVE_COST, MEMORY_MOVE_COST): Include default definitions.
(reload): Count number of registers needed for insn using new reload type
information.
If mode of insn is DImode, don't change it.
Refine the way we handle conflict with the return value register.
Don't try to account for needs already covered by previously spilled
registers; instead, put them back in the front of potential_reload_regs and
let them be allocated again.
(order_regs_for_reload): Don't restrict regs explicitly used if we have
SMALL_REGISTER_CLASSES defined.
(reload_as_needed): Don't need to deactivate optional reloads ever; if they
inherit, it must have been safe.
Call merge_assigned_reloads if SMALL_REGISTER_CLASSES.
(reload_reg_used_*): Refine our tracking of reload reg usage by defining more
of these HARD_REG_SETs.
(mark_reload_reg_in_use, reload_reg_free_p): Rework to use new method of
describing where a reload register is used.
(reload_reg_free_before_p, reload_reg_reaches_end_p): Likewise.
(allocate_reload_reg): Pass new reload descriptions.
(choose_reload_regs): Likewise.
Save and restore the new HARD_REG_SETs.
Remove now-redundant code to prevent conflicts.
(merge_assigned_reloads): New function.
(emit_reload_insns): Output each reload type into its own sequence, then
output the sequences in the proper order.
Put our output reloads after a CLOBBER made by find_reloads.
Pass ALL_REGS to find_equiv_regs; nothing special about GENERAL_REGS.
Don't use an old equivalence if doing so would be more expensive.
Clean up tracking of values still in reload regs using reload description
info to see if the reload reaches the end of the insn.
(gen_input_reload): Pass reload description and emit insns to end of current
sequence.
(inc_for_reload): Return void; no longer need INSN as operand.
Emit insns to end of current sequence.

From-SVN: r3910
1993-03-29 06:24:36 -05:00
James Van Artsdalen
2045084c92 (eliminate_regs): Eliminate regs within a CLOBBER.
From-SVN: r3826
1993-03-22 07:40:46 +00:00
Richard Stallman
8bb44f9ab5 (choose_reload_regs): Verify reload_out[j != 0
before comparing with relaod_earlyclobber elements.

From-SVN: r3731
1993-03-14 05:02:30 +00:00
Richard Stallman
210eed9496 (choose_reload_regs): Handle SUBREG in reload_earlyclobber
when matching output reloads for setting reload_when_needed.

From-SVN: r3670
1993-03-06 20:09:57 +00:00
Richard Kenner
93193ab5ee (reload): After calling count_possible_groups, see if we have to proceed with allocating a group.
(reload): After calling count_possible_groups, see if we have to proceed
with allocating a group.
(count_possible_groups): Use HARD_REG_SET, not a char array, for consistency.

From-SVN: r3309
1993-01-23 17:13:03 -05:00
Richard Stallman
a3ec87a808 (reload): Clear reload_in_progress even if reloading fails.
From-SVN: r3215
1993-01-13 02:04:37 +00:00
Jim Wilson
2a72bac75f (reload): Delete unused variable inc_groups.
From-SVN: r3197
1993-01-11 14:41:43 -08:00
Richard Stallman
08fb99fa7d (reload_as_needed): Test for whether to call
forget_old_reloads_1 for a REG_INC note was backwards.

From-SVN: r3177
1993-01-10 01:39:14 +00:00
Richard Stallman
9e859f7e00 (reload) [SMALL_REGISTER_CLASSES]: When adding an extra need if the insn uses the function value return register...
(reload) [SMALL_REGISTER_CLASSES]: When adding an extra
need if the insn uses the function value return register,
likewise add an extra single-reg need for each class in which
the insn needs a group.

From-SVN: r3141
1993-01-07 05:42:33 +00:00
Richard Stallman
213062d084 (init_reload): Add entries in 'reload_in_optab' for QFmode and HFmode.
From-SVN: r3135
1993-01-07 00:08:15 +00:00
Jim Wilson
b6983ae362 (emit_reload_insns): Use gen_lowpart_common to change mode of reloadreg.
From-SVN: r3031
1992-12-31 14:32:16 -08:00
Jim Wilson
3002e1601b (gen_input_reload): Also handle PLUS of a MEM and CONSTANT specially.
From-SVN: r3029
1992-12-31 14:28:54 -08:00
Richard Stallman
79a365a71e (emit_reload_insns): Error instead of abort
if an asm has a VOIDmode output operand.

From-SVN: r2990
1992-12-30 07:29:06 +00:00
Richard Stallman
b84f9d9cd2 (eliminate_regs_in_insn): Test old_body, not new_body, since
people have tested it that way.

From-SVN: r2879
1992-12-16 03:28:06 +00:00
Richard Stallman
4d411872e3 (eliminate_regs_in_insn): Don't recopy new_body if it is an asm_operands insn.
From-SVN: r2877
1992-12-16 01:30:36 +00:00