/** * "v is live-out at s." */ private void liveOutAtStatement() { SsaInsn statement = blockN.getInsns().get(statementIndex); RegisterSpec rs = statement.getResult(); if (!statement.isResultReg(regV)) { if (rs != null) { interference.add(regV, rs.getReg()); } nextFunction = NextFunction.LIVE_IN_AT_STATEMENT; } }
/** * Adds a register pair to the interference/liveness graph. Parameter * order is insignificant. * * @param regV one register index * @param regW another register index */ public void add(int regV, int regW) { ensureCapacity(Math.max(regV, regW) + 1); interference.get(regV).add(regW); interference.get(regW).add(regV); }
/** * Adds a register's interference set to the interference list, * growing it if necessary. * * @param newReg register in new namespace * @param oldReg register in old namespace */ private void addInterfence(int newReg, int oldReg) { newRegInterference.ensureCapacity(newReg + 1); while (newReg >= newRegInterference.size()) { newRegInterference.add(new BitIntSet(newReg +1)); } oldRegInterference.mergeInterferenceSet( oldReg, newRegInterference.get(newReg)); }
/** * Runs register liveness algorithm for a method, updating the * live in/out information in {@code SsaBasicBlock} instances and * returning an interference graph. * * @param ssaMeth {@code non-null;} method to process * @return {@code non-null;} interference graph indexed by SSA * registers in both directions */ public static InterferenceGraph constructInterferenceGraph( SsaMethod ssaMeth) { int szRegs = ssaMeth.getRegCount(); InterferenceGraph interference = new InterferenceGraph(szRegs); for (int i = 0; i < szRegs; i++) { new LivenessAnalyzer(ssaMeth, i, interference).run(); } coInterferePhis(ssaMeth, interference); return interference; }
/** * Runs register liveness algorithm for a method, updating the * live in/out information in {@code SsaBasicBlock} instances and * returning an interference graph. * * @param ssaMeth {@code non-null;} method to process * @return {@code non-null;} interference graph indexed by SSA * registers in both directions */ public static InterferenceGraph constructInterferenceGraph( SsaMethod ssaMeth) { int szRegs = ssaMeth.getRegCount(); InterferenceGraph interference = new InterferenceGraph(szRegs); for (int i = 0; i < szRegs; i++) { new LivenessAnalyzer(ssaMeth, i, interference).run(); } coInterferePhis(ssaMeth, interference); return interference; }
/** * "v is live-out at s." */ private void liveOutAtStatement() { SsaInsn statement = blockN.getInsns().get(statementIndex); RegisterSpec rs = statement.getResult(); if (!statement.isResultReg(regV)) { if (rs != null) { interference.add(regV, rs.getReg()); } nextFunction = NextFunction.LIVE_IN_AT_STATEMENT; } }
/** * Adds a register's interference set to the interference list, * growing it if necessary. * * @param newReg register in new namespace * @param oldReg register in old namespace */ private void addInterfence(int newReg, int oldReg) { newRegInterference.ensureCapacity(newReg + 1); while (newReg >= newRegInterference.size()) { newRegInterference.add(new BitIntSet(newReg +1)); } oldRegInterference.mergeInterferenceSet( oldReg, newRegInterference.get(newReg)); }
/** * Adds a register pair to the interference/liveness graph. Parameter * order is insignificant. * * @param regV one register index * @param regW another register index */ public void add(int regV, int regW) { ensureCapacity(Math.max(regV, regW) + 1); interference.get(regV).add(regW); interference.get(regW).add(regV); }
/** * Runs register liveness algorithm for a method, updating the * live in/out information in {@code SsaBasicBlock} instances and * returning an interference graph. * * @param ssaMeth {@code non-null;} method to process * @return {@code non-null;} interference graph indexed by SSA * registers in both directions */ public static InterferenceGraph constructInterferenceGraph( SsaMethod ssaMeth) { int szRegs = ssaMeth.getRegCount(); InterferenceGraph interference = new InterferenceGraph(szRegs); for (int i = 0; i < szRegs; i++) { new LivenessAnalyzer(ssaMeth, i, interference).run(); } coInterferePhis(ssaMeth, interference); return interference; }
/** * "v is live-out at s." */ private void liveOutAtStatement() { SsaInsn statement = blockN.getInsns().get(statementIndex); RegisterSpec rs = statement.getResult(); if (!statement.isResultReg(regV)) { if (rs != null) { interference.add(regV, rs.getReg()); } nextFunction = NextFunction.LIVE_IN_AT_STATEMENT; } }
/** * Adds a register's interference set to the interference list, * growing it if necessary. * * @param newReg register in new namespace * @param oldReg register in old namespace */ private void addInterfence(int newReg, int oldReg) { newRegInterference.ensureCapacity(newReg + 1); while (newReg >= newRegInterference.size()) { newRegInterference.add(new BitIntSet(newReg +1)); } oldRegInterference.mergeInterferenceSet( oldReg, newRegInterference.get(newReg)); }
/** * Adds a register pair to the interference/liveness graph. Parameter * order is insignificant. * * @param regV one register index * @param regW another register index */ public void add(int regV, int regW) { ensureCapacity(Math.max(regV, regW) + 1); interference.get(regV).add(regW); interference.get(regW).add(regV); }
/** * Runs register liveness algorithm for a method, updating the * live in/out information in {@code SsaBasicBlock} instances and * returning an interference graph. * * @param ssaMeth {@code non-null;} method to process * @return {@code non-null;} interference graph indexed by SSA * registers in both directions */ public static InterferenceGraph constructInterferenceGraph( SsaMethod ssaMeth) { int szRegs = ssaMeth.getRegCount(); InterferenceGraph interference = new InterferenceGraph(szRegs); for (int i = 0; i < szRegs; i++) { new LivenessAnalyzer(ssaMeth, i, interference).run(); } coInterferePhis(ssaMeth, interference); return interference; }
/** * "v is live-out at s." */ private void liveOutAtStatement() { SsaInsn statement = blockN.getInsns().get(statementIndex); RegisterSpec rs = statement.getResult(); if (!statement.isResultReg(regV)) { if (rs != null) { interference.add(regV, rs.getReg()); } nextFunction = NextFunction.LIVE_IN_AT_STATEMENT; } }
/** * Adds a register's interference set to the interference list, * growing it if necessary. * * @param newReg register in new namespace * @param oldReg register in old namespace */ private void addInterfence(int newReg, int oldReg) { newRegInterference.ensureCapacity(newReg + 1); while (newReg >= newRegInterference.size()) { newRegInterference.add(new BitIntSet(newReg +1)); } oldRegInterference.mergeInterferenceSet( oldReg, newRegInterference.get(newReg)); }
/** * Adds a register pair to the interference/liveness graph. Parameter * order is insignificant. * * @param regV one register index * @param regW another register index */ public void add(int regV, int regW) { ensureCapacity(Math.max(regV, regW) + 1); interference.get(regV).add(regW); interference.get(regW).add(regV); }
/** * Runs register liveness algorithm for a method, updating the * live in/out information in {@code SsaBasicBlock} instances and * returning an interference graph. * * @param ssaMeth {@code non-null;} method to process * @return {@code non-null;} interference graph indexed by SSA * registers in both directions */ public static InterferenceGraph constructInterferenceGraph( SsaMethod ssaMeth) { int szRegs = ssaMeth.getRegCount(); InterferenceGraph interference = new InterferenceGraph(szRegs); for (int i = 0; i < szRegs; i++) { new LivenessAnalyzer(ssaMeth, i, interference).run(); } coInterferePhis(ssaMeth, interference); return interference; }
/** * "v is live-out at s." */ private void liveOutAtStatement() { SsaInsn statement = blockN.getInsns().get(statementIndex); RegisterSpec rs = statement.getResult(); if (!statement.isResultReg(regV)) { if (rs != null) { interference.add(regV, rs.getReg()); } nextFunction = NextFunction.LIVE_IN_AT_STATEMENT; } }
/** * Adds a register's interference set to the interference list, * growing it if necessary. * * @param newReg register in new namespace * @param oldReg register in old namespace */ private void addInterfence(int newReg, int oldReg) { newRegInterference.ensureCapacity(newReg + 1); while (newReg >= newRegInterference.size()) { newRegInterference.add(new BitIntSet(newReg +1)); } oldRegInterference.mergeInterferenceSet( oldReg, newRegInterference.get(newReg)); }
/** * Adds a register pair to the interference/liveness graph. Parameter * order is insignificant. * * @param regV one register index * @param regW another register index */ public void add(int regV, int regW) { ensureCapacity(Math.max(regV, regW) + 1); interference.get(regV).add(regW); interference.get(regW).add(regV); }