public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: Ghassan Shobaki <gshobaki@ece.ucdavis.edu>
Cc: gcc-help@gcc.gnu.org, "Vladimir N. Makarov" <vmakarov@redhat.com>,
	gcc@gnu.org, hubicka@ucw.cz
Subject: Re: Superblock Instruction Scheduling in GCC 3.4
Date: Wed, 28 Jan 2004 12:23:00 -0000	[thread overview]
Message-ID: <20040128122317.GI8094@kam.mff.cuni.cz> (raw)
In-Reply-To: <Pine.GHP.4.58.0401271638150.25927@dante.ece.ucdavis.edu>

> Hi,
> 
> I am currently experimenting with superblock scheduling in a prerelease
> version (20040114) of gcc 3.4 on the spec2000 benchmarks. I have
> a few questions:
> 
> The version that I have does not seem to accept the
> -fsched2-use-traces command line switch. So I went a head and set the
> following global variables in toplev.c in order to enforce superblock
> formation and scheduling:
> 
> int flag_optimize = 1;
> int flag_schedule_insns = 1;
> int flag_schedule_insns_after_reload = 1;
> int flag_sched2_use_traces = 1;
> 
> Q1. Is there a known bug in version 3.4 related to command-line options?
>     Or I am doing something wrong?

I jus ttested and -fsched2-use-traces seems to just work for me.  What
kind of problems do you get?
> 
> Q2. Should I set the following flag as well?
> int flag_branch_probabilities = ?;
> I tried it both ways and the superblocks generated when this flag is
> RESET are on average larger and have more branches in them (they are much
> harder to schedule), which does not make sense to me. What is superblock
> formation based on when branch probablities are not computed? It seems to
> me that setting this flag should be necessary!

Yes, however it should be implied by -O2 flag.
You also may want the profile feedback.  Without -fbranch-probabilities
you won't get any superblocks formed.
> 
> Q3. Are there any other flags that I need to set in order to ensure
> proper superblock formation?

I think -O2 -fsched2-use-traces shall do what you want.
> 
> Q3. I have looked into the trace formation code in tracer.c and was
> confused about three different terms related to about the same
> concept : probability, count and frequency. Is there a documention that
> precisely defines each of these three terms and how they are used in
> trace formation?

You may take a look at cfg.texi documentation I sent to mailing list
year or two ago, but it never went into official sources.
In general the count represent number of execution of given edge/block
when profile is read from feedback.  It is 64bit number.
Each basic block has frequence that represent how commonly it is
executed relative to REG_FREQ_BASE.  It is 32bit number and the most
frequent basic block is known to have REG_FREQ_BASE frequency at the
time profile was built, so it is easier to manipulate with when you
don't care about exactness and it is also available without profile
feedback based on guesses made by compiler.
Probablity is set for edges and represent probability that control flow
will leave basic block via that edge, again relative to REG_FREQ_BASE.

Honza
> 
> Thanks
> 
> -Ghassan

  reply	other threads:[~2004-01-28 12:23 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-03  6:14 Superblock Instruction Scheduling in GCC Ghassan Shobaki
2003-12-03 14:03 ` Vladimir N. Makarov
2003-12-04  0:06   ` Jan Hubicka
2003-12-04  1:26     ` Ghassan Shobaki
2003-12-04 10:25       ` Jan Hubicka
2003-12-04 15:54         ` Vladimir Makarov
2003-12-09 21:11     ` Ghassan Shobaki
2004-01-28  1:31     ` Superblock Instruction Scheduling in GCC 3.4 Ghassan Shobaki
2004-01-28 12:23       ` Jan Hubicka [this message]
2004-01-29  7:07         ` Ghassan Shobaki
2004-01-29 10:13           ` Jan Hubicka
2004-02-01 18:17             ` Ghassan Shobaki
2004-02-01 21:55               ` Jan Hubicka
2004-02-02  5:52                 ` Ghassan Shobaki
2004-02-10 18:57                 ` Superblock Scheduling Alg in GCC Ghassan Shobaki
2004-02-10 20:08                   ` Vladimir Makarov
2004-02-10 20:17                     ` Vladimir Makarov
2004-02-10 20:27                       ` Jan Hubicka
2004-04-14 17:03                         ` Ghassan Shobaki
2004-04-14 22:44                           ` Vladimir Makarov
     [not found]                             ` <Pine.LNX.4.58.0404142056120.4634@hawking.ece.ucdavis.edu>
2004-04-17 19:29                               ` Ghassan Shobaki
2004-05-27  6:41                         ` Ghassan Shobaki
2004-05-27 10:06                           ` Tree-SSA: Grammer Sumit Jain
2004-05-27 12:56                             ` llewelly
2005-02-11 16:55                           ` Trace Scheduling in GCC Ghassan Shobaki
     [not found]                             ` <4210D6C0.3030005@redhat.com>
2005-02-15  6:30                               ` Vladimir Makarov
2006-11-24 18:42                                 ` Phase Ordering of Scheduling and Allocation " Ghassan Shobaki
2006-11-24 19:28                                   ` Vladimir N. Makarov
2005-02-15  7:45                               ` Trace Scheduling " Jan Hubicka
2005-02-15  9:18                                 ` Ghassan Shobaki
2005-02-17 16:19                                   ` Jan Hubicka
2005-02-16 10:40                               ` Vladimir Makarov
     [not found]                                 ` <Pine.GHP.4.58.0502150840080.14429@dante.ece.ucdavis.edu>
2005-02-16 11:19                                   ` Jan Hubicka
2004-01-28 13:19 Superblock Instruction Scheduling in GCC 3.4 S. Bosscher

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=20040128122317.GI8094@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=gcc-help@gcc.gnu.org \
    --cc=gcc@gnu.org \
    --cc=gshobaki@ece.ucdavis.edu \
    --cc=hubicka@ucw.cz \
    --cc=vmakarov@redhat.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).