> > Well, technically they survive until after inlining (because of > indirect inlining which also derives information from the lattices > corresponding to node->inlined_to node. Results of arithmetic > functions are not going to be accessed during inlining when compiling > any reasonable program but...
Hmm, this sounds bad. We should move it to GTY then incrementally. I however though that indirect inlining looks only at jump functions, not at lattices? > > > > __attribute__ ((really_bad_attribute)) > > function (int param) > > { > > use param > > } > > > > and then let ipa-cp to invent param is a constant. > > what would be such a "really_bad_attribute" ? Well, we need to go through the attribute list and prepare list of "bad guys" instead of forbidding any attribute. Obviously we should not give up on "pure" attribute, for example. Another class of attributes are those referring to function arguments that needs updating if they are still in use after clonning. I think this was original reason for adding the check. I am not sure if we have attributes that should prevent clonning completely. > > > > > > > > can_change_sigunature will also handle apply_args. > > > > Add VA_START code there, too. For the other use of this flag (in i386) > > > > VA_START > > The last one already is VA_START... or do you mean a different one? I meant the code in ipa-inline-analysis.c doing the same checks but skiiping va_start since i386 backend tests it by itself. > > BTW currently the edges from thunks miss any profile info. > > (i.e. it will be 0). I guess we ought to make ipa-profile pass to estimate > > those > > (it is difficult ot measure count of an alias). > > > > I'm not really looking at the edges from thunks to the actual > function. OTOH, I assume that edges to a thunk do have a count and > look at that. They do have (unless they are thunk to thunk edges), but in any case we ought to regularize things here, sooner or later someone will get confused with counts missing in the callgraph. > > > If you walk only hot edges, then you need to make your function descent into > > both alias refs and thunks calls, or the aliases of thunks will not be seen > > then. > > Well, looking at bits of the patch again now, aliases to thunks might > indeed be a problem for a few pieces of it. I'll send the patch > nevertheless and ponder about this problem later. Hmm, please do :) I will look at the updated patch. Honza > > Thanks, > > Martin