Commit 4fbf54fa authored by Cherry Zhang's avatar Cherry Zhang

cmd/compile: fix comment that -N does not disable escape analysis

-N does not disable escape analysis. Remove the outdated comment.

Change-Id: I96978b3afd51324b7b4f8035cf4417fb2eac4ebc
Reviewed-on: https://go-review.googlesource.com/79015Reviewed-by: 's avatarDavid Chase <drchase@google.com>
parent 225a2e12
......@@ -173,12 +173,6 @@ func (v *bottomUpVisitor) visitcode(n *Node, min uint32) uint32 {
// then the value can stay on the stack. If the value new(T) does
// not escape, then new(T) can be rewritten into a stack allocation.
// The same is true of slice literals.
//
// If optimizations are disabled (-N), this code is not used.
// Instead, the compiler assumes that any value whose address
// is taken without being immediately dereferenced
// needs to be moved to the heap, and new(T) and slice
// literals are always real allocations.
func escapes(all []*Node) {
visitBottomUp(all, escAnalyze)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment