private static class LiveRangeSplitting.LiveRangeSplittingPhase extends CompilerPhase
Modifier and Type | Class and Description |
---|---|
private static class |
LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair
A utility class to represent an edge in the CFG.
|
container
Modifier | Constructor and Description |
---|---|
private |
LiveRangeSplittingPhase() |
Modifier and Type | Method and Description |
---|---|
private static void |
addEntriesForInfrequentBlocks(IR ir,
LiveAnalysis live,
HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> result)
Split live ranges on entry and exit to infrequent regions.
|
private static HashSet<Register> |
findOrCreateSplitSet(HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> map,
BasicBlock b1,
BasicBlock b2)
Given a mapping from BasicBlockPair -> HashSet, find or create the hash
set corresponding to a given basic block pair
|
private static HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> |
findSplitPoints(IR ir,
LiveAnalysis live,
LSTGraph lst)
Find the points the IR where live ranges should be split.
|
String |
getName() |
CompilerPhase |
newExecution(IR ir)
Return this instance of this phase.
|
void |
perform(IR ir)
This is the method that actually does the work of the phase.
|
boolean |
shouldPerform(OptOptions options)
This method determines if the phase should be run, based on the
Options object it is passed.
|
private static void |
transform(IR ir,
HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> xform)
Perform the transformation
|
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, printingEnabled, reportAdditionalStats, setContainer, verify
private LiveRangeSplittingPhase()
public CompilerPhase newExecution(IR ir)
newExecution
in class CompilerPhase
ir
- not usedpublic final boolean shouldPerform(OptOptions options)
CompilerPhase
shouldPerform
in class CompilerPhase
options
- the compiler options for the compilationpublic final String getName()
getName
in class CompilerPhase
public final void perform(IR ir)
CompilerPhase
perform
in class CompilerPhase
ir
- the IR on which to apply the phaseprivate static HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> findSplitPoints(IR ir, LiveAnalysis live, LSTGraph lst)
ir
- the governing IRlive
- valid liveness informationlst
- a valid loop structure treeprivate static void addEntriesForInfrequentBlocks(IR ir, LiveAnalysis live, HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> result)
ir
- the governing IRlive
- valid liveness informationresult
- mapping from BasicBlockPair to a set of registersprivate static HashSet<Register> findOrCreateSplitSet(HashMap<LiveRangeSplitting.LiveRangeSplittingPhase.BasicBlockPair,HashSet<Register>> map, BasicBlock b1, BasicBlock b2)
map
- the mapping to searchb1
- the first basic block in the pairb2
- the second basic block in the pair