This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: autoincrement patches for gcc 4 - updated patch


Joern Rennecke wrote:

I'm testing this updated patch now:

------------------------------------------------------------------------

When I moved the add_limits initialization code into its own function,
I discovered that it was still expecting to get a pattern from the
add generator functions, so make_insn_raw would generate a nested INSN,
and single_set would fail.  So I updated this code to check
NEXT_INSN (tmp_add) instead of GET_CODE (tmp_add) == SEQUENCE,
and removed the make_insn_raw wrapping.

2005-05-17 J"orn Rennecke <joern.rennecke@st.com>

* regmove.c (discover_flags_reg): Use the PATTERN of an INSN.

	* regmove.c (fixup_match_1): When moving a death note, check if
	it needs changing into a REG_UNUSED note.

2005-05-17  J"orn Rennecke <joern.rennecke@st.com>
	    Bernd Schmidt  <bernds@redhat.com>

	* common.opt: Add optimize-related-values entry.
	* opts.c (decode_options): Set flag_optimize_related_values.
	* optabs.c (gen_add3_insn): If direct addition is not possible,
	try to move the constant into the destination register first.
	* regmove.c (obstack.h, ggc.h, optabs.h): Include.
	(related, rel_use_chain, rel_mod, rel_use): New structures.
	(related_baseinfo, update): Likewise.
	(lookup_related, rel_build_chain): New functions.
	(recognize_related_for_insn, record_reg_use, create_rel_use): Likewise.
	(new_reg_use, rel_record_mem, new_base, invalidate_related): Likewise.
	(find_related, find_related_toplev, chain_starts_earlier): Likewise.
	(chain_ends_later, mod_before, remove_setting_insns): Likewise.
	(perform_addition, modify_address): Likewise.
	(optimize_related_values_1, optimize_related_values_0): Likewise.
	(optimize_related_values, count_sets, link_chains): Likewise.
	(init_add_limits): Likewise.
	(REL_USE_HASH_SIZE, REL_USE_HASH, rel_alloc, rel_new): New macros.
	(regno_related, rel_base_list, unrelatedly_used): New variables.
	(related_obstack, add_limits): Likewise.
	(regmove_optimize): Call optimize_related_values.
	Include gt-regmove.h.
	* Makefile.in (gt-regmove.h): New rule.
	(regmove.o): Depend on $(OPTABS_H) and gt-regmove.h.
	(GTFILES): Add regmove.c.
	* doc/invoke.texi: Document -foptimize-related-values.



The reinstatement of the add_limits logic improved the code size, now at 0.477% less
than for the baseline.


On the other hand, the i686 bootstrap stopped with a warning, fixed with the obvious
attached patchlet.


sh-elf test results differed only in additional timeouts for the baseline, in the marginal
20001216-1.c testcase:


< WARNING: program timed out.
< FAIL: gcc.c-torture/compile/20001226-1.c  -O1  (test for excess errors)
< WARNING: program timed out.
< FAIL: gcc.c-torture/compile/20001226-1.c  -O2  (test for excess errors)
---
> PASS: gcc.c-torture/compile/20001226-1.c  -O1  (test for excess errors)
> PASS: gcc.c-torture/compile/20001226-1.c  -O2  (test for excess errors)

Not really surprising, considering there were seven jobs running on two processors.

There are some differences in the ppc results, with the net differences being
two less failures in gcc, three more in g++, and two less in obcj for the patches version,
but at least the ones that failed in the patched and didn't fail in the unpatched version
are all using stdio / iostreams. I have previously found that such test fail randomly on
the ppc-eabisim platform, with somewhat lower, but still non-zero incidence when you
increase the debugging level of dejagnu.



*** regmove.c-20050517	2005-05-17 19:58:22.000000000 +0100
--- regmove.c	2005-05-18 10:26:14.000000000 +0100
*************** optimize_related_values (int nregs, FILE
*** 2142,2149 ****
    FOR_EACH_BB (bb)
      FOR_BB_INSNS (bb, insn)
        {
- 	luid++;
  	rtx set = NULL_RTX;
  	
  	/* Don't do anything if this instruction is in the shadow of a
  	   live flags register.  */
--- 2142,2150 ----
    FOR_EACH_BB (bb)
      FOR_BB_INSNS (bb, insn)
        {
  	rtx set = NULL_RTX;
+ 
+ 	luid++;
  	
  	/* Don't do anything if this instruction is in the shadow of a
  	   live flags register.  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]