1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:04:43 -07:00
go/ssa
Alan Donovan b5016cbbbd go.tools/ssa: expose dominator tree of control-flow graph in API.
New APIs:
  (*BasicBlock).{Idom,Dominees,Dominates}
  (*Function).DomPreorder

Messy but systematic refactoring of domNode:
- renamed "domInfo".
- embedded directly in BasicBlock, not as pointer. Block field removed.
- Level field removed; was unused.
- Working state of LT algorithm now in its own type.
  {semi,parent,ancestor} fields moved into it.
- remaining fields made private; accessors added.
- use 32-bit ints for pre/postorder numbers.
- allocate LT working space (5 copies of fn.Blocks) contiguously.

dom.go is simpler but somewhat more verbose.

Also:
- we always build the domtree now---yet memory usage is down 5%.
- number the Recover block too.
- add sanity check for DomPreorder.

R=gri
CC=golang-dev
https://golang.org/cl/37230043
2013-12-05 09:50:18 -05:00
..
interp go.tools/ssa: fix builder crash in select { case n, _ := <-c: ... }. 2013-11-21 15:38:58 -05:00
testdata go.tools/ssa: fix crash on (new)(T) due to missing unparen() call. 2013-10-29 11:07:09 -04:00
blockopt.go go.tools/ssa: populate Function.Referrers(), for anon functions. 2013-11-07 10:08:51 -05:00
builder_test.go go.tools/ssa: fix computation of set of types requiring method sets. 2013-10-23 17:07:52 -04:00
builder.go go.tools/ssa: eliminate remaining uses of operands of "untyped" type. 2013-12-04 13:59:55 -05:00
const.go go.tools/ssa: eliminate remaining uses of operands of "untyped" type. 2013-12-04 13:59:55 -05:00
create.go go.tools/ssa: display named types package-qualified using types.TypeString. 2013-11-15 09:21:48 -05:00
doc.go go.tools/ssa: doc tweaks + a sanity check. 2013-10-09 12:47:30 -04:00
dom.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
emit.go go.tools/ssa: fix builder crash in select { case n, _ := <-c: ... }. 2013-11-21 15:38:58 -05:00
example_test.go go.tools/ssa: eliminate remaining uses of operands of "untyped" type. 2013-12-04 13:59:55 -05:00
func.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
lift.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
lvalue.go go.tools/ssa: record lvalue/rvalue distinction precisely in DebugRef. 2013-10-24 18:31:50 -04:00
print.go go.tools/ssa: display named types package-qualified using types.TypeString. 2013-11-15 09:21:48 -05:00
promote.go go.tools/ssa: fix computation of set of types requiring method sets. 2013-10-23 17:07:52 -04:00
sanity.go go.tools/ssa: eliminate remaining uses of operands of "untyped" type. 2013-12-04 13:59:55 -05:00
source_test.go go.tools/ssa: record lvalue/rvalue distinction precisely in DebugRef. 2013-10-24 18:31:50 -04:00
source.go go.tools/ssa: new Function.Syntax() returns the declaring AST (debug mode) or just the Pos/End of the function's extent (otherwise). 2013-10-27 10:55:21 -04:00
ssa.go go.tools/ssa: expose dominator tree of control-flow graph in API. 2013-12-05 09:50:18 -05:00
stdlib_test.go go.tools/ssa: include line count in stdlib_test. 2013-11-01 14:32:44 -04:00
testmain.go go.tools/ssa: don't synthesize an empty "testmain" package. 2013-11-13 16:05:13 -05:00
util.go go.tools/ssa: implement correct control flow for recovered panic. 2013-10-14 15:38:56 -04:00
visit.go go.tools/ssa: fix computation of set of types requiring method sets. 2013-10-23 17:07:52 -04:00