From: Jim Wilson <wilson@cygnus.com>
To: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Cc: amylaar@cygnus.com, egcs@cygnus.com
Subject: Re: Missing documentation in regmove.c
Date: Mon, 11 May 1998 18:12:00 -0000 [thread overview]
Message-ID: <199805120112.SAA26199@rtl.cygnus.com> (raw)
In-Reply-To: <vyzvhrd6v0q.fsf@issan.informatik.uni-dortmund.de>
I added some comments which should help.
Index: regmove.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/regmove.c,v
retrieving revision 1.16
diff -p -r1.16 regmove.c
*** regmove.c 1998/04/18 15:42:46 1.16
--- regmove.c 1998/05/12 01:09:17
*************** reg_is_remote_constant_p (reg, insn, fir
*** 568,575 ****
--- 568,591 ----
return 0;
}
+ /* INSN is adding a CONST_INT to a REG. We search backwards looking for
+ another add immediate instruction with the same source and dest registers,
+ and if we find one, we change INSN to an increment, and return 1. If
+ no changes are made, we return 0.
+
+ This changes
+ (set (reg100) (plus reg1 offset1))
+ ...
+ (set (reg100) (plus reg1 offset2))
+ to
+ (set (reg100) (plus reg1 offset1))
+ ...
+ (set (reg100) (plus reg100 offset2-offset1)) */
+
+ /* ??? What does this comment mean? */
/* cse disrupts preincrement / postdecrement squences when it finds a
hard register as ultimate source, like the frame pointer. */
+
int
fixup_match_2 (insn, dst, src, offset, regmove_dump_file)
rtx insn, dst, src, offset;
*************** regmove_optimize (f, nregs, regmove_dump
*** 1141,1147 ****
--- 1157,1168 ----
#endif /* REGISTER_CONSTRAINTS */
}
+ /* Returns the INSN_CODE for INSN if its pattern has matching constraints for
+ any operand. Returns -1 if INSN can't be recognized, or if the alternative
+ can't be determined.
+ Initialize the info in MATCHP based on the constraints. */
+
static int
find_matches (insn, matchp)
rtx insn;
*************** stable_but_for_p (x, src, dst)
*** 1708,1715 ****
return ! rtx_unstable_p (x);
}
}
- /* Test if regmove seems profitable for this target. */
int
regmove_profitable_p ()
{
--- 1729,1739 ----
return ! rtx_unstable_p (x);
}
}
+
+ /* Test if regmove seems profitable for this target. Regmove is useful only
+ if some common patterns are two address, i.e. require matching constraints,
+ so we check that condition here. */
int
regmove_profitable_p ()
{
next prev parent reply other threads:[~1998-05-11 18:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-05-11 2:01 Andreas Schwab
1998-05-11 18:12 ` Jim Wilson [this message]
1998-05-13 1:47 ` Andreas Schwab
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=199805120112.SAA26199@rtl.cygnus.com \
--to=wilson@cygnus.com \
--cc=amylaar@cygnus.com \
--cc=egcs@cygnus.com \
--cc=schwab@issan.informatik.uni-dortmund.de \
/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).