[MachineOutliner][NFC] Use getOccurrenceCount() in getNotOutlinedCost()
authorJessica Paquette <jpaquette@apple.com>
Wed, 5 Dec 2018 18:17:40 +0000 (18:17 +0000)
committerJessica Paquette <jpaquette@apple.com>
Wed, 5 Dec 2018 18:17:40 +0000 (18:17 +0000)
Some more gardening.

llvm-svn: 348392

llvm/include/llvm/CodeGen/MachineOutliner.h

index 19abeba..93c61c6 100644 (file)
@@ -190,7 +190,7 @@ public:
   unsigned FrameConstructionID;
 
   /// Return the number of candidates for this \p OutlinedFunction.
-  unsigned getOccurrenceCount() { return OccurrenceCount; }
+  unsigned getOccurrenceCount() const { return OccurrenceCount; }
 
   /// Decrement the occurrence count of this OutlinedFunction and return the
   /// new count.
@@ -210,7 +210,9 @@ public:
   }
 
   /// Return the size in bytes of the unoutlined sequences.
-  unsigned getNotOutlinedCost() const { return OccurrenceCount * SequenceSize; }
+  unsigned getNotOutlinedCost() const {
+    return getOccurrenceCount() * SequenceSize;
+  }
 
   /// Return the number of instructions that would be saved by outlining
   /// this function.