> > If you just want to scan every function you have around, the obvious > way to do it is > > For each function > FOR_EACH_BB_FN (function). > > This is probably slightly slower than > > For each function > if cgraph_function_body_availability != NOT_AVAILABLE > FOR_EACH_BB_FN (function) > > But about 20x more intuitive.
Well, what about For each available function FOR_EACH_BB_FN (function). At least that was my plan. You are probably going to do other things to the functions than just walking the CFG (looking into variables/SSA names etc) and thus way you won't get crash either. But I don't have strong feeling here, both alternatives seems OK for me. Honza > > > >cgraph_function_body_availability should be checked by IPA passes > >to see what bodies are there and what can or can not change by > >linking... > Again, this only matters if you care :)