optimize

package
v0.0.0-...-99d40e0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package optimize analyzes and optimizes Nebula IR.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ControlFlowGraph

func ControlFlowGraph(p *ir.Program) graph.Graph

ControlFlowGraph creates a directed graph with edges representing the connections between basic blocks.

func DependenceGraph

func DependenceGraph(block *ir.BasicBlock) graph.Graph

DependenceGraph creates an undirected graph with edges representing dependencies between nodes.

func Dependent

func Dependent(a, b ir.Inst) bool

Dependent returns whether two non-branching nodes are dependent. True is returned when node B is dependent on node A. Nodes are dependent when both are I/O instructions, one is I/O and the other can throw, both assign to the same value, or one reads the value assigned to by the other. Dependent is reflexive.

func FoldConstArith

func FoldConstArith(p *ir.Program)

FoldConstArith folds and propagates constant arithmetic expressions or identities.

Types

This section is empty.

Jump to

Keyboard shortcuts

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