You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found it essential to find post dominance in SSA functions for a lock-unlock analysis [here (https://arxiv.org/pdf/2106.01710.pdf).
The code using the post dominance can be seen here.
Constructing and exposing post dominance in an SSA Function is relatively simple. It can reuse most of the code available for dominance. I have an example buildPostdomtree()here.
We need to add APIs such as:
The text was updated successfully, but these errors were encountered:
seankhliao
changed the title
[Proposal] x/tools/go/ssa: Add Postdominator to Function/BasicBlock.
proposal: x/tools/go/ssa: add Postdominator to Function/BasicBlock
Jun 26, 2021
Unlike dominance, the go/ssa package has no need for postdominance, so I don't think it should go to the trouble of computing it. But since go/ssa exposes the control-flow graph, it shouldn't be hard for clients that need it to compute it externally as the need arises.
Once there's an external implementation, we could consider a proposal to move it to a subpackage of go/ssa.
https://pkg.go.dev/golang.org/x/tools/go/ssa#Function does not build or expose post-dominator relationships among its constituent basic basics.
I found it essential to find post dominance in SSA functions for a lock-unlock analysis [here (https://arxiv.org/pdf/2106.01710.pdf).
The code using the post dominance can be seen here.
Constructing and exposing post dominance in an SSA Function is relatively simple. It can reuse most of the code available for dominance. I have an example
buildPostdomtree()
here.We need to add APIs such as:
func (b *BasicBlock) PostDominees() []*BasicBlock
func (b *BasicBlock) PostDominates(c *BasicBlock) bool
func (f *Function) PostdomPreorder() []*BasicBlock
func (f *Function) PostdomPostorder() []*BasicBlock {
func (b *BasicBlock) Ipdom() *BasicBlock
All of these are prototyped here.
The text was updated successfully, but these errors were encountered: