This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to figure out the gcc -dP output?

On Fri, Jul 24, 2009 at 10:34 PM, Tim Crook<> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]