From 594d0e51b75c83cec9be74a304217e3f0c49da6c Mon Sep 17 00:00:00 2001 From: Cherry Zhang Date: Tue, 9 Jan 2018 20:42:08 +0000 Subject: 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 --- gcc/go/go-lang.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/go/go-lang.c') diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index e47036f..b5d8224 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -116,6 +116,7 @@ go_langhook_init (void) args.check_divide_overflow = go_check_divide_overflow; args.compiling_runtime = go_compiling_runtime; args.debug_escape_level = go_debug_escape_level; + args.debug_escape_hash = go_debug_escape_hash; args.nil_check_size_threshold = TARGET_AIX ? -1 : 4096; args.linemap = go_get_linemap(); args.backend = go_get_backend(); -- cgit v1.1