Use getDepth() and getHeight() instead of accessing the
authorDan Gohman <gohman@apple.com>
Wed, 17 Dec 2008 04:25:52 +0000 (04:25 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 17 Dec 2008 04:25:52 +0000 (04:25 +0000)
Depth and Height members directly, as they may not be
current.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61121 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/ScheduleDAG.cpp

index dad5eb5d9b3408f4b2d124476b8e8fb439034ae3..f9ec225f3eb44ef79d31946430b681aee6a0ab7a 100644 (file)
@@ -150,7 +150,7 @@ void SUnit::setHeightDirty() {
 /// fact that this node's depth just increased.
 ///
 void SUnit::setDepthToAtLeast(unsigned NewDepth) {
 /// fact that this node's depth just increased.
 ///
 void SUnit::setDepthToAtLeast(unsigned NewDepth) {
-  if (NewDepth <= Depth)
+  if (NewDepth <= getDepth())
     return;
   setDepthDirty();
   Depth = NewDepth;
     return;
   setDepthDirty();
   Depth = NewDepth;
@@ -161,7 +161,7 @@ void SUnit::setDepthToAtLeast(unsigned NewDepth) {
 /// fact that this node's height just increased.
 ///
 void SUnit::setHeightToAtLeast(unsigned NewHeight) {
 /// fact that this node's height just increased.
 ///
 void SUnit::setHeightToAtLeast(unsigned NewHeight) {
-  if (NewHeight <= Height)
+  if (NewHeight <= getHeight())
     return;
   setHeightDirty();
   Height = NewHeight;
     return;
   setHeightDirty();
   Height = NewHeight;