From: Jason Merrill <jason@cygnus.com>
To: tot@trema.com (Teemu Torma), egcs@cygnus.com
Subject: Re: Flow analysis confused by exception handling
Date: Tue, 02 Dec 1997 02:25:00 -0000 [thread overview]
Message-ID: <u967p8caa5.fsf@yorick.cygnus.com> (raw)
In-Reply-To: <199712020947.KAA05490.cygnus.egcs@lev.labs.trema.com>
>>>>> Teemu Torma <tot@trema.com> writes:
> The problem I sent few days ago about register being clobbered
> in sparc while throwing seems to be actually flow analysis problem.
> In the following code, the initial assignment to `i' gets deleted
> because the next instruction also assigns it.
Does this fix the problem?
Tue Dec 2 01:42:33 1997 Jason Merrill <jason@yorick.cygnus.com>
* flow.c (find_basic_blocks): A CALL_INSN that can throw starts
a new basic block.
(find_basic_blocks_1): Likewise.
Index: flow.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/flow.c,v
retrieving revision 1.100
diff -c -r1.100 flow.c
*** flow.c 1997/11/28 04:44:47 1.100
--- flow.c 1997/12/02 09:25:06
***************
*** 304,309 ****
--- 304,310 ----
{
register RTX_CODE prev_code = JUMP_INSN;
register RTX_CODE code;
+ int eh_region = 0;
max_uid_for_flow = 0;
***************
*** 316,322 ****
|| (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN
! && nonlocal_label_list != 0)
|| prev_code == BARRIER)))
i++;
--- 317,323 ----
|| (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN
! && (nonlocal_label_list != 0 || eh_region))
|| prev_code == BARRIER)))
i++;
***************
*** 325,330 ****
--- 326,335 ----
if (code != NOTE)
prev_code = code;
+ else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
+ ++eh_region;
+ else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
+ --eh_region;
}
}
***************
*** 420,426 ****
|| (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN
! && nonlocal_label_list != 0
&& ! find_reg_note (insn, REG_RETVAL, NULL_RTX))
|| prev_code == BARRIER)))
{
--- 425,431 ----
|| (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN
! && (nonlocal_label_list != 0 || eh_note)
&& ! find_reg_note (insn, REG_RETVAL, NULL_RTX))
|| prev_code == BARRIER)))
{
next parent reply other threads:[~1997-12-02 2:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <199712020947.KAA05490.cygnus.egcs@lev.labs.trema.com>
1997-12-02 2:25 ` Jason Merrill [this message]
1997-12-02 13:14 ` Joern Rennecke
1997-12-02 16:29 ` Jeffrey A Law
1997-12-03 4:36 meissner
-- strict thread matches above, loose matches on Subject: below --
1997-12-02 1:47 Teemu Torma
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=u967p8caa5.fsf@yorick.cygnus.com \
--to=jason@cygnus.com \
--cc=egcs@cygnus.com \
--cc=tot@trema.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).