[llvm-commits] [llvm] r173398 - /llvm/trunk/include/llvm/CodeGen/ScheduleDFS.h
Andrew Trick
atrick at apple.com
Thu Jan 24 16:12:55 PST 2013
Author: atrick
Date: Thu Jan 24 18:12:55 2013
New Revision: 173398
URL: http://llvm.org/viewvc/llvm-project?rev=173398&view=rev
Log:
SchedDFS: Constify interface.
Modified:
llvm/trunk/include/llvm/CodeGen/ScheduleDFS.h
Modified: llvm/trunk/include/llvm/CodeGen/ScheduleDFS.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ScheduleDFS.h?rev=173398&r1=173397&r2=173398&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ScheduleDFS.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ScheduleDFS.h Thu Jan 24 18:12:55 2013
@@ -120,7 +120,7 @@
/// \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());
}
@@ -128,7 +128,8 @@
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;
}
@@ -136,7 +137,7 @@
///
/// 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];
}
More information about the llvm-commits
mailing list