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

  In message < 199711041226.NAA07119@Rivendell.MiddleEarth.net >you write:
  > 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.
Sorry, I really can't follow your problem description.

Typically, when the alias code looped, that indicated that some register
that could hold a pointer at function entry wasn't put into the
new_reg_base_value array -- for example the static chain, or structure
value address tweaked this problem when I was working on the code.

  > 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)),
OK.

  >   (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)
OK.

  > - Now the first iteration terminates and the values from new_reg_base_value
OK.

  >  
  > 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...
Sorry, this is where you lost me.  Can you describe this better?

What are the arguments for the relavent calls to find_base_value?  What
does find_base_value return for those calls?

How does this set up a condition where we always think something changed?

Can you describe exactly what registers have pointer values in them at
function start?  An RTL dump of the function in question might be useful
too.


  > I'm not sure what's the best fix...
  >   - set reg_seen of the argument register when it is copied to the pseudo ?
I don't think this is right -- reg_seen tracks which registers have been
set, not the registers that were used as sources of sets.

  >   - avoid the part before NOTE_INSN_FUNCTION_BEG in subsequent loop
  > iterations 
No, I think this is wrong too -- seems to me that you have to be consistent
in how you handle argument copying each time through the loop.

  >   - do some clever testing of new_reg_base_value and reg_base_value ?
Such as?

  >   - reverse the if statements in the REG case in find_base_value ?
Hmmm, I don't think this is right either.

  > What do you think?
I think we need more information :-)

The one thing I'd considered was setting new_reg_base_value from reg_base_value
at the bottom of the loop.  I couldn't ever come up with a compelling
reason why it would be needed, but maybe you have.  I'd need more information
to make that decision though.

jeff

  reply	other threads:[~1997-11-04  5:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-04  4:26 Christian Iseli
1997-11-04  5:49 ` Jeffrey A Law [this message]
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=8225.878651459@hurl.cygnus.com \
    --to=law@cygnus.com \
    --cc=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).