op.clear();
  private void buildTrees(OPT_DepGraph dg) {    OPT_DepGraphNode bbNodes = (OPT_DepGraphNode)dg.firstNode();    OPT_Instruction firstInstruction = bbNodes.instruction();    for (OPT_DepGraphNode n = bbNodes;          n != null;          n = (OPT_DepGraphNode)n.getNext()) {      // Initialize n.treeNode      OPT_BURS_TreeNode cur_parent = new OPT_BURS_TreeNode(n);      n.scratchObject = cur_parent;      OPT_Instruction instr = n.instruction();      // cur_parent = current parent node for var length IR instructions      // loop for USES of an instruction      for (OPT_OperandEnumeration uses = instr.getUses();            uses.hasMoreElements();) {        // Create tree edge for next use.        OPT_Operand op = uses.next();        if (op == null) continue;        op.clear();        // Set child = OPT_BURS_TreeNode for operand op        OPT_BURS_TreeNode child;        if (op instanceof OPT_RegisterOperand) {          OPT_RegisterOperand regOp = (OPT_RegisterOperand)op;          // ignore validation registers          if (regOp.register.isValidation()) continue;          OPT_DepGraphEdge e = OPT_DepGraphEdge.findInputEdge(n, op);          if (e == null) {        // operand is leaf                    child = Register;           } else {            child = (OPT_BURS_TreeNode)e.fromNode().scratchObject;          }        } else if (op instanceof OPT_IntConstantOperand) {          child = new OPT_BURS_IntConstantTreeNode(((OPT_IntConstantOperand)op).value);        } else if (op instanceof OPT_LongConstantOperand) {          child = LongConstant;        } else if (op instanceof OPT_AddressConstantOperand) {          child = AddressConstant;        } else if (op instanceof OPT_BranchOperand && instr.isCall()) {          child = BranchTarget;        //-#if RVM_WITH_OSR        } else if (op instanceof OPT_InlinedOsrTypeInfoOperand && instr.isYieldPoint()) {          child = NullTreeNode;         //-#endif        } else {          continue;        }        // Attach child as child of cur_parent in correct position        if (cur_parent.child1 == null) {          cur_parent.child1 = child;         } else if (cur_parent.child2 == null) {          cur_parent.child2 = child;         } else {          // Create auxiliary node so as to represent          // a instruction with arity > 2 in a binary tree.          OPT_BURS_TreeNode child1 = cur_parent.child2;          OPT_BURS_TreeNode aux = new OPT_BURS_TreeNode(OTHER_OPERAND_opcode);          cur_parent.child2 = aux;          cur_parent = aux;          cur_parent.child1 = child1;          cur_parent.child2 = child;        }      }         // for (uses = ...)      // patch for calls & return       switch (instr.getOpcode()) {      case CALL_opcode:      case SYSCALL_opcode:      //-#if RVM_WITH_OSR      case YIELDPOINT_OSR_opcode:      //-#endif        if (cur_parent.child2 == null)          cur_parent.child2 = NullTreeNode;        // fall through      case RETURN_opcode:        if (cur_parent.child1 == null)          cur_parent.child1 = NullTreeNode;      }      if (mustBeTreeRoot(n)) {        makeTreeRoot((OPT_BURS_TreeNode)n.scratchObject);      }    }   }