public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Does anybody really know which pass it is?
@ 2003-05-11 22:01 Richard B. Kreckel
  2003-05-12 20:09 ` tm_gccmail
  0 siblings, 1 reply; 3+ messages in thread
From: Richard B. Kreckel @ 2003-05-11 22:01 UTC (permalink / raw)
  To: gcc

Hi,

Joining the recent debate about documentation quality, I am currently
trying to figure out which optimization pass fries one piece of code of
mine.  This happens on HPPA since GCC 3.0 till at least GCC 3.2.3.  The
code runs properly with -O0 and fails with -O1.  It also behaves well on
all other platforms.  I know that "on most machines, the -O option turns
on the -fthread-jumps and -fdelayed-branch options, but specific machines
may handle it differently."  After some (not-so-)educated guesses I
have tried passing all sorts of -fno-do-this I could find in the
documentation in order to find the culprit but to no avail.  I must
be still missing an optimization pass...

Does anybody else feel that it would be quite useful to have a way to tell
which pass the compiler is actually performing?  (For more fine-grained
things we have -fsched-verbose, but that's obviously no help in a
situation like mine.)

Regards
    -richy.
-- 
Richard B. Kreckel
<Richard.Kreckel@GiNaC.DE>
<http://www.ginac.de/~kreckel/>

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

* Re: Does anybody really know which pass it is?
  2003-05-11 22:01 Does anybody really know which pass it is? Richard B. Kreckel
@ 2003-05-12 20:09 ` tm_gccmail
  0 siblings, 0 replies; 3+ messages in thread
From: tm_gccmail @ 2003-05-12 20:09 UTC (permalink / raw)
  To: Richard.Kreckel; +Cc: gcc

On Mon, 12 May 2003, Richard B. Kreckel wrote:

> Hi,
> 
> Joining the recent debate about documentation quality, I am currently
> trying to figure out which optimization pass fries one piece of code of
> mine.  This happens on HPPA since GCC 3.0 till at least GCC 3.2.3.  The
> code runs properly with -O0 and fails with -O1.  It also behaves well on
> all other platforms.  I know that "on most machines, the -O option turns
> on the -fthread-jumps and -fdelayed-branch options, but specific machines
> may handle it differently."  After some (not-so-)educated guesses I
> have tried passing all sorts of -fno-do-this I could find in the
> documentation in order to find the culprit but to no avail.  I must
> be still missing an optimization pass...
> 
> Does anybody else feel that it would be quite useful to have a way to tell
> which pass the compiler is actually performing?  (For more fine-grained
> things we have -fsched-verbose, but that's obviously no help in a
> situation like mine.)
> 
> Regards
>     -richy.

I usually use -da and note which dump files have a zero length, as you
need the dump files later anyway.

Toshi


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

* Re: Does anybody really know which pass it is?
@ 2003-05-12  3:14 John David Anglin
  0 siblings, 0 replies; 3+ messages in thread
From: John David Anglin @ 2003-05-12  3:14 UTC (permalink / raw)
  To: gcc; +Cc: kreckel

> Joining the recent debate about documentation quality, I am currently
> trying to figure out which optimization pass fries one piece of code of
> mine.  This happens on HPPA since GCC 3.0 till at least GCC 3.2.3.  The
> code runs properly with -O0 and fails with -O1.  It also behaves well on
> all other platforms.  I know that "on most machines, the -O option turns
> on the -fthread-jumps and -fdelayed-branch options, but specific machines
> may handle it differently."  After some (not-so-)educated guesses I
> have tried passing all sorts of -fno-do-this I could find in the
> documentation in order to find the culprit but to no avail.  I must
> be still missing an optimization pass...

If the compiler ICE's, it is quite easy to determine the pass.  This
can be done with the "-da" option, or by running the compiler under gdb
and doing a backtrace from the point of the ICE.  The line number
in toplev.c will by inspection allow determination of the pass.

If your code is silently miscompiled, then it's much more difficult
to determine which pass fries your code.  Unless you have a significant
amount of experience in debugging the compiler, it's probably better
to focus on generating a simplified testcase which demonstrates the
problem and then file a PR.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

PS: try 3.3.

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

end of thread, other threads:[~2003-05-12 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-11 22:01 Does anybody really know which pass it is? Richard B. Kreckel
2003-05-12 20:09 ` tm_gccmail
2003-05-12  3:14 John David Anglin

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