On Sun, Mar 16, 2014 at 9:59 AM, Ray Li <st.ray...@gmail.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.

Ian

Reply via email to