This is the mail archive of the
mailing list for the GCC project.
Re: How to figure out the gcc -dP output?
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Tim Crook <tcrook at adobe dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 24 Jul 2009 23:57:18 +0200
- Subject: Re: How to figure out the gcc -dP output?
- References: <6DF2A46812807943AB2102A35BC5121927790F1D93@NAMBX02.corp.adobe.com>
On Fri, Jul 24, 2009 at 10:34 PM, Tim Crook<email@example.com> wrote:
> Hello there.
> I am trying to track down a problem with gcc 4.1 which has to do with inlining and templates on PowerPC. Is there any documentation I can look related to the output generated with -fdump? I am getting extraneous lwz (load word and zero extend) instructions inserted when calling various methods - after $toc (r2) has been switched to the destination method's global data, just before the method call with the bctrl instruction. This lwz instruction causes a crash on IBM AIX when 32-bit shared libraries are loaded non-contiguously in memory. It looks like various code blocks are not being combined correctly when code is inlined - the extra lwz is being left behind.
> I have figured out that turning off gcse optimizations will stop this behavior, but doing this causes a performance hit. I would prefer not to upgrade the compiler at this time. With the compiler dump using -fdump, I am looking for a better way to work around this problem.
> Tim Crook.
Hmm, how are dumps going to solve your problem? Perhaps you can
explain a bit more what you have in mind.
Documentation about the dumps is in the target descriptions. It is
quite unusual for a user to be interested in what is in them. What is
sometimes useful, is -dAP, then look at the assembler output to see
the number and pattern of the asm instruction(s) that is (are) causing
you trouble. You can then go through the other dumps (-da, which is
the same as -fdump-rtl-all) to see where the insn comes from.