RFC: remove find_replacement. (pr24912 / pr25335)

Bernd Schmidt bernds_cb1@t-online.de
Wed Feb 1 11:19:00 GMT 2006


Joern RENNECKE wrote:
> You introduced find_replacement in April 1992, presumably to solve the 
> problem that the replacements are not applied at the time that reloads 
> are being made.  Since then its use has spread over a number of 
> functions in the middle-end and in the backends, yet still new code is 
> introduced that doesn't work as it is called while replacements are 
> pending, but it doesn't use find_replacements.  I think a much simpler 
> solution, which should also be more robust in the long term, is to apply 
> all the replacements before we start to emit reload insns.
> 
> 
> ------------------------------------------------------------------------
> 
> 2006-01-31  J"orn Rennecke <joern.rennecke@st.com>
> 
> 	* reload1.c (reload_as_needed): Call subst_reloads before
> 	emit_reload_insns.
> 	(gen_reload): Don't call find_replacement.
> 	* reload.c (find_replacement): Remove.
> 	* reload.h (find_replacement): Don't declare.
> 	* expr.c (emit_move_multi_word): Don't use find_replacement.
> 	* alpha.c (get_aligned_mem, get_unaligned_address): Likewise.
> 	* s390.c (s390_expand_plus_operand): Likewise.
> 	* s390.md (reload_outti, reload_outdi, reload_outdf): Likewise.
> 	* m68k.c (emit_move_sequence): Likewise.
> 	* arm.c (arm_reload_in_hi, arm_reload_out_hi): Likewise.
> 	* pa.c (emit_move_sequence): Likewise.

This looks very clever.  What kind of testing have you done on the 
affected targets?


Bernd



More information about the Gcc-patches mailing list