• Heschi Kreinick's avatar
    cmd/compile: use correct stack slots in location lists · 0b6b5641
    Heschi Kreinick authored
    When variables need to be spilled to the stack, they usually get their
    own stack slot. Local variables have a slot allocated if they need one,
    and arguments start out on the stack. Before this CL, the debug
    information made the assumption that this was always the case, and so
    didn't bother storing an actual stack offset during SSA analysis.
    
    There's at least one case where this isn't true: variables that alias
    arguments. Since the argument is the source of the variable, the
    variable will begin its life on the stack in the argument's stack slot,
    not its own. Therefore the debug info needs to track the actual stack
    slot for each location entry.
    
    No detectable performance change, despite the O(N) loop in getHomeSlot.
    
    Change-Id: I2701adb7eddee17d4524336cb7aa6786e8f32b46
    Reviewed-on: https://go-review.googlesource.com/67231Reviewed-by: 's avatarAlessandro Arzilli <alessandro.arzilli@gmail.com>
    Reviewed-by: 's avatarDavid Chase <drchase@google.com>
    0b6b5641
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...