public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [PATCH] Fix PR67783, quadraticness in IPA inline analysis
Date: Mon, 05 Oct 2015 15:34:00 -0000	[thread overview]
Message-ID: <20151005153433.GA9972@kam.mff.cuni.cz> (raw)
In-Reply-To: <alpine.LSU.2.11.1510051315160.6516@zhemvz.fhfr.qr>

> On Thu, 1 Oct 2015, Richard Biener wrote:
> 
> > 
> > The following avoids quadraticness in the loop depth by only considering
> > loop header defs as IVs for the analysis of the loop_stride predicate.
> > This will miss cases like
> > 
> > foo (int inv)
> > {
> >  for (i = inv; i < n; ++i)
> >   {
> >     int derived_iv = i + i * inv;
> >     ...
> >   }
> > }
> > 
> > but I doubt that's important in practice.  Another way would be to
> > just consider the containing loop when analyzing the IV, thus iterate
> > over outermost loop bodies only, replacing the
> > 
> >   simple_iv (loop, loop_containing_stmt (stmt), use, &iv, true)
> > 
> > check with
> > 
> >   simple_iv (loop_containing_stmt (stmt), loop_containing_stmt (stmt), 
> > use, &iv, true);
> > 
> > but doing all this analysis for each stmt is already quite expensive,
> > esp. as we are doing it for all uses instead of all defs ...
> > 
> > Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
> > 
> > Honza, is this ok or did you do the current way on purpose (rather
> > than for completeness as it was easy to do?)
> 
> Applied as r228472.

Ah, sorry. I wrote you a reply but apparently did not send.  Yes, the patch looks
resonable - it is a heuristics after all.  Lets watch if the change make any difference
on polyhedron and other benchmarks.

Honza

  reply	other threads:[~2015-10-05 15:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 11:39 Richard Biener
2015-10-01 12:24 ` Richard Biener
2015-10-05 11:15 ` Richard Biener
2015-10-05 15:34   ` Jan Hubicka [this message]
2015-10-10 19:02     ` Jan Hubicka
2015-10-11  7:57 Dominique d'Humières
2015-10-12  9:18 ` Richard Biener

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=20151005153433.GA9972@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).