private static HashMap<BasicBlockPair,HashSet<Register>> findSplitPoints(IR ir,LiveAnalysis live,LSTGraph lst){
  HashMap<BasicBlockPair,HashSet<Register>> result=new HashMap<BasicBlockPair,HashSet<Register>>(10);
  for (Enumeration<GraphNode> e=lst.enumerateNodes(); e.hasMoreElements(); ) {
    LSTNode node=(LSTNode)e.nextElement();
    BasicBlock header=node.getHeader();
    BitVector loop=node.getLoop();
    if (loop == null)     continue;
    for (Enumeration<BasicBlock> in=header.getIn(); in.hasMoreElements(); ) {
      BasicBlock bb=in.nextElement();
      if (loop.get(bb.getNumber()))       continue;
      HashSet<Register> liveRegisters=live.getLiveRegistersOnEdge(bb,header);
      for (      Register r : liveRegisters) {
        if (r.isSymbolic()) {
          HashSet<Register> s=findOrCreateSplitSet(result,bb,header);
          s.add(r);
        }
      }
    }
    for (int i=0; i < loop.length(); i++) {
      if (loop.get(i)) {
        BasicBlock bb=ir.getBasicBlock(i);
        for (Enumeration<BasicBlock> out=bb.getNormalOut(); out.hasMoreElements(); ) {
          BasicBlock dest=out.nextElement();
          if (loop.get(dest.getNumber()))           continue;
          HashSet<Register> liveRegisters=live.getLiveRegistersOnEdge(bb,dest);
          for (          Register r : liveRegisters) {
            if (r.isSymbolic()) {
              HashSet<Register> s=findOrCreateSplitSet(result,bb,dest);
              s.add(r);
            }
          }
        }
      }
    }
  }
  addEntriesForInfrequentBlocks(ir,live,result);
  return result;
}

private static HashMap < BasicBlockPair , HashSet < Register > > findSplitPoints ( IR ir , LiveAnalysis live , LSTGraph lst ) { HashMap < BasicBlockPair , HashSet < Register > > result = new HashMap < BasicBlockPair , HashSet < Register > > ( 10 ) ; for ( Enumeration < GraphNode > e = lst . enumerateNodes ( ) ; e . hasMoreElements ( ) ; ) { LSTNode node = ( LSTNode ) e . nextElement ( ) ; BasicBlock header = node . getHeader ( ) ; BitVector loop = node . getLoop ( ) ; if ( loop == null ) continue ; for ( Enumeration < BasicBlock > in = header . getIn ( ) ; in . hasMoreElements ( ) ; ) { BasicBlock bb = in . nextElement ( ) ; if ( loop . get ( bb . getNumber ( ) ) ) continue ; HashSet < Register > liveRegisters = live . getLiveRegistersOnEdge ( bb , header ) ; for ( Register r : liveRegisters ) { if ( r . isSymbolic ( ) ) { HashSet < Register > s = findOrCreateSplitSet ( result , bb , header ) ; s . add ( r ) ; } } } for ( int i = 0 ; i < loop . length ( ) ; i ++ ) { if ( loop . get ( i ) ) { BasicBlock bb = ir . getBasicBlock ( i ) ; for ( Enumeration < BasicBlock > out = bb . getNormalOut ( ) ; out . hasMoreElements ( ) ; ) { BasicBlock dest = out . nextElement ( ) ; if ( loop . get ( dest . getNumber ( ) ) ) continue ; HashSet < Register > liveRegisters = live . getLiveRegistersOnEdge ( bb , dest ) ; for ( Register r : liveRegisters ) { if ( r . isSymbolic ( ) ) { HashSet < Register > s = findOrCreateSplitSet ( result , bb , dest ) ; s . add ( r ) ; } } } } } } addEntriesForInfrequentBlocks ( ir , live , result ) ; return result ; }
find the points the ir where live ranges should be split .
