mirror of
https://github.com/golang/go
synced 2024-11-12 08:50:22 -07:00
186cf1b9ba
Instead of trying to delete dead code as soon as we find it, just mark it as dead using a PlainAndDead block kind. The deadcode pass will do the real removal. This way is somewhat more efficient because we don't need to mess with successor and predecessor lists of all the dead blocks. Fixes #12347 Change-Id: Ia42d6b5f9cdb3215a51737b3eb117c00bd439b13 Reviewed-on: https://go-review.googlesource.com/14033 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
17 lines
264 B
Go
17 lines
264 B
Go
// compile
|
|
|
|
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package p
|
|
|
|
func f_ssa(x int, p *int) {
|
|
if false {
|
|
y := x + 5
|
|
for {
|
|
*p = y
|
|
}
|
|
}
|
|
}
|