summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormingmingl <mingmingl@google.com>2024-05-08 14:11:18 -0700
committermingmingl <mingmingl@google.com>2024-05-08 14:12:48 -0700
commit2bbd4681e311c52b34ab602e2013e516bebe2da6 (patch)
treefc38a69e4395479f65ae1f5d75e9f7f4d6522c8a
parent6422502ec2fa6143506517c60b86b842c271ba62 (diff)
-rw-r--r--llvm/include/llvm/ProfileData/InstrProf.h6
-rw-r--r--llvm/lib/ProfileData/InstrProf.cpp7
2 files changed, 7 insertions, 6 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index f12ba61dbe8c..88c7fe425b5a 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -476,7 +476,7 @@ private:
// `MD5FuncMap` and `MD5VTableMap`.
// TODO: Unify the container type and the lambda function 'mapName' inside
// add{Func,VTable}WithName.
- DenseMap<uint64_t, GlobalVariable*> MD5VTableMap;
+ DenseMap<uint64_t, GlobalVariable *> MD5VTableMap;
// A map from function runtime address to function name MD5 hash.
// This map is only populated and used by raw instr profile reader.
AddrHashMap AddrToMD5Map;
@@ -646,7 +646,7 @@ public:
/// Return the global variable corresponding to md5 hash. Return nullptr if
/// not found.
- inline GlobalVariable* getGlobalVariable(uint64_t MD5Hash);
+ inline GlobalVariable *getGlobalVariable(uint64_t MD5Hash);
/// Return the name section data.
inline StringRef getNameData() const { return Data; }
@@ -727,7 +727,7 @@ Function* InstrProfSymtab::getFunction(uint64_t FuncMD5Hash) {
return nullptr;
}
-GlobalVariable* InstrProfSymtab::getGlobalVariable(uint64_t MD5Hash) {
+GlobalVariable *InstrProfSymtab::getGlobalVariable(uint64_t MD5Hash) {
if (auto Iter = MD5VTableMap.find(MD5Hash); Iter != MD5VTableMap.end())
return Iter->second;
return nullptr;
diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp
index 655e6cebcf2d..39d275c7b54c 100644
--- a/llvm/lib/ProfileData/InstrProf.cpp
+++ b/llvm/lib/ProfileData/InstrProf.cpp
@@ -481,8 +481,8 @@ Error InstrProfSymtab::create(Module &M, bool InLTO) {
if (!G.hasName() || !G.hasMetadata(LLVMContext::MD_type))
continue;
if (Error E = addVTableWithName(
- G, getIRPGOObjectName(G, InLTO, /* PGONameMetadata */ nullptr)))
- return E;
+ G, getIRPGOObjectName(G, InLTO, /* PGONameMetadata */ nullptr)))
+ return E;
}
Sorted = false;
@@ -497,7 +497,8 @@ Error InstrProfSymtab::addVTableWithName(GlobalVariable &VTable,
return E;
bool Inserted = true;
- std::tie(std::ignore, Inserted) = MD5VTableMap.try_emplace(GlobalValue::getGUID(Name), &VTable);
+ std::tie(std::ignore, Inserted) =
+ MD5VTableMap.try_emplace(GlobalValue::getGUID(Name), &VTable);
if (!Inserted)
LLVM_DEBUG(dbgs() << "GUID conflict within one module");
return Error::success();