Joern Rennecke
unread,Dec 7, 2009, 3:55:03 AM12/7/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ctuning-d...@googlegroups.com
We have a problem because some 'regular' ipa passes need to have summary
passes run first, then some lto code is being run, and only then the
'regular' ipa passes are being run. If we want to decide what 'regular'
ipa pass to run next depending on the features after running the
previous pass,
we can't predict the set of 'regular' ipa passes that will be run at the
time the summary passes have to run.
I think the best plan to accommodate the summary passes is to always run
them, and only control the matching main 'regular' ipa passes.
I.e. we might end up running a summary pass but not running the matching
'regular' ipa pass. Where this causes problems, we might have to add
a summary clean-up pass which is run after the 'regular' ipa passes
run.
Still, we need to make sure that the summary passes run. In gcc 4.5, there
are four of them, and three of them have gate controlled by a flag:
pass generate_summary gate flag
pass_ipa_cp ipa-cp.c:ipcp_generate_summary -fipa-cp
pass_ipa_inline ipa-inline.c:inline_generate_summary (ungated)
pass_ipa_reference ipa-reference.c:generate_summary -fipa-reference
pass_ipa_pure_const ipa-pure-const.c:generate_summary -fipa-pure-const
For GCC 4.6, we probably want a OVERRIDE_SUMMARY_PASS_GATE, but that
leaves us with the question what to do for GCC 4.5 . I could duplicate
the passes.c:execute_ipa_summary_passes in ici.c in order to have the
callback event right now in ICI, or we could require ICI plugins that want
to manipulate pass execution for now to use the flags
-fipa-cp -fipa-reference -fipa-pure-const
to make sure that the summary passes are being run.