[C/C++ PATCH] Call make_decl_rtl in {,c_}determine_visibility if DECL_RTL is set and visibility changed (PR target/39175)
Mark Mitchell
mark@codesourcery.com
Mon Feb 16 20:45:00 GMT 2009
Jakub Jelinek wrote:
>>> After this make_decl_rtl is called, determines the function binds locally and
>>> sets SYMBOL_FLAG_LOCAL|SYMBOL_FLAG_FUNCTION.
>> In general, it's unpleasant to change the RTL for a DECL after it's been
>> created. We do it, but it's a wart.
> This is during duplicate decl processing, we already do call make_decl_rtl
> at least once in that case.
Yes, I guess the patch is OK. You're right that we clearly can't do
anything radical at this point. But:
> In theory we perhaps could defer all rtl
> creation until everything is parsed now that -fno-unit-at-a-time is gone,
We could and should. This would be a clear cleanup in the
phase-ordering in GCC. I'm sure it would eliminate a class of obscure
bugs as well as making the front-ends more purely front-endish and
simpler to boot.
I believe the C++ front-end now has only one place where it actually
does anything with the DECL_RTL, other than just update it in cases like
the one you found. The C front-end also seems to do nothing with
DECL_RTL explicitly.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
More information about the Gcc-patches
mailing list