Top Description Fields Constructors Methods
org.droidparts.dexmaker.dx.ssa.back

public Class InterferenceGraph

extends Object
Class Inheritance
Imports
org.droidparts.dexmaker.dx.ssa.SetFactory, org.droidparts.dexmaker.dx.util.IntSet, java.util.ArrayList

A register interference graph

Field Summary

Modifier and TypeField and Description
private final ArrayList<IntSet>
interference

non-null; interference graph, indexed by register in both dimensions

Constructor Summary

AccessConstructor and Description
public
InterferenceGraph(int
>= 0; the start count of registers in the namespace. New registers can be added subsequently.
countRegs
)

Creates a new graph.

Method Summary

Modifier and TypeMethod and Description
public void
add(int
one register index
regV
,
int
another register index
regW
)

Adds a register pair to the interference/liveness graph.

public void
dumpToStdout()

Dumps interference graph to stdout for debugging.

private void
ensureCapacity(int
requested minumum size
size
)

Ensures that the interference graph is appropriately sized.

public void
mergeInterferenceSet(int
>= 0; register
reg
,
IntSet
non-null; interference set; will be merged with set for given register
set
)

Merges the interference set for a register into a given bit set

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

interferenceback to summary
private final ArrayList<IntSet> interference

non-null; interference graph, indexed by register in both dimensions

Constructor Detail

InterferenceGraphback to summary
public InterferenceGraph(int countRegs)

Creates a new graph.

Parameters
countRegs:int

>= 0; the start count of registers in the namespace. New registers can be added subsequently.

Method Detail

addback to summary
public void add(int regV, int regW)

Adds a register pair to the interference/liveness graph. Parameter order is insignificant.

Parameters
regV:int

one register index

regW:int

another register index

dumpToStdoutback to summary
public void dumpToStdout()

Dumps interference graph to stdout for debugging.

ensureCapacityback to summary
private void ensureCapacity(int size)

Ensures that the interference graph is appropriately sized.

Parameters
size:int

requested minumum size

mergeInterferenceSetback to summary
public void mergeInterferenceSet(int reg, IntSet set)

Merges the interference set for a register into a given bit set

Parameters
reg:int

>= 0; register

set:IntSet

non-null; interference set; will be merged with set for given register