• David Chase's avatar
    cmd/compile: escape analysis explanations added to -m -m output · 2d56dee6
    David Chase authored
    This should probably be considered "experimental" at this stage, but
    what it needs is feedback from adventurous adopters.  I think the data
    structure used for describing escape reasons might be extendable to
    allow a cleanup of the underlying algorithms, which suffers from
    insufficiently separated concerns (the graph does not deal well with
    escape level adjustments, so it is augmented by a second custom-walk
    portion of the "flood" phase. It would be better to put it all,
    including level adjustments, in a single graph structure, and then
    simply flood the graph.
    
    Tweaked to avoid allocations in the no-logging case.
    
    Modified run.go to ignore lines with leading "#" in the output (since
    it can never match a line), and in -update_errors to ignore leading
    tabs in output lines and to normalize embedded filenames.
    
    Currently requires -m -m because otherwise the noise/update
    burden for the other escape tests is considerable.
    
    There is a partial test.  Existing escape analysis tests seem to
    cover all except the panic case and what looks like it might be
    unreachable code in escape analysis.
    
    Fixes #10526.
    
    Change-Id: I2524fdec54facae48b00b2548e25d9e46fcaf832
    Reviewed-on: https://go-review.googlesource.com/18041
    Run-TryBot: David Chase <drchase@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    2d56dee6
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...