public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Christian Iseli <chris@lslsun.epfl.ch>
To: egcs@cygnus.com
Subject: Infinite loop in init_alias_analysis
Date: Tue, 04 Nov 1997 04:26:00 -0000	[thread overview]
Message-ID: <199711041226.NAA07119@Rivendell.MiddleEarth.net> (raw)

Hi there,

I got an infinite loop while compiling sone test code here.  I think I have 
tracked down the
problem to the new (as of snapshot 971031) code in alias.c, in the 
init_alias_analysis routine,
in the while (changed) loop.

Things happen in the following way:
- During the first iteration of the loop, new_reg_base_value[24] is set to 
(address (reg:HI 1 %r3)),
  (reg 1 is a FUNCTION_ARG_REGNO_P) while copying_arguments is true.
- Later in the function, new_reg_base_value[1] is set to (reg/v:HI 24)

- Now the first iteration terminates and the values from new_reg_base_value 
are copied into
  reg_base_value.
- In the next loop iteration, find_base_value is called and promptly returns 
the values it finds
  in reg_base_value, which yields to new_reg_base_value[24] => (reg/v:HI 24) 
and
  new_reg_base_value[1] => (address (reg:HI 1 %r3))
- And so on...

I'm not sure what's the best fix...
  - set reg_seen of the argument register when it is copied to the pseudo ?
  - avoid the part before NOTE_INSN_FUNCTION_BEG in subsequent loop iterations 
?
  - do some clever testing of new_reg_base_value and reg_base_value ?
  - reverse the if statements in the REG case in find_base_value ?

What do you think?

					Christian



             reply	other threads:[~1997-11-04  4:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-04  4:26 Christian Iseli [this message]
1997-11-04  5:49 ` Jeffrey A Law
1997-11-04 12:32   ` Christian Iseli
1997-11-04 15:39     ` Jeffrey A Law
1997-11-05  4:30 Christian Iseli
1997-11-05  9:26 ` Jeffrey A Law
1997-11-05  9:26 Christian Iseli

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=199711041226.NAA07119@Rivendell.MiddleEarth.net \
    --to=chris@lslsun.epfl.ch \
    --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).