Skip to content

Commit

Permalink
SchedDFS: Constify interface.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173398 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
atrick committed Jan 25, 2013
1 parent dd4fc44 commit 6d28299
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/llvm/CodeGen/ScheduleDFS.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,23 +120,24 @@ class SchedDFSResult {
/// \brief Get the ILP value for a DAG node.
///
/// A leaf node has an ILP of 1/1.
ILPValue getILP(const SUnit *SU) {
ILPValue getILP(const SUnit *SU) const {
return ILPValue(DFSData[SU->NodeNum].InstrCount, 1 + SU->getDepth());
}

/// \brief The number of subtrees detected in this DAG.
unsigned getNumSubtrees() const { return SubtreeConnectLevels.size(); }

/// \brief Get the ID of the subtree the given DAG node belongs to.
unsigned getSubtreeID(const SUnit *SU) {
unsigned getSubtreeID(const SUnit *SU) const {
assert(SU->NodeNum < DFSData.size() && "New Node");
return DFSData[SU->NodeNum].SubtreeID;
}

/// \brief Get the connection level of a subtree.
///
/// For bottom-up trees, the connection level is the latency depth (in cycles)
/// of the deepest connection to another subtree.
unsigned getSubtreeLevel(unsigned SubtreeID) {
unsigned getSubtreeLevel(unsigned SubtreeID) const {
return SubtreeConnectLevels[SubtreeID];
}

Expand Down

0 comments on commit 6d28299

Please sign in to comment.