From: john@feith.com (John Wehle)
To: egcs@cygnus.com
Cc: egcs-patches@cygnus.com
Subject: regmove.c inconsistencies
Date: Mon, 13 Jul 1998 00:06:00 -0000 [thread overview]
Message-ID: <199807130429.AAA17945@jwlab.FEITH.COM> (raw)
The following inconsistencies came up while looking into the i386
performance regression due to the June 11 regmove change.
1) In copy_src_to_dest is:
REG_N_SETS (dest_regno) += loop_depth;
however the rest of regmove.c merely increments (or decrements)
REG_N_SETS by one.
2) In copy_src_to_dest is:
REG_N_REFS (dest_regno) += loop_depth;
however it would seem that the number of references should be
changed by a factor of two since src has been replaced by dest
in insn and a move instruction has been added which sets dest.
3) Could someone comment on the theory behind loop_depth?
Attached is a patch which changes copy_src_to_dest to be consistent with
the apparent usage of REG_N_SETS and REG_N_REFS in the rest of regmove.c
Don't know if this patch is correct ... I really wish someone knowledgeable
about regmove would speak up regarding these issues.
ChangeLog:
Sun Jul 12 23:02:54 EDT 1998 John Wehle (john@feith.com)
* regmove.c (copy_src_to_dest): Correct the updating of
REG_N_SETS and REG_N_REFS for dest_regno.
Enjoy!
-- John Wehle
------------------8<------------------------8<------------------------
*** gcc/regmove.c.ORIGINAL Sat Jul 11 02:17:21 1998
--- gcc/regmove.c Sun Jul 12 23:05:02 1998
***************
*** 610,617 ****
/* Update the various register tables. */
dest_regno = REGNO (dest);
! REG_N_SETS (dest_regno) += loop_depth;
! REG_N_REFS (dest_regno) += loop_depth;
REG_LIVE_LENGTH (dest_regno)++;
if (REGNO_FIRST_UID (dest_regno) == insn_uid)
REGNO_FIRST_UID (dest_regno) = move_uid;
--- 610,617 ----
/* Update the various register tables. */
dest_regno = REGNO (dest);
! REG_N_SETS (dest_regno)++;
! REG_N_REFS (dest_regno) += 2 * loop_depth;
REG_LIVE_LENGTH (dest_regno)++;
if (REGNO_FIRST_UID (dest_regno) == insn_uid)
REGNO_FIRST_UID (dest_regno) = move_uid;
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------
next reply other threads:[~1998-07-13 0:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-13 0:06 John Wehle [this message]
1998-07-12 22:49 ` Jeffrey A Law
1998-07-13 23:22 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199807130429.AAA17945@jwlab.FEITH.COM \
--to=john@feith.com \
--cc=egcs-patches@cygnus.com \
--cc=egcs@cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).