From: Aldy Hernandez <aldyh@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
jason merrill <jason@redhat.com>,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH] Non-working jit patch for debug-early (was Re: [patch 0/10] debug-early merge)
Date: Fri, 08 May 2015 19:14:00 -0000 [thread overview]
Message-ID: <554D0B13.20809@redhat.com> (raw)
In-Reply-To: <1431106701.15215.25.camel@surprise>
On 05/08/2015 10:38 AM, David Malcolm wrote:
> I tested your branch (at 09263eae7c260c305fa19ffa186afd1d89654fb8) with
> the jit configuration from the docs:
>
> ../src/configure \
> --enable-host-shared \
> --enable-languages=jit,c++ \
> --disable-bootstrap \
> --enable-checking=release \
> --prefix=$PREFIX
>
> Sadly, the jit "frontend" fails to compile:
Whoops. My bad. I was unaware `jit' needed to be added to
--enable-languages. I thought it was tested automatically.
>
> ../../src/gcc/jit/jit-playback.c: In member function âvoid
> gcc::jit::playback::context::write_global_decls_2()â:
> ../../src/gcc/jit/jit-playback.c:710:20: error: âconst struct
> gcc_debug_hooksâ has no member named âglobal_declâ
> debug_hooks->global_decl (decl);
The basic idea is that if your globals do NOT make it to
rest_of_decl_compilation(), you need to call
debug_hooks->early_global_decl() on them manually after parsing.
On the other hand, if your functions do NOT make it to the symbol table
then you also need to call debug_hooks->early_global_decl() on them
after parsing (see finalize_compilation_unit()).
The call to debug_hooks->late_global_decl() should be handled
automagically. I mean, I assume your symbols (functions and globals,
etc) make it to the symbol table, in which case they'll be picked up by
either compile_file() or by analyze_functions(). The latter in case the
symbol was optimized away and is about to be removed from the symbol table.
Does this help? If it doesn't, I can gladly take over this on Monday.
> ^
> since the "global_decl" debug hook has gone away. I see that
> LANG_HOOKS_WRITE_GLOBALS
> also is no more, and this leads to various code in the jit becoming
> dead:
> ../../src/gcc/jit/dummy-frontend.c:225:1: warning: âvoid
> jit_langhook_write_globals()â defined but not used [-Wunused-function]
>
>
> The attached patch gets it to compile, and eliminates the now-dead code,
> but it's not clear to me how global variables are meant to be created in
> the debug-early world.
Thanks for working on this.
Aldy
next prev parent reply other threads:[~2015-05-08 19:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-08 0:30 [patch 0/10] debug-early merge Aldy Hernandez
2015-05-08 12:01 ` Richard Biener
2015-05-08 14:48 ` David Malcolm
2015-05-08 15:02 ` Aldy Hernandez
[not found] ` <1431106701.15215.25.camel@surprise>
2015-05-08 19:14 ` Aldy Hernandez [this message]
2015-05-11 8:23 ` Kyrill Tkachov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554D0B13.20809@redhat.com \
--to=aldyh@redhat.com \
--cc=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).