compiler: add escape analysis debug hash
commit90c9213c4b6efb320e27e2cb534fe1a5895cf78d
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2018 20:42:08 +0000 (9 20:42 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2018 20:42:08 +0000 (9 20:42 +0000)
tree970992e35310a150831f81a3e2b91149653faa35
parentc0aa824d02a993ddd3ee927bb7aaf1cda13b8def
compiler: add escape analysis debug hash

    Add a flag -fgo-debug-escape-hash for debugging escape analysis.
    It takes a binary string, optionally led by a "-", as argument.
    When specified, the escape analysis runs only on functions whose
    name is hashed to a value with matching suffix. The "-" sign
    negates the match, i.e. the analysis runs only on functions with
    non-matching hash.

    Reviewed-on: https://go-review.googlesource.com/83878

* lang.opt (fgo-debug-escape-hash): New option.
* go-c.h (struct go_create_gogo_args): Add debug_escape_hash
field.
* go-lang.c (go_langhook_init): Set debug_escape_hash field.
* gccgo.texi (Invoking gccgo): Document -fgo-debug-escape-hash.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256393 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/ChangeLog
gcc/go/gccgo.texi
gcc/go/go-c.h
gcc/go/go-lang.c
gcc/go/gofrontend/escape.cc
gcc/go/gofrontend/go.cc
gcc/go/gofrontend/gogo.h
gcc/go/lang.opt