This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH (for next stage 1)] Add return type to gimple function dumps
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 11 Mar 2014 12:22:35 +0100
- Subject: Re: [PATCH (for next stage 1)] Add return type to gimple function dumps
- Authentication-results: sourceware.org; auth=none
- References: <1394479369 dot 26367 dot 17 dot camel at surprise>
On Mon, Mar 10, 2014 at 8:22 PM, David Malcolm <dmalcolm@redhat.com> wrote:
> Gimple function dumps contain the types of parameters, but not of the
> return type.
>
> The attached patch fixes this omission; here's an example of the
> before/after diff:
> $ diff -up /tmp/pr23401.c.004t.gimple.old /tmp/pr23401.c.004t.gimple.new
> --- /tmp/pr23401.c.004t.gimple.old 2014-03-10 13:40:08.972063541 -0400
> +++ /tmp/pr23401.c.004t.gimple.new 2014-03-10 13:39:49.346515464 -0400
> @@ -1,3 +1,4 @@
> +int
> ffff (int i)
> {
> int D.1731;
>
>
> Successfully bootstrapped and regrtested on x86_64 Linux (Fedora 20).
>
> A couple of test cases needed tweaking, since they were counting the
> number of occurrences of "int" in the gimple dump, which thus changed
> for functions returning int (like the one above).
>
> OK for next stage 1?
ISTR doing that and giving up because of the sheer number of
testsuite FAILs this causes. Did you properly test all languages
(I specifically remember Fortran here).
You also want to pass dump_flags | TDF_SLIM here otherwise
you'll get struct types expanded.
Richard.
> [motivation: am generating code in my JIT from other program's
> representations, and have been debugging type mismatches in function
> calls; the precise return types would otherwise have been non-obvious]