• Heschi Kreinick's avatar
    cmd/compile: cover control flow insns in location lists · 6bbe1bc9
    Heschi Kreinick authored
    The information that's used to generate DWARF location lists is very
    ssa.Value centric; it uses Values as start and end coordinates to define
    ranges. That mostly works fine, but control flow instructions don't come
    from Values, so the ranges couldn't cover them.
    
    Control flow instructions are generated when the SSA representation is
    converted to assembly, so that's the best place to extend the ranges
    to cover them. (Before that, there's nothing to refer to, and afterward
    the boundaries between blocks have been lost.) That requires block
    information in the debugInfo type, which then flows down to make
    everything else awkward. On the plus side, there's a little less copying
    slices around than there used to be, so it should be a little faster.
    
    Previously, the ranges for empty blocks were not very meaningful. That
    was fine, because they had no Values to cover, so no debug information
    was generated for them. But they do have control flow instructions
    (that's why they exist) and so now it's important that the information
    be correct. Introduce two sentinel values, BlockStart and BlockEnd, that
    denote the boundary of a block, even if the block is empty. BlockEnd
    replaces the previous SurvivedBlock flag.
    
    There's one more problem: the last instruction in the function will be a
    control flow instruction, so any live ranges need to be extended past
    it. But there's no instruction after it to use as the end of the range.
    Instead, leave the EndProg field of those ranges as nil and fix it up to
    point to past the end of the assembled text at the very last moment.
    
    Change-Id: I81f884020ff36fd6fe8d7888fc57c99412c4245b
    Reviewed-on: https://go-review.googlesource.com/63010Reviewed-by: 's avatarAlessandro Arzilli <alessandro.arzilli@gmail.com>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    Run-TryBot: Heschi Kreinick <heschi@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    6bbe1bc9
Name
Last commit
Last update
..
archive Loading commit data...
bufio Loading commit data...
builtin Loading commit data...
bytes Loading commit data...
cmd Loading commit data...
compress Loading commit data...
container Loading commit data...
context Loading commit data...
crypto Loading commit data...
database/sql Loading commit data...
debug Loading commit data...
encoding Loading commit data...
errors Loading commit data...
expvar Loading commit data...
flag Loading commit data...
fmt Loading commit data...
go Loading commit data...
hash Loading commit data...
html Loading commit data...
image Loading commit data...
index/suffixarray Loading commit data...
internal Loading commit data...
io Loading commit data...
log Loading commit data...
math Loading commit data...
mime Loading commit data...
net Loading commit data...
os Loading commit data...
path Loading commit data...
plugin Loading commit data...
reflect Loading commit data...
regexp Loading commit data...
runtime Loading commit data...
sort Loading commit data...
strconv Loading commit data...
strings Loading commit data...
sync Loading commit data...
syscall Loading commit data...
testing Loading commit data...
text Loading commit data...
time Loading commit data...
unicode Loading commit data...
unsafe Loading commit data...
vendor/golang_org/x Loading commit data...
Make.dist Loading commit data...
all.bash Loading commit data...
all.bat Loading commit data...
all.rc Loading commit data...
androidtest.bash Loading commit data...
bootstrap.bash Loading commit data...
buildall.bash Loading commit data...
clean.bash Loading commit data...
clean.bat Loading commit data...
clean.rc Loading commit data...
cmp.bash Loading commit data...
iostest.bash Loading commit data...
make.bash Loading commit data...
make.bat Loading commit data...
make.rc Loading commit data...
naclmake.bash Loading commit data...
nacltest.bash Loading commit data...
race.bash Loading commit data...
race.bat Loading commit data...
run.bash Loading commit data...
run.bat Loading commit data...
run.rc Loading commit data...