CL 83876 added support of go:noescape pragma, but it only works for functions called from the same package. The pragma did not take effect for exported functions that are not called from the same package. The reason is that top level function declarations are not traversed, and only reached from calls from other functions. This CL adds this support. The Traverse class is extended with a mode to traverse function declarations.
58abbf7964f compiler: support go:noescape cross package
gcc/go/gofrontend/MERGE | 2 +-
gcc/go/gofrontend/escape.cc | 12 +++++++++++-
gcc/go/gofrontend/gogo.cc | 21 +++++++++++++++++++++
gcc/go/gofrontend/gogo.h | 20 +++++++++++++-------
4 files changed, 46 insertions(+), 9 deletions(-)