public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Fang, Changpeng" <Changpeng.Fang@amd.com>
To: Zdenek Dvorak <rakdver@kam.mff.cuni.cz>,
	Richard Guenther	<richard.guenther@gmail.com>
Cc: Xinliang David Li <davidxl@google.com>,
	"gcc-patches@gcc.gnu.org"	<gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH, Loop optimizer]: Add logic to disable certain loop	optimizations on pre-/post-loops
Date: Thu, 16 Dec 2010 18:26:00 -0000	[thread overview]
Message-ID: <D4C76825A6780047854A11E93CDE84D004C1768409@SAUSEXMBP01.amd.com> (raw)
In-Reply-To: <20101216120914.GA15902@kam.mff.cuni.cz>

My initial intention is Not to unroll prologue and epilogue loops. An estimated trip count
may not be that useful for the unrolling decision. To me, unrolling a loop that has at most 
3 (or 7) iterations does not make sense. RTL unrolling does not use the estimated trip 
count to determine the unroll factor, and thus it may still unroll the loop 4 or 8 times if
the loop is small ( #insns). To make things simple, we just don't unroll such loops.

However, a prologue or epilogue loop may still be a hot loop, depending on the outer 
loops. It may still be beneficial to perform other optimizations on such loops, if the code
size is not expanded multiple times.

For prefetching of prologue or epilogue loops, we have two choices (1) prefetching not 
not unrolling, (2) not prefetching.  Which one do you prefer?

Thanks,

Changpeng



________________________________________
From: Zdenek Dvorak [rakdver@kam.mff.cuni.cz]
Sent: Thursday, December 16, 2010 6:09 AM
To: Richard Guenther
Cc: Xinliang David Li; Fang, Changpeng; gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, Loop optimizer]: Add logic to disable certain loop optimizations on pre-/post-loops

Hi,

> Btw, any reason why we do not use static profiles for number of iteration
> estimates?  We after all _do_ use the static profile to guide the
> maybe_hot/cold_bb tests.

for loops for that we cannot determine the # of iterations statically,
basically the only important predictors are PRED_LOOP_BRANCH and
PRED_LOOP_EXIT, which predict that the loop will iterate about 10 times.  So,
by using static profile, we would just learn that every such loop is expected
to iterate 10 times, which is kind of useless,

Zdenek

  reply	other threads:[~2010-12-16 17:24 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 21:57 Fang, Changpeng
2010-12-14  0:56 ` Sebastian Pop
2010-12-14  8:25 ` Zdenek Dvorak
2010-12-14 20:02   ` Fang, Changpeng
2010-12-14 21:55     ` Zdenek Dvorak
2010-12-15  6:16       ` Richard Guenther
2010-12-15  8:34         ` Fang, Changpeng
2010-12-15  9:22           ` Xinliang David Li
2010-12-15 10:00             ` Zdenek Dvorak
2010-12-15 16:46               ` Fang, Changpeng
2010-12-15 16:47                 ` Zdenek Dvorak
2010-12-15 17:08               ` Xinliang David Li
2010-12-16 12:09               ` Richard Guenther
2010-12-16 12:41                 ` Zdenek Dvorak
2010-12-16 18:26                   ` Fang, Changpeng [this message]
2010-12-16 20:06                     ` Zdenek Dvorak
2010-12-17  3:53                       ` Fang, Changpeng
2010-12-17  6:36                         ` Jack Howarth
2010-12-17  9:55                           ` Fang, Changpeng
2010-12-17 16:13                             ` Jack Howarth
2010-12-17 16:48                               ` Fang, Changpeng
2010-12-17 17:20                                 ` Jack Howarth
2010-12-17 18:01                                 ` Jack Howarth
2010-12-17 18:31                                   ` Fang, Changpeng
2011-01-04  3:33                             ` Jack Howarth
2011-01-04 22:40                               ` Fang, Changpeng
2011-01-05 12:07                                 ` Richard Guenther
2011-01-05 14:12                                 ` Jack Howarth
2010-12-17 21:45                           ` Jack Howarth
2010-12-17 22:35                             ` Fang, Changpeng
2010-12-17 22:54                               ` [PATCH, Loop optimizer]: Add logic to disable certain loop optimizations on pre-/post-loopsj Jack Howarth
2010-12-18 11:35                               ` [PATCH, Loop optimizer]: Add logic to disable certain loop optimizations on pre-/post-loops Jack Howarth
2010-12-19  0:29                     ` Richard Guenther
2010-12-21 22:45                       ` Fang, Changpeng
2010-12-14 16:13 ` Jack Howarth
2010-12-14 17:33   ` Fang, Changpeng

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=D4C76825A6780047854A11E93CDE84D004C1768409@SAUSEXMBP01.amd.com \
    --to=changpeng.fang@amd.com \
    --cc=davidxl@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rakdver@kam.mff.cuni.cz \
    --cc=richard.guenther@gmail.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).