Skip to content
Snippets Groups Projects
  • Keith Randall's avatar
    f959fb38
    cmd/compile: add anchored version of SP · f959fb38
    Keith Randall authored
    The SPanchored opcode is identical to SP, except that it takes a memory
    argument so that it (and more importantly, anything that uses it)
    must be scheduled at or after that memory argument.
    
    This opcode ensures that a LEAQ of a variable gets scheduled after the
    corresponding VARDEF for that variable.
    
    This may lead to less CSE of LEAQ operations. The effect is very small.
    The go binary is only 80 bytes bigger after this CL. Usually LEAQs get
    folded into load/store operations, so the effect is only for pointerful
    types, large enough to need a duffzero, and have their address passed
    somewhere. Even then, usually the CSEd LEAQs will be un-CSEd because
    the two uses are on different sides of a function call and the LEAQ
    ends up being rematerialized at the second use anyway.
    
    Change-Id: Ib893562cd05369b91dd563b48fb83f5250950293
    Reviewed-on: https://go-review.googlesource.com/c/go/+/452916
    
    
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Run-TryBot: Keith Randall <khr@golang.org>
    Reviewed-by: default avatarMartin Möhrmann <moehrmann@google.com>
    Reviewed-by: default avatarMartin Möhrmann <martin@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@google.com>
    f959fb38
    History
    cmd/compile: add anchored version of SP
    Keith Randall authored
    The SPanchored opcode is identical to SP, except that it takes a memory
    argument so that it (and more importantly, anything that uses it)
    must be scheduled at or after that memory argument.
    
    This opcode ensures that a LEAQ of a variable gets scheduled after the
    corresponding VARDEF for that variable.
    
    This may lead to less CSE of LEAQ operations. The effect is very small.
    The go binary is only 80 bytes bigger after this CL. Usually LEAQs get
    folded into load/store operations, so the effect is only for pointerful
    types, large enough to need a duffzero, and have their address passed
    somewhere. Even then, usually the CSEd LEAQs will be un-CSEd because
    the two uses are on different sides of a function call and the LEAQ
    ends up being rematerialized at the second use anyway.
    
    Change-Id: Ib893562cd05369b91dd563b48fb83f5250950293
    Reviewed-on: https://go-review.googlesource.com/c/go/+/452916
    
    
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Run-TryBot: Keith Randall <khr@golang.org>
    Reviewed-by: default avatarMartin Möhrmann <moehrmann@google.com>
    Reviewed-by: default avatarMartin Möhrmann <martin@golang.org>
    Reviewed-by: default avatarKeith Randall <khr@google.com>
Code owners
Assign users and groups as approvers for specific file changes. Learn more.