> On 03/30/2015 02:36 PM, Jan Hubicka wrote: > >Will there be only one copy even on targets that do not support aliases? > > Yes, on those targets we use thunks.
I see, and only if thinks fails on variadic arguments we lose, right? > > >Still, it would be great if we can make context to be the actual function. > > That sounds messy. > > >Otherwise I will need to figure out some way to represent the link in between > >static variable and function it takes label of... > > Check DECL_ORIGIN of the label's function? What I am trying to do is to easily get a way IPA code can group the function with static variables referring its initializers without actually needing to introduce new representation by ipa-ref. So I added a flag to static variables and when walking symbol table I only have the static variable decl at hand (no constructor) and want to get back to the containing function that define its label. I hoped we are safe to use the decl_function_context, because these functions are never cloned, but here we just get ready for cloning without actually doing it ;). Can you thnk of way of doing so easily? I suppose I may just go with patch as it is and silecne the ICE for this stage4 or develop more involved fix with the extra reference represented somehow which may be better to wait for next stage1 and be backported. I will try to think about it bit more today. Honza > > Jason