001/*
002 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 *  This file is licensed to You under the Eclipse Public License (EPL);
005 *  You may not use this file except in compliance with the License. You
006 *  may obtain a copy of the License at
007 *
008 *      http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 *  See the COPYRIGHT.txt file distributed with this work for information
011 *  regarding copyright ownership.
012 */
013package org.jikesrvm.compilers.opt.lir2mir;
014
015import org.jikesrvm.compilers.opt.depgraph.DepGraphNode;
016import org.jikesrvm.compilers.opt.ir.Instruction;
017
018/**
019 * A special dependence graph node for use by NormalBURS.<p>
020 *
021 * It provides some fields that are not used by any other
022 * client of DepGraphNode.
023 */
024class NormalBURS_DepGraphNode extends DepGraphNode {
025
026  private int predecessorCount;
027  private AbstractBURS_TreeNode currentParent;
028
029  NormalBURS_DepGraphNode(Instruction instr) {
030    super(instr);
031  }
032
033  void setPredecessorCount(int newCount) {
034    predecessorCount = newCount;
035  }
036
037  int getPredecessorCount() {
038    return predecessorCount;
039  }
040
041  void incPredecessorCount() {
042    predecessorCount++;
043  }
044
045  void decPredecessorCount() {
046    predecessorCount--;
047  }
048
049  void setCurrentParent(AbstractBURS_TreeNode treeNode) {
050    this.currentParent = treeNode;
051  }
052
053  AbstractBURS_TreeNode getCurrentParent() {
054    return currentParent;
055  }
056
057}