mirror of
https://github.com/golang/go.git
synced 2026-06-28 03:40:37 +00:00
cmd/compile: remove deadcode
Change-Id: Iadf5c4e24440756a4267d2d27f0336c335b5d463
GitHub-Last-Rev: b42f3a5a88
GitHub-Pull-Request: golang/go#78938
Reviewed-on: https://go-review.googlesource.com/c/go/+/770460
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
This commit is contained in:
parent
d9a6e74180
commit
bb1dde2709
2 changed files with 1 additions and 4 deletions
|
|
@ -52,9 +52,6 @@ func maybeRewriteLoopToDownwardCountingLoop(f *Func, v indVar) {
|
|||
}
|
||||
|
||||
start, end := v.min, v.max
|
||||
if v.step < 0 {
|
||||
start, end = end, start
|
||||
}
|
||||
|
||||
if !start.isGenericIntConst() {
|
||||
// if start is not a constant we would be winning nothing from inverting the loop
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ type indVar struct {
|
|||
min *Value // minimum value, inclusive/exclusive depends on flags
|
||||
max *Value // maximum value, inclusive/exclusive depends on flags
|
||||
entry *Block // the block where the edge from the succeeded comparison of the induction variable goes to, means when the bound check has passed.
|
||||
step int64
|
||||
step int64 // it will always be positive.
|
||||
flags indVarFlags
|
||||
// Invariant: for all blocks dominated by entry:
|
||||
// min <= ind < max [if flags == 0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue