public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/38740] [4.4 Regression] Incorrect delayed branch optimization
Date: Wed, 28 Jan 2009 15:21:00 -0000	[thread overview]
Message-ID: <20090128152058.31394.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38740-276@http.gcc.gnu.org/bugzilla/>



------- Comment #16 from jakub at gcc dot gnu dot org  2009-01-28 15:20 -------
The problem is -O0 together with -fdelayed-branch.  Shouldn't we just reject it
or silently not do dbr at !optimize?  If it is really important to support (I
don't see any rationale for it), then the problem is that ira.c only calls
df_analyze after RA if -O1 and above:
  df_finish_pass (true);
  if (optimize > 1)
    df_live_add_problem ();
  df_scan_alloc (NULL);
  df_scan_blocks ();

  if (optimize)
    df_analyze ();

  timevar_pop (TV_IRA);
}

No other -O0 pass in between ira and dbr calls df_analyze and dbr itself can't
call it, as the cfg is gone.  So, if we really want to support this, either
ira.c could
  /* -O0 -fdelayed-branch uses dataflow info during dbr pass, but uses it after
     the cfg is gone.  Ensure it is updated even in that case.  */
  if (optimize || flag_delayed_branch)
    df_analyze ();
or we could have some pass right before pass_free_cfg that would be gated on
!optimize && flag_delayed_branch and would call df_analyze ().


-- 


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


  parent reply	other threads:[~2009-01-28 15:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-06  4:25 [Bug middle-end/38740] New: " danglin at gcc dot gnu dot org
2009-01-06  4:27 ` [Bug middle-end/38740] " dave at hiauly1 dot hia dot nrc dot ca
2009-01-06 13:24 ` ebotcazou at gcc dot gnu dot org
2009-01-06 13:27 ` [Bug rtl-optimization/38740] " ebotcazou at gcc dot gnu dot org
2009-01-06 14:57 ` dave at hiauly1 dot hia dot nrc dot ca
2009-01-07 17:27 ` dave at hiauly1 dot hia dot nrc dot ca
2009-01-08  4:15 ` [Bug rtl-optimization/38740] [4.4 Regression] " danglin at gcc dot gnu dot org
2009-01-12 15:02 ` carlos at systemhalted dot org
2009-01-12 18:01 ` dave at hiauly1 dot hia dot nrc dot ca
2009-01-17 22:34 ` danglin at gcc dot gnu dot org
2009-01-18 23:02 ` dave at hiauly1 dot hia dot nrc dot ca
2009-01-23 16:23 ` rguenth at gcc dot gnu dot org
2009-01-25 17:54 ` rguenth at gcc dot gnu dot org
2009-01-25 18:02 ` ebotcazou at gcc dot gnu dot org
2009-01-28 13:34 ` jakub at gcc dot gnu dot org
2009-01-28 15:21 ` jakub at gcc dot gnu dot org [this message]
2009-01-28 16:06 ` jakub at gcc dot gnu dot org
2009-01-28 16:06 ` jakub at gcc dot gnu dot org
2009-01-28 18:20 ` vapier at gentoo dot org
2009-01-29 13:05 ` danglin 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=20090128152058.31394.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).