Methods Summary |
---|
public void | add(int regV, int regW)Adds a register pair to the interference/liveness graph. Parameter
order is insignificant.
ensureCapacity(Math.max(regV, regW) + 1);
interference.get(regV).add(regW);
interference.get(regW).add(regV);
|
public void | dumpToStdout()Dumps interference graph to stdout for debugging.
int oldRegCount = interference.size();
for (int i = 0; i < oldRegCount; i++) {
StringBuilder sb = new StringBuilder();
sb.append("Reg " + i + ":" + interference.get(i).toString());
System.out.println(sb.toString());
}
|
private void | ensureCapacity(int size)Ensures that the interference graph is appropriately sized.
int countRegs = interference.size();
interference.ensureCapacity(size);
for (int i = countRegs ; i < size; i++) {
interference.add(SetFactory.makeInterferenceSet(size));
}
|
public void | mergeInterferenceSet(int reg, com.android.dx.util.IntSet set)Merges the interference set for a register into a given bit set
if (reg < interference.size()) {
set.merge(interference.get(reg));
}
|