reg.v = regV
s = insn
M = visitedBlocks
| Modifier and Type | Class and Description |
|---|---|
| private static enum | LivenessAnalyzer.
constants for |
| Modifier and Type | Field and Description |
|---|---|
| private SsaBasicBlock | blockN
block "n" in Appel 19.17 |
| private final InterferenceGraph | interference
interference graph being updated |
| private final BitSet | liveOutBlocks
|
| private LivenessAnalyzer. | nextFunction
the next function to call |
| private final int | regV
|
| private final SsaMethod | ssaMeth
method to process |
| private int | statementIndex
index of statement |
| private final BitSet | visitedBlocks
|
| Access | Constructor and Description |
|---|---|
| private | LivenessAnalyzer(SsaMethod
non-null; method to processregister whose liveness to analyze reg, InterferenceGraph non-null; indexed by SSA reg in
both dimensions; graph to updateMakes liveness analyzer instance for specific register. |
| Modifier and Type | Method and Description |
|---|---|
| private static void | coInterferePhis(SsaMethod
non-null; method to pricessnon-null; interference graphEnsures that all the phi result registers for all the phis in the same basic block interfere with each other. |
| public static InterferenceGraph | Returns: non-null; interference graph indexed by SSA
registers in both directionsnon-null; method to processRuns register liveness algorithm for a method, updating the
live in/out information in |
| private void | |
| private void | |
| private void | |
| private void | |
| public void |
| blockN | back to summary |
|---|---|
| private SsaBasicBlock blockN block "n" in Appel 19.17 | |
| interference | back to summary |
|---|---|
| private final InterferenceGraph interference interference graph being updated | |
| liveOutBlocks | back to summary |
|---|---|
| private final BitSet liveOutBlocks
| |
| nextFunction | back to summary |
|---|---|
| private LivenessAnalyzer. the next function to call | |
| regV | back to summary |
|---|---|
| private final int regV
| |
| ssaMeth | back to summary |
|---|---|
| private final SsaMethod ssaMeth method to process | |
| statementIndex | back to summary |
|---|---|
| private int statementIndex index of statement | |
| visitedBlocks | back to summary |
|---|---|
| private final BitSet visitedBlocks
| |
| LivenessAnalyzer | back to summary |
|---|---|
| private LivenessAnalyzer(SsaMethod ssaMeth, int reg, InterferenceGraph interference) Makes liveness analyzer instance for specific register.
| |
| coInterferePhis | back to summary |
|---|---|
| private static void coInterferePhis(SsaMethod ssaMeth, InterferenceGraph interference) Ensures that all the phi result registers for all the phis in the same basic block interfere with each other. This is needed since the dead code remover has allowed through "dead-end phis" whose results are not used except as local assignments. Without this step, a the result of a dead-end phi might be assigned the same register as the result of another phi, and the phi removal move scheduler may generate moves that over-write the live result.
| |
| constructInterferenceGraph | back to summary |
|---|---|
| public static InterferenceGraph constructInterferenceGraph(SsaMethod ssaMeth) Runs register liveness algorithm for a method, updating the
live in/out information in
| |
| handleTailRecursion | back to summary |
|---|---|
| private void handleTailRecursion() The algorithm in Appel is presented in partial tail-recursion form. Obviously, that's not efficient in java, so this function serves as the dispatcher instead. | |
| liveInAtStatement | back to summary |
|---|---|
| private void liveInAtStatement() "v is live-in at s." | |
| liveOutAtBlock | back to summary |
|---|---|
| private void liveOutAtBlock() "v is live-out at n." | |
| liveOutAtStatement | back to summary |
|---|---|
| private void liveOutAtStatement() "v is live-out at s." | |
| run | back to summary |
|---|---|
| public void run() From Appel algorithm 19.17. | |
nextFunction
| Modifier and Type | Field and Description |
|---|---|
| public static final LivenessAnalyzer. | |
| public static final LivenessAnalyzer. | |
| public static final LivenessAnalyzer. | |
| public static final LivenessAnalyzer. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LivenessAnalyzer. | |
| public static LivenessAnalyzer. |
| DONE | back to summary |
|---|---|
| public static final LivenessAnalyzer. | |
| LIVE_IN_AT_STATEMENT | back to summary |
|---|---|
| public static final LivenessAnalyzer. | |
| LIVE_OUT_AT_BLOCK | back to summary |
|---|---|
| public static final LivenessAnalyzer. | |
| LIVE_OUT_AT_STATEMENT | back to summary |
|---|---|
| public static final LivenessAnalyzer. | |
| NextFunction | back to summary |
|---|---|
| private NextFunction() | |
| valueOf | back to summary |
|---|---|
| public static LivenessAnalyzer. | |
| values | back to summary |
|---|---|
| public static LivenessAnalyzer. | |