// TODO(gri) Determine if they are already sorted
// in which case we can drop this step.
var methods []*types.Field
- for _, m := range t.Methods().Slice() {
- methods = append(methods, m)
- }
+ methods = append(methods, t.Methods().Slice()...)
sort.Sort(methodbyname(methods))
p.int(len(methods))
sdom = newSparseTree(f, f.Idom())
fmt.Printf("after %s = %s\n", f.Name, sdom.treestructure(f.Entry))
}
-
- return
}
// newPhiFor inserts a new Phi function into b,
}
oldSched = append(oldSched[:0], b.Values[nphi:]...)
b.Values = b.Values[:nphi]
- for _, v := range start[b.ID] {
- b.Values = append(b.Values, v)
- }
+ b.Values = append(b.Values, start[b.ID]...)
for _, v := range oldSched {
b.Values = append(b.Values, v)
- for _, w := range after[v.ID] {
- b.Values = append(b.Values, w)
- }
+ b.Values = append(b.Values, after[v.ID]...)
}
}
}
pos src.XPos // source position of next use
}
-// dblock contains information about desired & avoid registers at the end of a block.
-type dblock struct {
- prefers []desiredStateEntry
- avoid regMask
-}
-
// computeLive computes a map from block ID to a list of value IDs live at the end
// of that block. Together with the value ID is a count of how many instructions
// to the next use of that value. The resulting map is stored in s.live.