diff --git a/src/cmd/compile/internal/base/debug.go b/src/cmd/compile/internal/base/debug.go
index 0b5f9d2..c6db1a3 100644
--- a/src/cmd/compile/internal/base/debug.go
+++ b/src/cmd/compile/internal/base/debug.go
@@ -60,6 +60,7 @@
MergeLocalsHash string `help:"hash value for debugging stack slot merging of local variables" concurrent:"ok"`
MergeLocalsTrace int `help:"trace debug output for locals merging"`
MergeLocalsHTrace int `help:"hash-selected trace debug output for locals merging"`
+ Midway int `help:"print information about midway analysis and transformation" concurrent:"ok"`
Nil int `help:"print information about nil checks"`
NoDeadLocals int `help:"disable deadlocals pass" concurrent:"ok"`
NoOpenDefer int `help:"disable open-coded defers" concurrent:"ok"`
diff --git a/src/cmd/compile/internal/midway/analysis.go b/src/cmd/compile/internal/midway/analysis.go
index 45c8ded..6125f8a 100644
--- a/src/cmd/compile/internal/midway/analysis.go
+++ b/src/cmd/compile/internal/midway/analysis.go
@@ -5,6 +5,7 @@
package midway
import (
+ "cmd/compile/internal/base"
"cmd/compile/internal/syntax"
"cmd/compile/internal/types2"
)
@@ -146,6 +147,9 @@
}
if isDep {
+ if base.Debug.Midway > 0 {
+ base.Warn("%v is simd-dependent", obj)
+ }
a.dependentObj[obj] = true
}
return isDep
diff --git a/src/cmd/compile/internal/midway/deepcopy.go b/src/cmd/compile/internal/midway/deepcopy.go
index 40f4158..452f940 100644
--- a/src/cmd/compile/internal/midway/deepcopy.go
+++ b/src/cmd/compile/internal/midway/deepcopy.go
@@ -8,6 +8,7 @@
"fmt"
"strings"
+ "cmd/compile/internal/base"
"cmd/compile/internal/syntax"
"cmd/compile/internal/types2"
)
@@ -75,6 +76,9 @@
if c.analyzer.dependentObj[obj] || isBaseSimdTypeObj(obj) {
newId := syntax.NewName(id.Pos(), id.Value+c.suffix)
// Object link will be handled manually in deepcopier Use/Def mapper
+ if base.Debug.Midway > 0 {
+ base.Warn("Rewriting name %s to %s", id.Value, newId.Value)
+ }
return newId
}
return nil
@@ -94,7 +98,7 @@
if isBaseSimdTypeObj(obj) {
// if it is a name, that means that this is in the simd package,
// and the name must be replaced with a selector referencing
- // the architecture-dependent packages..
+ // the architecture-dependent packages.
name := id.Value
width := nameToElemBitWidth(name)
if width > 0 {
@@ -125,6 +129,9 @@
if c.analyzer.dependentObj[obj] {
newId := syntax.NewName(id.Pos(), id.Value+c.suffix)
// Object link will be handled manually in deepcopier Use/Def mapper
+ if base.Debug.Midway > 0 {
+ base.Warn("Rewriting name %s to %s", id.Value, newId.Value)
+ }
return newId
}
return nil