ipa-sra: Move caller->callee propagation before callee->caller one
This patch does not do any functional changes, it merely moves
top-down propagation in the IPA-SRA WPA phase before bottom-up one.
This also meant moving some preliminary checks from the latter to the
former - where they need to be in their own loop over each SCC because
the subsequent one looks at callers.
Currently the propagations are independent (top-down is used for
return value rermoval, bottom-up for parameter removal and splitting)
but subsequent patches will introduce flags about parameters which
should be propagated from callers first and used in splitting. I
separated this change to test ir independently and make those
subsequent patches cleaner.
While at it, I also replaced couple of FOR_EACH_VEC_ELT macros with
C++11 style iteration.
gcc/ChangeLog:
2022-11-11 Martin Jambor <mjambor@suse.cz>
* ipa-sra.cc (ipa_sra_analysis): Move top-down analysis before
bottom-up analysis. Replace FOR_EACH_VEC_ELT with C++11 iteration.