public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rakdver at atrey dot karlin dot mff dot cuni dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/18595] [4.0 Regression] IV-OPTS is O(N^3)
Date: Tue, 25 Jan 2005 11:29:00 -0000	[thread overview]
Message-ID: <20050125112916.21194.qmail@sourceware.org> (raw)
In-Reply-To: <20041121145949.18595.pinskia@gcc.gnu.org>


------- Additional Comments From rakdver at atrey dot karlin dot mff dot cuni dot cz  2005-01-25 11:29 -------
Subject: Re:  [4.0 Regression] IV-OPTS is O(N^3)

> > (*) I hope; scev is a mess of mutualy recursive functions --
> > analyze_scalar_evolution calling number_of_iterations calling
> > instantiate_parameters calling analyze_scalar_evolution again, with
> > instantiate_parameters hacked so that the infinite cycle cannot occur is
> > my favourite one.  Nobody can say anything sure about behavior of scev
> > -- it is not even well defined what analyze_scalar_evolutions will
> > return to you, 
> 
> It returns to you an evolution that might contain SSA_NAMEs.

Hmm... if this is all you can tell, I start fear even more; this does
not define any semantics at all :-)

More seriously -- which of the possibilities?  If I have loops like

while (...)
  {
    while (...)
      {
        x_1 = something ();
      }
    x_2 = phi (x_1);
    x_3 = x_2 + 1;
  }

What will analyze_scalar_evolutions return for x_3? There are (at least)
three possible valid values:

x_3
x_2 + 1
x_1 + 1

In this example probably the last one will be chosen, but in more
complicated cases you cannot tell (without simulating what scev analysis
does).  It might be better to not export analyze_scalar_evolution at
all and to force it to be used through
instantiate_parameters/resolve_mixers, that have at least a well defined
semantics of return value -- I hope.  Till recently I believed that I
made the functions to behave reasonably in cases when values defined
inside loop are used outside of it (through chain of lcssa phi nodes),
but my attempt to remove the hacks that ensure sane behavior of the
results for ivopts causes misscompilations; I am investigating the cause
now.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18595


  parent reply	other threads:[~2005-01-25 11:29 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-21 14:59 [Bug tree-optimization/18595] New: IV-OPTS is slow (and does not scale) pinskia at gcc dot gnu dot org
2004-11-24 11:15 ` [Bug tree-optimization/18595] " steven at gcc dot gnu dot org
2004-11-25 11:16 ` [Bug tree-optimization/18595] [4.0 Regression] IV-OPTS is O(N^3) belyshev at lubercy dot com
2004-11-27  1:11 ` steven at gcc dot gnu dot org
2004-11-27  1:45 ` belyshev at lubercy dot com
2004-11-27 21:17 ` neroden at gcc dot gnu dot org
2004-11-28 18:43 ` rakdver at gcc dot gnu dot org
2004-12-22 23:40 ` belyshev at depni dot sinp dot msu dot ru
2004-12-23  1:26 ` steven at gcc dot gnu dot org
2004-12-23  1:29 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-23 14:18 ` steven at gcc dot gnu dot org
2005-01-23 15:01   ` Daniel Berlin
2005-01-23 14:22 ` steven at gcc dot gnu dot org
2005-01-23 14:23 ` steven at gcc dot gnu dot org
2005-01-23 14:24 ` steven at gcc dot gnu dot org
2005-01-23 15:02 ` dberlin at dberlin dot org
2005-01-23 15:06 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-23 16:38 ` rakdver at gcc dot gnu dot org
2005-01-23 17:04 ` rakdver at gcc dot gnu dot org
2005-01-23 17:14 ` rakdver at gcc dot gnu dot org
2005-01-24  1:40 ` rakdver at gcc dot gnu dot org
2005-01-24  1:46 ` rakdver at gcc dot gnu dot org
2005-01-24  1:49   ` Daniel Berlin
2005-01-24  1:49 ` dberlin at dberlin dot org
2005-01-24  1:58 ` dberlin at dberlin dot org
2005-01-24 21:36 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-24 22:17 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-24 22:25 ` dberlin at dberlin dot org
2005-01-24 23:09 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-24 23:12 ` dberlin at dberlin dot org
2005-01-25  0:27 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25  0:39 ` dberlin at dberlin dot org
2005-01-25  0:50 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25  0:50 ` dberlin at dberlin dot org
2005-01-25  0:52 ` dberlin at dberlin dot org
2005-01-25  1:11 ` rakdver at gcc dot gnu dot org
2005-01-25  1:15 ` dberlin at dberlin dot org
2005-01-25  1:24 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25  1:28 ` steven at gcc dot gnu dot org
2005-01-25  1:42 ` dberlin at dberlin dot org
2005-01-25  1:52 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25  1:57 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25 10:32 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-25 10:41 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-25 11:02 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-25 11:15 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25 11:16 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25 11:29 ` rakdver at atrey dot karlin dot mff dot cuni dot cz [this message]
2005-01-25 12:03 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-25 12:44 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-25 15:54 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-25 16:27 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-25 19:16 ` pinskia at gcc dot gnu dot org
2005-01-27 13:18 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-27 15:00 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-27 15:12 ` sebastian dot pop at cri dot ensmp dot fr
2005-01-27 19:11 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-27 20:40 ` sebastian dot pop at cri dot ensmp dot fr
2005-02-14 11:12 ` pinskia at gcc dot gnu dot org

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=20050125112916.21194.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).