1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

[PGO] Simplify computehash interface (NFC)

llvm-svn: 256047
This commit is contained in:
Xinliang David Li 2015-12-18 22:22:12 +00:00
parent e2d62e9cd1
commit c749671813
3 changed files with 6 additions and 3 deletions

View File

@ -575,6 +575,10 @@ const uint64_t Magic = 0x8169666f72706cff; // "\xfflprofi\x81"
const uint64_t Version = INSTR_PROF_INDEX_VERSION;
const HashT HashType = HashT::MD5;
static inline uint64_t ComputeHash(StringRef K) {
return ComputeHash(HashType, K);
}
// This structure defines the file header of the LLVM profile
// data file in indexed-format.
struct Header {

View File

@ -201,8 +201,7 @@ void getValueForSiteInstrProf(const void *R, InstrProfValueData *Dst,
uint64_t stringToHash(uint32_t ValueKind, uint64_t Value) {
switch (ValueKind) {
case IPVK_IndirectCallTarget:
return IndexedInstrProf::ComputeHash(IndexedInstrProf::HashType,
(const char *)Value);
return IndexedInstrProf::ComputeHash((const char *)Value);
break;
default:
llvm_unreachable("value kind not handled !");

View File

@ -35,7 +35,7 @@ public:
typedef uint64_t offset_type;
static hash_value_type ComputeHash(key_type_ref K) {
return IndexedInstrProf::ComputeHash(IndexedInstrProf::HashType, K);
return IndexedInstrProf::ComputeHash(K);
}
static std::pair<offset_type, offset_type>