Commit dc0d5a57 by Bernd Schmidt Committed by Bernd Schmidt

re PR target/42235 (redundant memory move from parameter space to spill space)

	PR target/42235
	* postreload.c (reload_cse_move2add): Return bool, true if anything.
	changed.  All callers changed.
	(move2add_use_add2_insn): Likewise.
	(move2add_use_add3_insn): Likewise.
	(reload_cse_regs): If reload_cse_move2add changed anything, rerun
	reload_combine.
	(RELOAD_COMBINE_MAX_USES): Bump to 16.
	(last_jump_ruid): New static variable.
	(struct reg_use): New members CONTAINING_MEM and RUID.
	(reg_state): New members ALL_OFFSETS_MATCH and REAL_STORE_RUID.
	(reload_combine_split_one_ruid, reload_combine_split_ruids,
	reload_combine_purge_insn_uses, reload_combine_closest_single_use
	reload_combine_purge_reg_uses_after_ruid,
	reload_combine_recognize_const_pattern): New static functions.
	(reload_combine_recognize_pattern): Verify that ALL_OFFSETS_MATCH
	is true for our reg and that we have available index regs.
	(reload_combine_note_use): New args RUID and CONTAINING_MEM.  All
	callers changed.  Use them to initialize fields in struct reg_use.
	(reload_combine): Initialize last_jump_ruid.  Be careful when to
	take PREV_INSN of the scanned insn.  Update REAL_STORE_RUID fields.
	Call reload_combine_recognize_const_pattern.
	(reload_combine_note_store): Update REAL_STORE_RUID field.

	* gcc.target/arm/pr42235.c: New test.

From-SVN: r162270
parent ebc258f1
2010-07-17 Bernd Schmidt <bernds@codesourcery.com>
PR target/42235
* postreload.c (reload_cse_move2add): Return bool, true if anything.
changed. All callers changed.
(move2add_use_add2_insn): Likewise.
(move2add_use_add3_insn): Likewise.
(reload_cse_regs): If reload_cse_move2add changed anything, rerun
reload_combine.
(RELOAD_COMBINE_MAX_USES): Bump to 16.
(last_jump_ruid): New static variable.
(struct reg_use): New members CONTAINING_MEM and RUID.
(reg_state): New members ALL_OFFSETS_MATCH and REAL_STORE_RUID.
(reload_combine_split_one_ruid, reload_combine_split_ruids,
reload_combine_purge_insn_uses, reload_combine_closest_single_use
reload_combine_purge_reg_uses_after_ruid,
reload_combine_recognize_const_pattern): New static functions.
(reload_combine_recognize_pattern): Verify that ALL_OFFSETS_MATCH
is true for our reg and that we have available index regs.
(reload_combine_note_use): New args RUID and CONTAINING_MEM. All
callers changed. Use them to initialize fields in struct reg_use.
(reload_combine): Initialize last_jump_ruid. Be careful when to
take PREV_INSN of the scanned insn. Update REAL_STORE_RUID fields.
Call reload_combine_recognize_const_pattern.
(reload_combine_note_store): Update REAL_STORE_RUID field.
2010-07-16 Jason Merrill <jason@redhat.com> 2010-07-16 Jason Merrill <jason@redhat.com>
* Makefile.in (opts-common.o): Depend on options.h. * Makefile.in (opts-common.o): Depend on options.h.
......
2010-07-17 Bernd Schmidt <bernds@codesourcery.com>
* gcc.target/arm/pr42235.c: New test.
2010-07-16 Jason Merrill <jason@redhat.com> 2010-07-16 Jason Merrill <jason@redhat.com>
PR c++/32505 PR c++/32505
......
/* { dg-options "-mthumb -O2 -march=armv5te" } */
/* { dg-require-effective-target arm_thumb1_ok } */
/* { dg-final { scan-assembler-not "add\[\\t \]*r.,\[\\t \]*r.,\[\\t \]*\#1" } } */
/* { dg-final { scan-assembler-not "add\[\\t \]*r.,\[\\t \]*\#1" } } */
#include <string.h>
int foo (char *x)
{
memset (x, 0, 6);
}
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