mirror of
https://github.com/golang/go
synced 2024-10-05 18:21:21 -06:00
[dev.ssa] cmd/compile: fix build
CL 14337 made SSA support fixedbugs/issue9604b.go. That test contains > 40k blocks. This made the O(n^2) dom algorithm fail to terminate in a reasonable length of time, breaking the build. For the moment, cap the number of blocks to fix the build. This will be reverted when a more efficient dom algorithm is put in place, which will be soon. Change-Id: Ia66c2629481d29d06655ec54d1deff076b0422c6 Reviewed-on: https://go-review.googlesource.com/14342 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
4178f20776
commit
95bb89f6dd
@ -10,6 +10,11 @@ import "sort"
|
|||||||
// Values are just relinked, nothing is deleted. A subsequent deadcode
|
// Values are just relinked, nothing is deleted. A subsequent deadcode
|
||||||
// pass is required to actually remove duplicate expressions.
|
// pass is required to actually remove duplicate expressions.
|
||||||
func cse(f *Func) {
|
func cse(f *Func) {
|
||||||
|
if f.NumBlocks() > 10000 {
|
||||||
|
f.Unimplementedf("too many blocks: %d", f.NumBlocks())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Two values are equivalent if they satisfy the following definition:
|
// Two values are equivalent if they satisfy the following definition:
|
||||||
// equivalent(v, w):
|
// equivalent(v, w):
|
||||||
// v.op == w.op
|
// v.op == w.op
|
||||||
|
Loading…
Reference in New Issue
Block a user