AVR: target/127032 - Tag object files with the bit sizes of [long] double

This patch outputs .gnu_attribute tags for the bit sizes
of long double (12 = Tag_GNU_AVR_BITS_LONG_DOUBLE) resp.
double (8 = Tag_GNU_AVR_BITS_DOUBLE).

The recently introduced gimple mini-pass avr_pass_has
now scans the code for the presence of [long] double,
and avr_file_end performs similar scans on the varpool.

There are cases where libgcc shares multilibs when they
don't depend on -m[long-]double=X, so that just emitting
.gnu_attribute *.X according to -m[long-]double=X is too strict.

The patch uses the .gnu_attribute's as introduced in
https://sourceware.org/PR34557 for Binutils 2.48.

The patch passes without new regressions.

	PR target/127032
gcc/
	* config/avr/avr.md (Tag_GNU_AVR_BITS_LONG_DOUBLE)
	(Tag_GNU_AVR_BITS_DOUBLE): New define_constants.
	* config/avr/avr.cc (avr_uses_long_double_p)
	(avr_uses_double_p): New static variables.
	(avr_find_double): New function.
	(avr_file_end) [HAVE_AS_AVR_GNU_ATTRIBUTE]: Run avr_find_double
	on each varpool node.  Output .gnu_attribute according to
	avr_uses_long_double_p and avr_uses_double_p.
	* config/avr/avr-passes.cc (gimple-walk.h): Include.
	(avr_pass_has) <op_callback>: New static method.
	<scan_bb>: Use it in walk_gimple_op.
	<execute>: Set up walk_stmt_info and pass it to scan_bb.
	* config/avr/avr-passes.def (avr_pass_has): Adjust comment.
	* config/avr/avr-protos.h (avr_find_double): New proto.
5 files changed