First cut on outputing gimple for LTO using DWARF3. Discussion invited!!!!

Tom Tromey tromey@redhat.com
Wed Aug 30 19:10:00 GMT 2006


>>>>> "KZ" == Kenneth Zadeck <zadeck@naturalbridge.com> writes:

KZ> 2) To have a discussion about the use of DWARF3.  I am now against the
KZ> use of DWARF3 for encoding the GIMPLE.

FWIW your arguments convinced me.

I think what matters most is that the resulting format be relatively
well documented (say, better than GIMPLE), efficient, suitable, etc.
Reusing DWARF3 seems cute but inessential.

[...]
KZ> +    case TRUTH_NOT_EXPR:
KZ> +    case VIEW_CONVERT_EXPR:
KZ> +#if STUPID_TYPE_SYSTEM
KZ> +      output_type_ref (ob, TREE_TYPE (expr));
KZ> +#endif

I think VIEW_CONVERT_EXPR needs to be treated like NOP_EXPR and
CONVERT_EXPR in the STUPID_TYPE_SYSTEM case.  VIEW_CONVERT_EXPR is a
type-casting expression.

KZ> +/* When we get a strongly typed gimple, which may not be for another
KZ> +   15 years, this flag should be set to 0 so we do not waste so much
KZ> +   space printing out largely redundant type codes.  */
KZ> +#define STUPID_TYPE_SYSTEM 1

You could write a more compact form by emitting explicit "fake nop"
nodes where needed, and then strip those when reading.  I think this
would avoid tweaking the optimizer bugs, as the reloaded trees would
be identical.

This does bring up another point about the format though: there's got
to be some versioning capability in there.

Tom



More information about the Gcc mailing list