compiler: set captured variable address to nonescape until further flooded
commitc7fe5993647827df7289762018b0d4d56b9f6670
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2018 23:43:23 +0000 (9 23:43 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Jan 2018 23:43:23 +0000 (9 23:43 +0000)
tree7caa556f1ebfcdaa15f65cd2e09266a79be3a052
parent8c40c59f4021f81379009b3d53e71486288b5c0d
compiler: set captured variable address to nonescape until further flooded

    The escape analysis models closures by flowing captured variable
    address to the closure node. However, the escape state for the
    address expressions remained unset as ESCAPE_UNKNOWN. This
    caused later passes to conclude that the address escapes. Fix this by
    setting its escape state to ESCAPE_NONE first. If it escapes
    (because the closure escapes), the flood phase will set its
    escape state properly.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256411 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/go/gofrontend/MERGE
gcc/go/gofrontend/escape.cc