middle-end/111975 - dump -> GIMPLE FE roundtrip improvements
commit88a398a487ee37f1fc7850740f2d94d895657646
authorRichard Biener <rguenther@suse.de>
Mon, 18 Dec 2023 12:40:46 +0000 (18 13:40 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 18 Dec 2023 14:25:50 +0000 (18 15:25 +0100)
tree3e99e945931273744aa46bf53ac5a01ae4c02859
parentac9c81dd76cfc34ed53402049021689a61c6d6e7
middle-end/111975 - dump -> GIMPLE FE roundtrip improvements

The following improves the manual work needed to make a -gimple dump
valid input to the GIMPLE FE.  First of all it recognizes the 'sizetype'
tree and dumps it as __SIZETYPE__, then it changes dumping vector types
without name from 'vector(n) T' to 'T [[gnu::vector_size(n')]]' which
we can parse in most relevant contexts (and that's shorter than
using __attribute__).  Third it avoids a NULL_TREE TMR_STEP when
it would be one, an optimization that's re-done when generating RTL.

PR middle-end/111975
* tree-pretty-print.cc (dump_generic_node): Dump
sizetype as __SIZETYPE__ with TDF_GIMPLE.
Dump unnamed vector types as T [[gnu::vector_size(n)]] with
TDF_GIMPLE.
* tree-ssa-address.cc (create_mem_ref_raw): Never generate
a NULL STEP when INDEX is specified.
gcc/tree-pretty-print.cc
gcc/tree-ssa-address.cc