FAQ
Reviewers: gri,

Message:
Hello gri@golang.org (cc: golang-dev@googlegroups.com),

I'd like you to review this change to
https://code.google.com/p/go.tools


Description:
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.

Please review this at https://codereview.appspot.com/37230043/

Affected files (+159, -124 lines):
    M ssa/dom.go
    M ssa/func.go
    M ssa/lift.go
    M ssa/ssa.go


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 4, '13 at 5:38p
activeDec 4, '13 at 5:38p
posts1
users1
websitegolang.org

1 user in discussion

Adonovan: 1 post

People

Translate

site design / logo © 2021 Grokbase