Change-Id: I2d287981d5fcef3aace948c405d618f46200948e
Reviewed-on: https://go-review.googlesource.com/41450
Run-TryBot: Todd Neal <todd@tneal.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
import (
"cmd/internal/obj"
- "crypto/sha1"
"fmt"
"math"
"os"
"path/filepath"
- "strings"
)
func applyRewrite(f *Func, rb blockRewriter, rv valueRewriter) {
return y
}
-func experiment(f *Func) bool {
- hstr := ""
- for _, b := range sha1.Sum([]byte(f.Name)) {
- hstr += fmt.Sprintf("%08b", b)
- }
- r := strings.HasSuffix(hstr, "00011")
- _ = r
- r = f.Name == "(*fmt).fmt_integer"
- if r {
- fmt.Printf(" enabled for %s\n", f.Name)
- }
- return r
-}
-
func isConstZero(v *Value) bool {
switch v.Op {
case OpConstNil: