Hi, On Thu, Jul 14, 2011 at 11:28:32PM +0200, Jan Hubicka wrote: > > > > 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?
You are right, that is however basically an omission of mine - it was supposed to handle the case below but I do not look into the lattices. I will fix that later. Nevertheless, the calls to ipa_cst_from_jfunc from ipa-inline-analyzis.c do access the values of lattices. Potentially all of them. So I will GTY lattices too. Thanks, Martin /* Verify that simple indirect calls are inlined even without early inlining.. */ /* { dg-do compile } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */ extern void non_existent(int); int __attribute__ ((noinline,noclone)) get_input(void) { return 1; } static void hooray () { non_existent (1); } void hip2 (void (*g)()) { non_existent (2); g (); } static void __attribute__ ((noinline)) hip1 (void (*f)(void (*)()), void (*g)()) { non_existent (2); f (g); } int main (int argc, int *argv[]) { int i; for (i = 0; i < get_input (); i++) hip1 (hip2, hooray); return 0; } /* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in main" "inline" } } */ /* { dg-final { scan-ipa-dump "hip2\[^\\n\]*inline copy in main" "inline" } } */ /* { dg-final { cleanup-ipa-dump "inline" } } */