public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55667] New: [regression] -O1 enables frame pointer push to move around on x86_64
@ 2012-12-12 20:44 dflater at nist dot gov
  2012-12-12 20:45 ` [Bug rtl-optimization/55667] " dflater at nist dot gov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: dflater at nist dot gov @ 2012-12-12 20:44 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55667
           Summary: [regression] -O1 enables frame pointer push to move
                    around on x86_64
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dflater@nist.gov
            Target: x86_64-intel-linux-gnu


Created attachment 28939
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28939
preprocessed test program

On x86_64 linux, with -fno-omit-frame-pointer and -O1, gcc 4.7.x (verified
for 4.7.0 and 4.7.2) allow the frame pointer (rbp) push instruction to wander
away from the beginning of a function.  As a result, profiling tools
including perf and OProfile determine incorrect call chains, and subsequent
calculations of call graphs and total time are wrong.

The problem does not occur if any of the following are true:
  -O0 instead of -O1
  -m32 instead of -m64
  gcc 4.6.3 instead of 4.7.x

The preprocessed source of a small program to demonstrate the problem is
attached.  Example output from the profiling tools and various versions of
gcc, as well as the original small program, was sent to the oprofile-list at
2012-12-12 13:45 EST, but the list archive is presently unreachable, so email
me for a copy if needed.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/55667] [regression] -O1 enables frame pointer push to move around on x86_64
  2012-12-12 20:44 [Bug rtl-optimization/55667] New: [regression] -O1 enables frame pointer push to move around on x86_64 dflater at nist dot gov
@ 2012-12-12 20:45 ` dflater at nist dot gov
  2012-12-12 21:25 ` [Bug rtl-optimization/55667] [4.7 regression] " dflater at nist dot gov
  2012-12-13 10:43 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dflater at nist dot gov @ 2012-12-12 20:45 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from David Flater <dflater at nist dot gov> 2012-12-12 20:45:01 UTC ---
Created attachment 28940
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28940
log of build of test program


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/55667] [4.7 regression] -O1 enables frame pointer push to move around on x86_64
  2012-12-12 20:44 [Bug rtl-optimization/55667] New: [regression] -O1 enables frame pointer push to move around on x86_64 dflater at nist dot gov
  2012-12-12 20:45 ` [Bug rtl-optimization/55667] " dflater at nist dot gov
@ 2012-12-12 21:25 ` dflater at nist dot gov
  2012-12-13 10:43 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: dflater at nist dot gov @ 2012-12-12 21:25 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from David Flater <dflater at nist dot gov> 2012-12-12 21:25:27 UTC ---
N.B., in the test program, the problem occurs in fn2 but not fn1.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug rtl-optimization/55667] [4.7 regression] -O1 enables frame pointer push to move around on x86_64
  2012-12-12 20:44 [Bug rtl-optimization/55667] New: [regression] -O1 enables frame pointer push to move around on x86_64 dflater at nist dot gov
  2012-12-12 20:45 ` [Bug rtl-optimization/55667] " dflater at nist dot gov
  2012-12-12 21:25 ` [Bug rtl-optimization/55667] [4.7 regression] " dflater at nist dot gov
@ 2012-12-13 10:43 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-13 10:43 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-13 10:42:56 UTC ---
It's a feature.  Unwind information is now correctly produced for the prologue
which means we can (finally) schedule it freely.
You can try -fno-schedule-insns2.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-13 10:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-12 20:44 [Bug rtl-optimization/55667] New: [regression] -O1 enables frame pointer push to move around on x86_64 dflater at nist dot gov
2012-12-12 20:45 ` [Bug rtl-optimization/55667] " dflater at nist dot gov
2012-12-12 21:25 ` [Bug rtl-optimization/55667] [4.7 regression] " dflater at nist dot gov
2012-12-13 10:43 ` rguenth at gcc dot gnu.org

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).