The following adds a helper function to gather SSA use stmts without
duplicates. It steals the only padding bit in gimple to be a
"infrastructure local flag" which should be used only temporarily
and kept cleared. I did not add accessor functions for the flag
to not encourage (ab-)uses.
I have used an auto_vec<gimple *, 2> in the API to avoid heap
allocations for most cases (without doing statistics). I have
verified GCC 7 performs NRV optimization on the copy but I'll
note while auto_vec<gimple *> has copy and assign deleted,
auto_vec<gimple *, N> does not. Adding them breaks pair-fusion.cc
compile. Without using 'auto' or range-for the API use is a bit
awkward as that exposes the number of auto-allocated elements.
The helper can be used in a range-for, see the followup for an
example.
* gimple.h (gimple::pad): Rename to ...
(gimple::ilf): ... this.
* ssa-iterators.h (gather_imm_use_stmts): Declare.
* tree-ssa-operands.cc (gather_imm_use_stmts): New function.