diff options
author | Cherry Zhang <cherryyz@google.com> | 2018-01-09 20:42:08 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2018-01-09 20:42:08 +0000 |
commit | 594d0e51b75c83cec9be74a304217e3f0c49da6c (patch) | |
tree | 970992e35310a150831f81a3e2b91149653faa35 /gcc/go/go-c.h | |
parent | f4f867ca3c54b1bc3d7f6bef824a2d7b78f86c59 (diff) | |
download | gcc-594d0e51b75c83cec9be74a304217e3f0c49da6c.zip gcc-594d0e51b75c83cec9be74a304217e3f0c49da6c.tar.gz gcc-594d0e51b75c83cec9be74a304217e3f0c49da6c.tar.bz2 |
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.
From-SVN: r256393
Diffstat (limited to 'gcc/go/go-c.h')
-rw-r--r-- | gcc/go/go-c.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/go/go-c.h b/gcc/go/go-c.h index 5b3b459..139c233 100644 --- a/gcc/go/go-c.h +++ b/gcc/go/go-c.h @@ -47,6 +47,7 @@ struct go_create_gogo_args bool check_divide_overflow; bool compiling_runtime; int debug_escape_level; + const char* debug_escape_hash; int64_t nil_check_size_threshold; }; |