• Cherry Zhang's avatar
    cmd/compile: in escape analysis, propagate loop depth to field · 5a91c83c
    Cherry Zhang authored
    The escape analysis models "loop depth". If the address of an
    expression is assigned to something defined at a lower (outer)
    loop depth, the escape analysis decides it escapes. However, it
    uses the loop depth of the address operator instead of where
    the RHS is defined. This causes an unnecessary escape if there is
    an assignment inside a loop but the RHS is defined outside the
    loop. This CL propagates the loop depth.
    
    Fixes #24730.
    
    Change-Id: I5ff1530688bdfd90561a7b39c8be9bfc009a9dae
    Reviewed-on: https://go-review.googlesource.com/105257
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    5a91c83c
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...