This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR18683: Bad C++/cgraph/middle-end/rs6000 interaction(fix 1)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Dec 2004 15:29:20 -0800
- Subject: Re: [PATCH] PR18683: Bad C++/cgraph/middle-end/rs6000 interaction(fix 1)
- Organization: CodeSourcery, LLC
- References: <Pine.LNX.4.44.0412200904010.9948-100000@www.eyesopen.com>
Roger Sayle wrote:
If the above assumptions are true, the routines push_function_context
and pop_function_context used by the front-ends should have no affect
on the RTL optimizers internal data structures.
Yes. In the old days, we really used to be generating RTL for multiple
functions at once, but we should certainly not be doing that any more.
In addition to this change, I'll also submit another change to the
rs6000 backend that is also sufficient to resolve the failure. However
both of these fixes may possibly be papering over a more fundamental
problem in the interaction between g++ and cgraph; should we guarantee
that current_function_decl has an assembler name before generating RTL?
Definitely not; DECL_ASSEMBLER_NAME is supposed to operate lazily.
Unfortunately, in obscure situations, the C++ front end does end up
doing complex things during mangling; see the comments around
save_partially_mangled_name. A large part of that complexity is imposed
upon us by the C++ ABI, but we could probably figure out a way to do better.
Ok for mainline?
Yes.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304