From 4532b1f1e8b0922afd1d63096bf66adc8c50e739 Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Wed, 5 Dec 2018 18:17:40 +0000 Subject: [PATCH] [MachineOutliner][NFC] Use getOccurrenceCount() in getNotOutlinedCost() Some more gardening. llvm-svn: 348392 --- llvm/include/llvm/CodeGen/MachineOutliner.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/CodeGen/MachineOutliner.h b/llvm/include/llvm/CodeGen/MachineOutliner.h index 19abeba..93c61c6 100644 --- a/llvm/include/llvm/CodeGen/MachineOutliner.h +++ b/llvm/include/llvm/CodeGen/MachineOutliner.h @@ -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. -- 2.7.4