Greetings,
Thanks for being patient with me as I figure out where to start but
seems here is a good place:
+ /*TODO Walk Pass with Threads*/
+ void walk_small_ipa_passes(function *fun) {
+ while(all_small_ipa_passes != NULL) {
+ all_small_passes->execute(fun);
+ all_small_ipa_passes = all_small_ipa_passes->next;
+ }
+ }
+ /*TODO Walk Pass with Threads*/
+ void walk_regular_ipa_passes(function *fun) {
+ while(all_regular_ipa_passes != NULL) {
+ all_regular_passes->execute(fun);
+ all_regular_ipa_passes = all_small_ipa_passes->next;
+ }
+ }
+ /*TODO Walk Pass with Threads*/
+ void walk_late_ipa_passes(function *fun) {
+ while(all_small_ipa_passes != NULL) {
+ all_late_passes->execute(fun);
+ all_late_ipa_passes = all_small_ipa_passes->next;
+ }
These are a set of functions that can or should walk the root downward
and execute a pass
on the given function passed in and would be launched in async. I'm a
few questions about
doing this:
1. Is this safe in terms of a particular pass type running all of its
passes in linear and not
reordering. Seems so after reading pass.def but not sure if that's
correct or something
can reorder passes elsewhere. I'm assuming not.
2. The core pass manager class has very few callers and the only I'm
noticing with grep
are in cgraph or other such files. I'm wondering how to call these
functions from callers
on a per function basis. Seems the best thing is to insert them at the
beginning of the
pass manager execute per function. There doesn't seem to be a place for
this outside
of pass.def. So no idea if we need to inject a parent pass for all
passes to do this. I would
prefer not to do so for but it seems the only way.
3. Not sure how to do this for gimple or rtl as those are not declared
as a opt_pass
root node for tree. Is this assumed for a reason as the manual nor the
code mentions
why ipa passes are root nodes but not gimple or rtl.
Thanks and I'm aware of the gate version that would be required as well
to only
execute if true,
Nick