summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/Bitcode/LLVMBitCodes.h5
-rw-r--r--llvm/include/llvm/IR/ModuleSummaryIndex.h21
2 files changed, 3 insertions, 23 deletions
diff --git a/llvm/include/llvm/Bitcode/LLVMBitCodes.h b/llvm/include/llvm/Bitcode/LLVMBitCodes.h
index 7a457744db7..70194c04347 100644
--- a/llvm/include/llvm/Bitcode/LLVMBitCodes.h
+++ b/llvm/include/llvm/Bitcode/LLVMBitCodes.h
@@ -256,11 +256,6 @@ enum GlobalValueSummarySymtabCodes {
// strings in strtab.
// [n * name]
FS_CFI_FUNCTION_DECLS = 18,
- // Per-module summary that also adds relative block frequency to callee info.
- // PERMODULE_RELBF: [valueid, flags, instcount, numrefs,
- // numrefs x valueid,
- // n x (valueid, relblockfreq)]
- FS_PERMODULE_RELBF = 19,
};
enum MetadataCodes {
diff --git a/llvm/include/llvm/IR/ModuleSummaryIndex.h b/llvm/include/llvm/IR/ModuleSummaryIndex.h
index 8ca6de49c32..17f8951bf0e 100644
--- a/llvm/include/llvm/IR/ModuleSummaryIndex.h
+++ b/llvm/include/llvm/IR/ModuleSummaryIndex.h
@@ -25,7 +25,6 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/Module.h"
-#include "llvm/Support/MathExtras.h"
#include <algorithm>
#include <array>
#include <cassert>
@@ -55,28 +54,14 @@ struct CalleeInfo {
Hot = 3,
Critical = 4
};
+ HotnessType Hotness = HotnessType::Unknown;
- // The size of the bit-field might need to be adjusted if more values are
- // added to HotnessType enum.
- HotnessType Hotness : 3;
- uint32_t RelBlockFreq : 29;
- static constexpr uint64_t MaxRelBlockFreq = (1 << 29) - 1;
-
- CalleeInfo() : Hotness(HotnessType::Unknown), RelBlockFreq(0) {}
- explicit CalleeInfo(HotnessType Hotness, uint64_t RelBF)
- : Hotness(Hotness), RelBlockFreq(RelBF) {}
+ CalleeInfo() = default;
+ explicit CalleeInfo(HotnessType Hotness) : Hotness(Hotness) {}
void updateHotness(const HotnessType OtherHotness) {
Hotness = std::max(Hotness, OtherHotness);
}
-
- // When there are multiple edges between the same (caller, callee) pair, the
- // relative block frequencies are summed up.
- void updateRelBlockFreq(uint64_t RBF) {
- uint64_t Sum = SaturatingAdd<uint64_t>(RelBlockFreq, RBF);
- Sum = std::min(Sum, uint64_t(MaxRelBlockFreq));
- RelBlockFreq = static_cast<uint32_t>(Sum);
- }
};
class GlobalValueSummary;
OpenPOWER on IntegriCloud