| Modifier and Type | Field and Description |
|---|---|
| private boolean | backMode
"back-convert mode". |
| private ArrayList | blocks
basic blocks, indexed by block index |
| private int | borrowedSpareRegisters
current count of spare registers used |
| private SsaInsn[] | definitionList
indexed by register: the insn where said register is defined or null if undefined. |
| private int | entryBlockIndex
Index of first executed block in method |
| private int | exitBlockIndex
Index of exit block, which exists only in SSA form,
or or |
| private final boolean | isStatic
true if this method has no |
| private int | maxLabel
really one greater than the max label |
| private final int | paramWidth
the total width, in register-units, of the method's parameters |
| private int | registerCount
total number of registers required |
| private int | spareRegisterBase
first register number to use for any temporary "spares" |
| private List | unmodifiableUseList
A version of useList with each List unmodifiable |
| private ArrayList | useList
indexed by register: the list of all insns that use a register |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static BitSet | Returns: BitSet of block indicesRop blocks blocks, IntList list of rop block labels labelList)Builds a BitSet of block indices from a basic block list and a list of labels taken from Rop form. |
| public int | |
| public int | Returns: register number to usewidth (1 or 2) of the register category)Borrows a register to use as a temp. |
| private void | |
| public void | |
| private void | |
| public void | deleteInsns(Set<SsaInsn>
non-null; insns to deleteDeletes all insns in the set from this method. |
| public void | forEachBlockDepthFirst(boolean
true if this should walk backwards from the exit points reverse, SsaBasicBlock.non-null; callback interface. parent is set
unless this is the root nodeWalks the basic block tree in depth-first order, calling the visitor method once for every block. |
| public void | forEachBlockDepthFirstDom(SsaBasicBlock.
non-null; callback interfaceVisits blocks in dom-tree order, starting at the current node. |
| public void | |
| public void | |
| public ArrayList | |
| public int | Returns: >= 0; number of reachable basic blocksReturns the count of reachable blocks in this method: blocks that have predecessors (or are the start block) |
| public SsaInsn | Returns: insn (actual instance from code) that defined this reg or null if reg is not defined.register in question reg)Returns the insn that defines the given register |
| public SsaBasicBlock | |
| public int | |
| public SsaBasicBlock | |
| public int | |
| private static SsaInsn | Returns: an appropriately-constructed instance.block to which this GOTO will be added
(not it's destination!) block)Gets a new |
| public int | |
| public int | |
| public ArrayList | Returns: modifiable copy of the use-list, indexed by registerReturns a modifiable copy of the register use list. |
| public List | Returns: unmodifiable instruction listregister in question reg)Returns the list of all source uses (not results) for a register. |
| public static IntList | Returns: IntList of block indicesRop blocks ropBlocks, IntList list of rop block labels labelList)Builds an IntList of block indices from a basic block list and a list of labels taken from Rop form. |
| public boolean | Returns: true if reg is ever associated with a localnon-null; ssa regChecks to see if the given SSA reg is ever associated with a local local variable. |
| public boolean | |
| pack-priv void | |
| public SsaBasicBlock | Returns: new blockMakes a new basic block for this method, which is empty besides
a single |
| public int | |
| public void | |
| public static SsaMethod | newFromRopMethod(RopMethod
rop-form method to convert from ropMethod, int the total width, in register-units, of the
method's parameters paramWidth, boolean true if this method has no this
pointer argument
|
| pack-priv void | |
| pack-priv void | |
| public void | onInsnsChanged()
Indicates that the instruction list has changed or the SSA register count has increased, so that internal datastructures that rely on it should be rebuild. |
| pack-priv void | onSourceChanged(SsaInsn
non-null; insn being changednull-ok; The source that was used, if
applicablenon-null; the new source being usedUpdates the use list for a single change in source register. |
| pack-priv void | onSourcesChanged(SsaInsn
insn non-null; insn being changed.
insn.getSources() must return the new source list.null-ok; list of sources that were
previously usedUpdates the use list for a source list change. |
| private void | removeFromUseList(SsaInsn
non-null; insn in questionnull-ok; registers whose use lists
insn should be removed formRemoves a given |
| public void | |
| public void | |
| pack-priv void | |
| pack-priv void | updateOneDefinition(SsaInsn
non-null; insn who's result should be recorded as
a definitionnull-ok; a previous result that should
be no longer considered a definition by this insnUpdates a single definition. |
| backMode | back to summary |
|---|---|
| private boolean backMode "back-convert mode". Set during back-conversion when registers are about to be mapped into a non-SSA namespace. When true, use and def lists are unavailable. Todo Remove this mode, and place the functionality elsewhere | |
| blocks | back to summary |
|---|---|
| private ArrayList<SsaBasicBlock> blocks basic blocks, indexed by block index | |
| borrowedSpareRegisters | back to summary |
|---|---|
| private int borrowedSpareRegisters current count of spare registers used | |
| definitionList | back to summary |
|---|---|
| private SsaInsn[] definitionList indexed by register: the insn where said register is defined or null if undefined. null until (lazily) created. | |
| entryBlockIndex | back to summary |
|---|---|
| private int entryBlockIndex Index of first executed block in method | |
| exitBlockIndex | back to summary |
|---|---|
| private int exitBlockIndex Index of exit block, which exists only in SSA form,
or or | |
| isStatic | back to summary |
|---|---|
| private final boolean isStatic true if this method has no | |
| maxLabel | back to summary |
|---|---|
| private int maxLabel really one greater than the max label | |
| paramWidth | back to summary |
|---|---|
| private final int paramWidth the total width, in register-units, of the method's parameters | |
| registerCount | back to summary |
|---|---|
| private int registerCount total number of registers required | |
| spareRegisterBase | back to summary |
|---|---|
| private int spareRegisterBase first register number to use for any temporary "spares" | |
| unmodifiableUseList | back to summary |
|---|---|
| private List<SsaInsn>[] unmodifiableUseList A version of useList with each List unmodifiable | |
| useList | back to summary |
|---|---|
| private ArrayList<SsaInsn>[] useList indexed by register: the list of all insns that use a register | |
| SsaMethod | back to summary |
|---|---|
| private SsaMethod(RopMethod ropMethod, int paramWidth, boolean isStatic) Constructs an instance.
| |
| bitSetFromLabelList | back to summary |
|---|---|
| pack-priv static BitSet bitSetFromLabelList(BasicBlockList blocks, IntList labelList) Builds a BitSet of block indices from a basic block list and a list of labels taken from Rop form.
| |
| blockIndexToRopLabel | back to summary |
|---|---|
public int blockIndexToRopLabel(int bi)
| |
| borrowSpareRegister | back to summary |
|---|---|
| public int borrowSpareRegister(int category) Borrows a register to use as a temp. Used in the phi removal process. Call returnSpareRegisters() when done.
| |
| buildUseList | back to summary |
|---|---|
| private void buildUseList() Builds useList and unmodifiableUseList. | |
| computeReachability | back to summary |
|---|---|
| public void computeReachability() Computes reachability for all blocks in the method. First clears old values from all blocks, then starts with the entry block and walks down the control flow graph, marking all blocks it finds as reachable. | |
| convertRopToSsaBlocks | back to summary |
|---|---|
| private void convertRopToSsaBlocks(RopMethod rmeth) | |
| deleteInsns | back to summary |
|---|---|
| public void deleteInsns(Set<SsaInsn> deletedInsns) Deletes all insns in the set from this method. | |
| forEachBlockDepthFirst | back to summary |
|---|---|
| public void forEachBlockDepthFirst(boolean reverse, SsaBasicBlock. Walks the basic block tree in depth-first order, calling the visitor method once for every block. This depth-first walk may be run forward from the method entry point or backwards from the method exit points.
| |
| forEachBlockDepthFirstDom | back to summary |
|---|---|
| public void forEachBlockDepthFirstDom(SsaBasicBlock. Visits blocks in dom-tree order, starting at the current node.
The
| |
| forEachInsn | back to summary |
|---|---|
| public void forEachInsn(SsaInsn. Visits all insns in this method. | |
| forEachPhiInsn | back to summary |
|---|---|
| public void forEachPhiInsn(PhiInsn. Visits each phi insn in this method | |
| getBlocks | back to summary |
|---|---|
public ArrayList
| |
| getCountReachableBlocks | back to summary |
|---|---|
| public int getCountReachableBlocks() Returns the count of reachable blocks in this method: blocks that have predecessors (or are the start block)
| |
| getDefinitionForRegister | back to summary |
|---|---|
| public SsaInsn getDefinitionForRegister(int reg) Returns the insn that defines the given register
| |
| getEntryBlock | back to summary |
|---|---|
public SsaBasicBlock getEntryBlock()
| |
| getEntryBlockIndex | back to summary |
|---|---|
public int getEntryBlockIndex()
| |
| getExitBlock | back to summary |
|---|---|
public SsaBasicBlock getExitBlock()
| |
| getExitBlockIndex | back to summary |
|---|---|
public int getExitBlockIndex()
| |
| getGoto | back to summary |
|---|---|
| private static SsaInsn getGoto(SsaBasicBlock block) Gets a new
| |
| getParamWidth | back to summary |
|---|---|
public int getParamWidth()
| |
| getRegCount | back to summary |
|---|---|
public int getRegCount()
| |
| getUseListCopy | back to summary |
|---|---|
| public ArrayList Returns a modifiable copy of the register use list. | |
| getUseListForRegister | back to summary |
|---|---|
| public List Returns the list of all source uses (not results) for a register. | |
| indexListFromLabelList | back to summary |
|---|---|
| public static IntList indexListFromLabelList(BasicBlockList ropBlocks, IntList labelList) Builds an IntList of block indices from a basic block list and a list of labels taken from Rop form.
| |
| isRegALocal | back to summary |
|---|---|
| public boolean isRegALocal(RegisterSpec spec) Checks to see if the given SSA reg is ever associated with a local local variable. Each SSA reg may be associated with at most one local var.
| |
| isStatic | back to summary |
|---|---|
| public boolean isStatic() Returns
| |
| makeExitBlock | back to summary |
|---|---|
| pack-priv void makeExitBlock() Creates an exit block and attaches it to the CFG if this method exits. Methods that never exit will not have an exit block. This is called after edge-splitting and phi insertion, since the edges going into the exit block should not be considered in those steps. | |
| makeNewGotoBlock | back to summary |
|---|---|
| public SsaBasicBlock makeNewGotoBlock() Makes a new basic block for this method, which is empty besides
a single
| |
| makeNewSsaReg | back to summary |
|---|---|
| public int makeNewSsaReg() Makes a new SSA register. For use after renaming has completed.
| |
| mapRegisters | back to summary |
|---|---|
| public void mapRegisters(RegisterMapper mapper) Remaps unversioned registers.
| |
| newFromRopMethod | back to summary |
|---|---|
public static SsaMethod newFromRopMethod(RopMethod ropMethod, int paramWidth, boolean isStatic)
| |
| onInsnAdded | back to summary |
|---|---|
| pack-priv void onInsnAdded(SsaInsn insn) Adds an insn to both the use and def lists. For use when adding a new insn to the method.
| |
| onInsnRemoved | back to summary |
|---|---|
| pack-priv void onInsnRemoved(SsaInsn insn) Removes an instruction from use and def lists. For use during instruction removal.
| |
| onInsnsChanged | back to summary |
|---|---|
| public void onInsnsChanged() Indicates that the instruction list has changed or the SSA register count has increased, so that internal datastructures that rely on it should be rebuild. In general, the various other on* methods should be called in preference when changes occur if they are applicable. | |
| onSourceChanged | back to summary |
|---|---|
| pack-priv void onSourceChanged(SsaInsn insn, RegisterSpec oldSource, RegisterSpec newSource) Updates the use list for a single change in source register.
| |
| onSourcesChanged | back to summary |
|---|---|
| pack-priv void onSourcesChanged(SsaInsn insn, RegisterSpecList oldSources) Updates the use list for a source list change.
| |
| removeFromUseList | back to summary |
|---|---|
| private void removeFromUseList(SsaInsn insn, RegisterSpecList oldSources) Removes a given
| |
| returnSpareRegisters | back to summary |
|---|---|
| public void returnSpareRegisters() Returns all borrowed registers. | |
| setBackMode | back to summary |
|---|---|
| public void setBackMode() Sets "back-convert mode". Set during back-conversion when registers are about to be mapped into a non-SSA namespace. When true, use and def lists are unavailable. | |
| setNewRegCount | back to summary |
|---|---|
| pack-priv void setNewRegCount(int newRegCount) Sets the new register count after renaming.
| |
| updateOneDefinition | back to summary |
|---|---|
| pack-priv void updateOneDefinition(SsaInsn insn, RegisterSpec oldResult) Updates a single definition.
| |