Hi,
the overall description how IPA optimization is structured (describing 
difference in
between simple_ipa_opt_pass and ipa_opt_pass) is in 
http://arxiv.org/pdf/1010.2196v2.pdf
and also in lto.texi.
There is not exactly a tutrial, but generally simple_ipa_opt_pass is easier to 
start
with since you can directly touch function bodies, while ipa_opt_pass needs you 
to split everything into analysis/propagation/modification stages.
So you probably want to start with implementing simple_ipa_opt_pass that does 
what
you need while keeping in mind that you may later turn it intp ipa_opt_pass.

You can look at the existing simple_ipa_opt_passes to see how they are 
structured.
probably the easiest is pass_data_ipa_increase_alignment in tree-vectorizer.c 
that
consist of one function walking all variables.

Honza

Reply via email to