cselib: Simplify references_value_p

The previous patch removed the only caller of references_value_p
to want the only_useless behaviour.  This patch therefore removes
that parameter and converts the function to an iterator.

I don't have numbers to show that using an iterator is better after the
previous patch.  But converting to an iterator was the first low-hanging
fruit that I tried for the insn-extract.cc slowness, at a time when
references_value_p accounted for over 50% of compile time on aarch64.
It made a significant difference then.

gcc/
	* cselib.h (references_value_p): Remove only_useless parameter.
	* cselib.cc (references_value_p): Likewise.  Use rtx iterators.
	(invariant_or_equiv_p): Update accordingly.
	* postreload.cc (reload_cse_simplify_set): Likewise.
	* var-tracking.cc (reverse_op): Likewise.
4 files changed