This is the mail archive of the gcc-patches@gcc.gnu.org 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: [lto][patch] Clear DECL_CONTEXT of PARM_DECL


> This isn't right.  If you set the context to NULL, the optimizers
> will think that PARM_DECLs are call-clobbered, but they aren't.
> The right thing here is to set them to the FUNCTION_DECL to which
> they belong.  If the function has been inlined the inliner will
> set it to the caller function.

If that was the case, we wouldn't have a problem. We are writing out a
reference to a function that has been inlined in all call sites
because it is reachable via a DECL_CONTEXT of a variable.

Do you have a testcase that fails with this patch? I don't think we
should keep information we don't need.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047


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