http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60911
--- Comment #9 from Jan Hubicka <hubicka at ucw dot cz> --- > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60911 > > --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- > Ah, and tree-ssa-structalias.c does > > /* Build the constraints. */ > FOR_EACH_DEFINED_FUNCTION (node) > { > varinfo_t vi; > /* Nodes without a body are not interesting. Especially do not > visit clones at this point for now - we get duplicate decls > there for inline clones at least. */ > if (!cgraph_function_with_gimple_body_p (node) || node->clone_of) > continue; > cgraph_get_body (node); > > but doesn't apply IPA transforms. I think the kludge in the pass manager > should do that instead. I wonder how the above doesn't trigger the > in_lto_p assert in cgraph_get_body though ... (maybe the odd DECL_RESULT > check makes sure we don't trigger that path). Odd DECL_RESULT check is check if the function is already in memory. It probably should be documented though. The purpose of function is to implement lazy loading of function bodies. If body is already loaded it should do nothing. Making pass manager to read all function bodies prior first enabled late small_ipa pass is definitely possible, but it would mean that every late IPA pass will push up peak memory use of ltrans stage quite a bit. I think PTA should be done on whole program and not here. Late IPA passes (in addition to experiments where this is OK) may be useful for stuff that doesn't need to touch whole program all the time, I think Jakub's SIMD stuff is a good example. What about adding parameter to cgraph_get_body to apply transformations? (inliner and clone materialization needs bodies w/o transforms)