[llvm] r197297 - [block-freq] Remove old BlockFrequency entry frequency and printing code.
Michael Gottesman
mgottesman at apple.com
Fri Dec 13 16:57:18 PST 2013
Author: mgottesman
Date: Fri Dec 13 18:57:18 2013
New Revision: 197297
URL: http://llvm.org/viewvc/llvm-project?rev=197297&view=rev
Log:
[block-freq] Remove old BlockFrequency entry frequency and printing code.
Modified:
llvm/trunk/include/llvm/Support/BlockFrequency.h
llvm/trunk/lib/Support/BlockFrequency.cpp
Modified: llvm/trunk/include/llvm/Support/BlockFrequency.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/BlockFrequency.h?rev=197297&r1=197296&r2=197297&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/BlockFrequency.h (original)
+++ llvm/trunk/include/llvm/Support/BlockFrequency.h Fri Dec 13 18:57:18 2013
@@ -25,7 +25,6 @@ class BranchProbability;
class BlockFrequency {
uint64_t Frequency;
- static const int64_t ENTRY_FREQ = 1 << 14;
/// \brief Scale the given BlockFrequency by N/D. Return the remainder from
/// the division by D. Upon overflow, the routine will saturate and
@@ -35,9 +34,6 @@ class BlockFrequency {
public:
BlockFrequency(uint64_t Freq = 0) : Frequency(Freq) { }
- /// \brief Returns the frequency of the entry block of the function.
- static uint64_t getEntryFrequency() { return ENTRY_FREQ; }
-
/// \brief Returns the maximum possible frequency, the saturation value.
static uint64_t getMaxFrequency() { return -1ULL; }
@@ -78,12 +74,8 @@ public:
bool operator>=(const BlockFrequency &RHS) const {
return Frequency >= RHS.Frequency;
}
-
- void print(raw_ostream &OS) const;
};
-raw_ostream &operator<<(raw_ostream &OS, const BlockFrequency &Freq);
-
}
#endif
Modified: llvm/trunk/lib/Support/BlockFrequency.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/BlockFrequency.cpp?rev=197297&r1=197296&r2=197297&view=diff
==============================================================================
--- llvm/trunk/lib/Support/BlockFrequency.cpp (original)
+++ llvm/trunk/lib/Support/BlockFrequency.cpp Fri Dec 13 18:57:18 2013
@@ -149,24 +149,3 @@ uint32_t BlockFrequency::scale(const Bra
return scale(Prob.getNumerator(), Prob.getDenominator());
}
-void BlockFrequency::print(raw_ostream &OS) const {
- // Convert fixed-point number to decimal.
- OS << Frequency / getEntryFrequency() << ".";
- uint64_t Rem = Frequency % getEntryFrequency();
- uint64_t Eps = 1;
- do {
- Rem *= 10;
- Eps *= 10;
- OS << Rem / getEntryFrequency();
- Rem = Rem % getEntryFrequency();
- } while (Rem >= Eps/2);
-}
-
-namespace llvm {
-
-raw_ostream &operator<<(raw_ostream &OS, const BlockFrequency &Freq) {
- Freq.print(OS);
- return OS;
-}
-
-}
More information about the llvm-commits
mailing list