aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/lang.opt
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2018-01-09 20:42:08 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-01-09 20:42:08 +0000
commit594d0e51b75c83cec9be74a304217e3f0c49da6c (patch)
tree970992e35310a150831f81a3e2b91149653faa35 /gcc/go/lang.opt
parentf4f867ca3c54b1bc3d7f6bef824a2d7b78f86c59 (diff)
downloadgcc-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/lang.opt')
-rw-r--r--gcc/go/lang.opt4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/go/lang.opt b/gcc/go/lang.opt
index 3cc8f33..6dbb542 100644
--- a/gcc/go/lang.opt
+++ b/gcc/go/lang.opt
@@ -81,6 +81,10 @@ fgo-debug-escape
Go Joined UInteger Var(go_debug_escape_level) Init(0)
Emit debugging information related to the escape analysis pass when run with -fgo-optimize-allocs.
+fgo-debug-escape-hash=
+Go Joined RejectNegative Var(go_debug_escape_hash) Init(0)
+-fgo-debug-escape-hash=<string> Hash value to debug escape analysis.
+
o
Go Joined Separate
; Documented in common.opt