mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: minor doc improvements
These are left over from comments I failed to leave on CL 249463; apparently I never hit "Reply". Change-Id: Ia3f8a900703c347f8f98581ec1ac172c0f72cd9e Reviewed-on: https://go-review.googlesource.com/c/go/+/299589 Trust: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
aafad20b61
commit
b4787201c9
3 changed files with 3 additions and 3 deletions
|
|
@ -24,7 +24,7 @@ func decomposeBuiltIn(f *Func) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decompose other values
|
// Decompose other values
|
||||||
// Note: deadcode is false because we need to keep the original
|
// Note: Leave dead values because we need to keep the original
|
||||||
// values around so the name component resolution below can still work.
|
// values around so the name component resolution below can still work.
|
||||||
applyRewrite(f, rewriteBlockdec, rewriteValuedec, leaveDeadValues)
|
applyRewrite(f, rewriteBlockdec, rewriteValuedec, leaveDeadValues)
|
||||||
if f.Config.RegSize == 4 {
|
if f.Config.RegSize == 4 {
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const (
|
||||||
removeDeadValues = true
|
removeDeadValues = true
|
||||||
)
|
)
|
||||||
|
|
||||||
// deadcode indicates that rewrite should try to remove any values that become dead.
|
// deadcode indicates whether rewrite should try to remove any values that become dead.
|
||||||
func applyRewrite(f *Func, rb blockRewriter, rv valueRewriter, deadcode deadValueChoice) {
|
func applyRewrite(f *Func, rb blockRewriter, rv valueRewriter, deadcode deadValueChoice) {
|
||||||
// repeat rewrites until we find no more rewrites
|
// repeat rewrites until we find no more rewrites
|
||||||
pendingLines := f.cachedLineStarts // Holds statement boundaries that need to be moved to a new value/block
|
pendingLines := f.cachedLineStarts // Holds statement boundaries that need to be moved to a new value/block
|
||||||
|
|
|
||||||
|
|
@ -499,7 +499,7 @@ func (v *Value) removeable() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if v.Type.IsMemory() {
|
if v.Type.IsMemory() {
|
||||||
// All memory ops aren't needed here, but we do need
|
// We don't need to preserve all memory ops, but we do need
|
||||||
// to keep calls at least (because they might have
|
// to keep calls at least (because they might have
|
||||||
// synchronization operations we can't see).
|
// synchronization operations we can't see).
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue