On Wed, Jul 13, 2011 at 10:22, AJM-2 <mcpherson...@gmail.com> wrote: > My question is whether LTO can be used in this way, to have a simple ipa > pass called once at link time with access to the function bodies, and if so > how is this achieved? Â cgraph_function_body_availability seems to only be > half the story.
Yes, it can. You seem to be describing what GCC calls "simple IPA pass". These are passes that cannot run in partitioned LTO mode, as they require the function bodies to operate. Look for passes like pass_ipa_function_and_variable_visibility for an example of a simple IPA pass. Diego.