From: Zack Weinberg <zack@codesourcery.com>
To: Richard Henderson <rth@redhat.com>, gcc@gcc.gnu.org
Subject: Re: messy combine problem - PPC
Date: Tue, 04 Dec 2001 10:06:00 -0000 [thread overview]
Message-ID: <20011204180602.GC19450@codesourcery.com> (raw)
In-Reply-To: <20011204093058.B7748@redhat.com>
On Tue, Dec 04, 2001 at 09:30:58AM -0800, Richard Henderson wrote:
> On Mon, Dec 03, 2001 at 10:34:31PM -0800, Zack Weinberg wrote:
> > or is there something else that takes care of that?
>
> Yes, that call_used_regs killing loop in record_dead_and_set_regs.
I get it now, thanks for clarifying. I'm testing this patch.
zw
* combine.c (record_dead_and_set_regs): Use regs_invalidated_by_call.
Do not call note_stores for CALL_INSNs.
===================================================================
Index: combine.c
--- combine.c 2001/11/11 11:25:14 1.241
+++ combine.c 2001/12/04 18:05:50
@@ -11178,7 +11178,7 @@ record_dead_and_set_regs (insn)
if (GET_CODE (insn) == CALL_INSN)
{
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
- if (call_used_regs[i])
+ if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
{
reg_last_set_value[i] = 0;
reg_last_set_mode[i] = 0;
@@ -11188,6 +11188,13 @@ record_dead_and_set_regs (insn)
}
last_call_cuid = mem_last_set = INSN_CUID (insn);
+
+ /* Don't bother recording what this insn does. It might set the
+ return value register, but we can't combine into a call
+ pattern anyway, so there's no point trying (and it may cause
+ a crash, if e.g. we wind up asking for last_set_value of a
+ SUBREG of the return value register). */
+ return;
}
note_stores (PATTERN (insn), record_dead_and_set_regs_1, insn);
prev parent reply other threads:[~2001-12-04 18:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-03 12:49 Zack Weinberg
2001-12-03 15:06 ` Richard Henderson
2001-12-03 15:53 ` Zack Weinberg
2001-12-03 18:27 ` Richard Henderson
2001-12-03 22:34 ` Zack Weinberg
2001-12-04 9:31 ` Richard Henderson
2001-12-04 10:06 ` Zack Weinberg [this message]
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=20011204180602.GC19450@codesourcery.com \
--to=zack@codesourcery.com \
--cc=gcc@gcc.gnu.org \
--cc=rth@redhat.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).