compiler: improve escape analysis
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 25 Jun 2018 22:23:49 +0000 (22:23 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 25 Jun 2018 22:23:49 +0000 (22:23 +0000)
commit787732cdd12218f31dced23a9c427b29c721a9d6
treeba26ce38ad8bff564c5420b549f769a10d715f43
parent4fdb6fb6aebfba933ee8b07ff395d236180b5d67
compiler: improve escape analysis

    This CL ports recent enhancements of the escape analysis in the
    gc compiler to gofrontend.

    - CL 99335: unnamed receiver should not escape.

    - CL 105257: propagate loop depth to field. This prevents it
      from escaping when a field's address is taken inside a loop
      (but not otherwise escape).

    - CL 107597: use element type for "indirection" of slice/string.
      This prevents the slice/string from escaping when only the
      element, in case that it is pointerless, flows to outer scope.

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

From-SVN: r262120
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/escape.cc