public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jiangning.liu at arm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/38644] [4.3/4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code
Date: Tue, 26 Apr 2011 15:16:00 -0000	[thread overview]
Message-ID: <bug-38644-4-E336h7rArq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-38644-4@http.gcc.gnu.org/bugzilla/>

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

Jiangning Liu <jiangning.liu at arm dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jiangning.liu at arm dot
                   |                            |com

--- Comment #35 from Jiangning Liu <jiangning.liu at arm dot com> 2011-04-26 15:13:41 UTC ---
I verified that two patches in #38644 (back end) and #30282 (middle end) both
work for attached cases. Here comes my two cents,

1) The concept of red zone is to control whether instructions can write memory
below current stack frame or not, and it is only being supported by ABIs for
some particular ISAs, so it shouldn't be enabled in middle end by default for
all targets. At this point, middle end should be fixed to avoid doing things
unwanted in general for all targets.

2) Red zone is an orthogonal concept to prologue/epilogue, so it is not good to
fix this issue in prologue/epilogue back end code. At this point, we shouldn't
simply fix it in back end by adding barrier to implicitly disable red zone.
Instead, some hooks should be abstracted in middle end to support it in
scheduling dependence (middle end code). Back end like X86-64 should enable it
through hooks by itself. 

The key here is red zone should be a clean feature to be supported in middle
end. Exposing this kind of stuff to back end through hooks can improve code
quality for middle end and avoid bringing the bugs to back-end. 

This bug has long history, and it is being now or has ever been exposed on ARM,
POWER and X86(with some options combination). Fixing it in middle end is not
only a bug fix, but a simple infrastructure improvement. Due to the long
duration and the extensive impact for different targets, I don't see good
reason of not fixing it in mainline ASAP.


  parent reply	other threads:[~2011-04-26 15:16 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-38644-4@http.gcc.gnu.org/bugzilla/>
2010-09-30 19:16 ` [Bug rtl-optimization/38644] [4.3/4.4/4.5/4.6 " sebastian.huber@embedded-brains.de
2011-01-31 21:50 ` joel at gcc dot gnu.org
2011-02-07 16:39 ` law at redhat dot com
2011-04-26 15:16 ` jiangning.liu at arm dot com [this message]
2011-06-27 14:30 ` [Bug rtl-optimization/38644] [4.3/4.4/4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2011-08-04 12:35 ` [Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 " sebastian.huber@embedded-brains.de
2011-08-05  4:00 ` ramana.r at gmail dot com
2011-08-05  6:50 ` sebastian.huber@embedded-brains.de
2011-08-09  2:08 ` jiangning.liu at arm dot com
2011-08-15  8:09 ` lingyouzeng@arimacomm-hz.cn
2011-09-06  7:46 ` sebastian.huber@embedded-brains.de
2011-09-09 13:48 ` joel at gcc dot gnu.org
2011-09-11 15:47 ` steven at gcc dot gnu.org
2011-09-12  8:48 ` sebastian.huber@embedded-brains.de
2011-09-12 15:32 ` law at redhat dot com
2011-09-12 15:37 ` rearnsha at arm dot com
2011-09-12 15:50 ` law at redhat dot com
2011-09-12 18:40 ` steven at gcc dot gnu.org
2011-09-26  8:11 ` rguenther at suse dot de
2011-10-15  8:49 ` sebastian.huber@embedded-brains.de
2011-10-24 13:09 ` sebastian.huber@embedded-brains.de
2011-10-28  7:34 ` sebastian.huber@embedded-brains.de
2011-10-29 23:29 ` davem at devkitpro dot org
2011-10-31  7:52 ` jiangning.liu at arm dot com
2011-10-31  8:34 ` mikpe at it dot uu.se
2011-10-31 10:46 ` sebastian.huber@embedded-brains.de
2011-11-04 16:53 ` jye2 at gcc dot gnu.org
2011-11-09  9:17 ` [Bug rtl-optimization/38644] [4.4/4.5/4.6 " sebastian.huber@embedded-brains.de
2011-11-16 10:33 ` liujiangning at gcc dot gnu.org
2012-01-09 16:58 ` ramana at gcc dot gnu.org
2012-03-13 14:55 ` [Bug rtl-optimization/38644] [4.5/4.6 " jakub at gcc dot gnu.org
2012-07-02 11:35 ` rguenth at gcc dot gnu.org
2012-07-31 16:29 ` [Bug rtl-optimization/38644] [4.6 " hagayg at broadcom dot com
2012-07-31 16:53 ` pinskia at gcc dot gnu.org
2012-07-31 17:37 ` hagayg at broadcom dot com
2013-04-05  3:51 ` peter at axium dot co.nz
2013-04-05  4:23 ` pinskia at gcc dot gnu.org
2013-04-05  7:15 ` sebastian.huber@embedded-brains.de
2014-02-16 10:01 ` jackie.rosen at hushmail dot com
2022-10-14  9:56 ` cvs-commit at gcc dot gnu.org
2022-10-14  9:57 ` cvs-commit at gcc dot gnu.org
2022-10-14  9:58 ` cvs-commit at gcc dot gnu.org
2022-10-14 10:00 ` cvs-commit at gcc dot gnu.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=bug-38644-4-E336h7rArq@http.gcc.gnu.org/bugzilla/ \
    --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).