This is the mail archive of the
mailing list for the GCC project.
Re: Completing GCC Go escape analysis in GSoC 2014
- From: Ian Lance Taylor <iant at google dot com>
- To: Ray Li <st dot ray156 at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>
- Date: Sun, 16 Mar 2014 14:28:58 -0700
- Subject: Re: Completing GCC Go escape analysis in GSoC 2014
- Authentication-results: sourceware.org; auth=none
- References: <CAGFYph2W=A_ja6r=GFUzpXoFggdX-FuLS5aBEex6gBdPE9Edgw at mail dot gmail dot com> <CAKOQZ8x_XTPF7qK5j=wS8RyvwcK8eydvMXfgOsR89DRy0a9=ew at mail dot gmail dot com> <CAGFYph1bQdEtvp5hwY1N+1GJOTCMBvSB5hOhWPq_8PWpYRty2w at mail dot gmail dot com>
On Sun, Mar 16, 2014 at 9:59 AM, Ray Li <email@example.com> wrote:
> I have spend these 3 days to read lots of documents about Go and
> gccgo. And scan many papers about escape analysis.
> I plan to use about next 2 days to read more source code of gccgo.
> In order to dig more and come to a more detailed and efficient
> proposal. I need your suggestion:
> -Which codes must I read firstly, and which are the most
> important to read very carefully?
You need to clearly understand the gccgo intermediate representation
and the traversal routines. These are gogo.h, statements.h,
expressions.h, and the Traverse functions and methods. You need to
clearly understand what each expression and statement will do.
> -Do you have suggestions on where should I start? What small
> implementations can I firstly accomplish?
Escape analysis has to be accurate in the sense that it must not miss
any escape opportunities, but I suppose that it does not have to be
complete, in the sense that it's OK to miss some non-escape
opportunities. I would start with in-function analysis.
> -What would be the background knowledge needed? As there would
> be more requirements regarding this specific idea not now obvious.
I don't know.
> -Are there some documentations or papers should I read now?
I don't know of any papers, though I'm sure there are some. There is
a similar idea in Java. You should look at the implementation of
escape analysis in the gc Go compiler, in the file src/cmd/gc/esc.c.