1
0
mirror of https://github.com/golang/go synced 2024-11-26 04:07:59 -07: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:
Josh Bleecher Snyder 2021-03-07 14:48:08 -08:00
parent aafad20b61
commit b4787201c9
3 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ func decomposeBuiltIn(f *Func) {
}
// 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.
applyRewrite(f, rewriteBlockdec, rewriteValuedec, leaveDeadValues)
if f.Config.RegSize == 4 {

View File

@ -27,7 +27,7 @@ const (
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) {
// repeat rewrites until we find no more rewrites
pendingLines := f.cachedLineStarts // Holds statement boundaries that need to be moved to a new value/block

View File

@ -499,7 +499,7 @@ func (v *Value) removeable() bool {
return false
}
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
// synchronization operations we can't see).
return false