path

package
v0.0.0-...-f39ad0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2023 License: GPL-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

View Source
const Max_recursive int = 10000
View Source
const Start_length int = 10000

Variables

This section is empty.

Functions

func Delete_useless_bbs

func Delete_useless_bbs(full_path []*ssa.BasicBlock) (result []*ssa.BasicBlock)

func Delete_useless_bbs_locally

func Delete_useless_bbs_locally(full_path []*ssa.BasicBlock) (result []*ssa.BasicBlock)

make sure that all bbs in full_path are of the same fn

func Find_path_by_call_chain

func Find_path_by_call_chain(bb1, bb2 *ssa.BasicBlock, call_chain []*mycallgraph.Call_node) ([]*ssa.BasicBlock, error)

Find_path_by_call_chain can return a slice of basic blocks from bb1 to bb2, depending on a call-chain from bb1 to bb2. This slice is in order and minimum. bb1 and bb2's parents are the head and tail of call-chain

func Find_paths_locally

func Find_paths_locally(bb1, bb2 *ssa.BasicBlock) (paths [][]*ssa.BasicBlock, err error)

can return paths of basic blocks from bb1 to bb2, which are in the same function

func Find_shortest_path_locally

func Find_shortest_path_locally(bb1, bb2 *ssa.BasicBlock) (shortest_path []*ssa.BasicBlock, err error)

Find_shortest_path_locally can return a slice of basic blocks from bb1 to bb2, which are in the same function. This slice is in order and minimum

func List_all_exe_chain

func List_all_exe_chain(fn ssa.Function, end_bb *ssa.BasicBlock) (map[int][]*ssa.BasicBlock, error)

TODO: This function produces many redundant chains during calculation, meaning the algorithm is not efficient;

Every bb can only appear two times in this chain (see function recursive_append_succ)

func Post_dominates

func Post_dominates(pre, post *ssa.BasicBlock) bool

Before using Post_dominates, you should call List_all_exe_chain, and use the result as the second parameter

func Post_dominates_clean

func Post_dominates_clean()

func Post_dominates_prepare

func Post_dominates_prepare(fn ssa.Function) error

Types

type Cond

type Cond struct {
	Cond ssa.Value
	Flag bool
}

func List_cond_of_path

func List_cond_of_path(path []*ssa.BasicBlock, target_bb *ssa.BasicBlock) (result []Cond)

type Myerror

type Myerror struct {
	// contains filtered or unexported fields
}

func (*Myerror) Error

func (e *Myerror) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL