private void computeControlAndBarrierDependences(Instruction start,Instruction end){
  DepGraphNode lastTotalBarrier=null;
  DepGraphNode lastGCBarrier=null;
  DepGraphNode lastAcquire=null;
  for (DepGraphNode pnode=(DepGraphNode)firstNode(); pnode != null; pnode=(DepGraphNode)pnode.getNext()) {
    Instruction p=pnode.instruction();
    if (lastTotalBarrier != null) {
      lastTotalBarrier.insertOutEdge(pnode,CONTROL);
    }
    if (lastGCBarrier != null) {
      lastGCBarrier.insertOutEdge(pnode,CONTROL);
    }
    if (lastAcquire != null && p.isImplicitLoad()) {
      lastAcquire.insertOutEdge(pnode,CONTROL);
    }
    Operator pop=p.operator();
    if (p.isYieldPoint() || pop == IR_PROLOGUE || pop == UNINT_BEGIN || pop == GET_TIME_BASE || pop == GET_CAUGHT_EXCEPTION) {
      lastTotalBarrier=pnode;
    }
    if (pop == UNINT_END) {
      lastGCBarrier=pnode;
    }
    if (p.isAcquire() || p.isDynamicLinkingPoint()) {
      lastAcquire=pnode;
    }
  }
  lastTotalBarrier=null;
  lastGCBarrier=null;
  DepGraphNode lastRelease=null;
  for (DepGraphNode pnode=(DepGraphNode)lastNode(); pnode != null; pnode=(DepGraphNode)pnode.getPrev()) {
    Instruction p=pnode.instruction();
    if (lastTotalBarrier != null) {
      pnode.insertOutEdge(lastTotalBarrier,CONTROL);
    }
    if (lastGCBarrier != null) {
      pnode.insertOutEdge(lastGCBarrier,CONTROL);
    }
    if (lastRelease != null && p.isImplicitStore()) {
      pnode.insertOutEdge(lastRelease,CONTROL);
    }
    Operator pop=p.operator();
    if (p.isBranch() || p.isReturn() || p.isYieldPoint()|| pop == UNINT_END || pop == GET_TIME_BASE || pop == SET_CAUGHT_EXCEPTION) {
      lastTotalBarrier=pnode;
    }
    if (pop == UNINT_BEGIN) {
      lastGCBarrier=pnode;
    }
    if (p.isRelease() || p.isDynamicLinkingPoint()) {
      lastRelease=pnode;
    }
  }
}

private void computeControlAndBarrierDependences ( Instruction start , Instruction end ) { DepGraphNode lastTotalBarrier = null ; DepGraphNode lastGCBarrier = null ; DepGraphNode lastAcquire = null ; for ( DepGraphNode pnode = ( DepGraphNode ) firstNode ( ) ; pnode != null ; pnode = ( DepGraphNode ) pnode . getNext ( ) ) { Instruction p = pnode . instruction ( ) ; if ( lastTotalBarrier != null ) { lastTotalBarrier . insertOutEdge ( pnode , CONTROL ) ; } if ( lastGCBarrier != null ) { lastGCBarrier . insertOutEdge ( pnode , CONTROL ) ; } if ( lastAcquire != null && p . isImplicitLoad ( ) ) { lastAcquire . insertOutEdge ( pnode , CONTROL ) ; } Operator pop = p . operator ( ) ; if ( p . isYieldPoint ( ) || pop == IR_PROLOGUE || pop == UNINT_BEGIN || pop == GET_TIME_BASE || pop == GET_CAUGHT_EXCEPTION ) { lastTotalBarrier = pnode ; } if ( pop == UNINT_END ) { lastGCBarrier = pnode ; } if ( p . isAcquire ( ) || p . isDynamicLinkingPoint ( ) ) { lastAcquire = pnode ; } } lastTotalBarrier = null ; lastGCBarrier = null ; DepGraphNode lastRelease = null ; for ( DepGraphNode pnode = ( DepGraphNode ) lastNode ( ) ; pnode != null ; pnode = ( DepGraphNode ) pnode . getPrev ( ) ) { Instruction p = pnode . instruction ( ) ; if ( lastTotalBarrier != null ) { pnode . insertOutEdge ( lastTotalBarrier , CONTROL ) ; } if ( lastGCBarrier != null ) { pnode . insertOutEdge ( lastGCBarrier , CONTROL ) ; } if ( lastRelease != null && p . isImplicitStore ( ) ) { pnode . insertOutEdge ( lastRelease , CONTROL ) ; } Operator pop = p . operator ( ) ; if ( p . isBranch ( ) || p . isReturn ( ) || p . isYieldPoint ( ) || pop == UNINT_END || pop == GET_TIME_BASE || pop == SET_CAUGHT_EXCEPTION ) { lastTotalBarrier = pnode ; } if ( pop == UNINT_BEGIN ) { lastGCBarrier = pnode ; } if ( p . isRelease ( ) || p . isDynamicLinkingPoint ( ) ) { lastRelease = pnode ; } } }
compute control and barrier ( acquire / release ) dependences in two passes ( one forward , one reverse over the instructions from start to end .
