This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
How to figure out the gcc -dP output?
- From: Tim Crook <tcrook at adobe dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 24 Jul 2009 13:34:50 -0700
- Subject: How to figure out the gcc -dP output?
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.