[llvm] r348392 - [MachineOutliner][NFC] Use getOccurrenceCount() in getNotOutlinedCost()
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 5 10:17:41 PST 2018
Author: paquette
Date: Wed Dec 5 10:17:40 2018
New Revision: 348392
URL: http://llvm.org/viewvc/llvm-project?rev=348392&view=rev
Log:
[MachineOutliner][NFC] Use getOccurrenceCount() in getNotOutlinedCost()
Some more gardening.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineOutliner.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineOutliner.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOutliner.h?rev=348392&r1=348391&r2=348392&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOutliner.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOutliner.h Wed Dec 5 10:17:40 2018
@@ -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.
More information about the llvm-commits
mailing list