diff --git a/llvm/include/llvm/ProfileData/MemProf.h b/llvm/include/llvm/ProfileData/MemProf.h index 8f5ba9c333320..a6501493172b2 100644 --- a/llvm/include/llvm/ProfileData/MemProf.h +++ b/llvm/include/llvm/ProfileData/MemProf.h @@ -439,7 +439,7 @@ struct IndexedMemProfRecord { // on the schema provided in \p Schema. void serialize(const MemProfSchema &Schema, raw_ostream &OS, IndexedVersion Version, - llvm::DenseMap + llvm::DenseMap *MemProfCallStackIndexes = nullptr) const; // Deserializes memprof records from the Buffer. @@ -579,15 +579,14 @@ class RecordWriterTrait { IndexedVersion Version; // Mappings from CallStackId to the indexes into the call stack array. - llvm::DenseMap - *MemProfCallStackIndexes; + llvm::DenseMap *MemProfCallStackIndexes; public: // We do not support the default constructor, which does not set Version. RecordWriterTrait() = delete; - RecordWriterTrait(const MemProfSchema *Schema, IndexedVersion V, - llvm::DenseMap - *MemProfCallStackIndexes) + RecordWriterTrait( + const MemProfSchema *Schema, IndexedVersion V, + llvm::DenseMap *MemProfCallStackIndexes) : Schema(Schema), Version(V), MemProfCallStackIndexes(MemProfCallStackIndexes) {} @@ -1039,11 +1038,10 @@ class CallStackRadixTreeBuilder { CallStackRadixTreeBuilder() = default; // Build a radix tree array. - void - build(llvm::MapVector> - &&MemProfCallStackData, - const llvm::DenseMap &MemProfFrameIndexes, - llvm::DenseMap &FrameHistogram); + void build(llvm::MapVector> + &&MemProfCallStackData, + const llvm::DenseMap &MemProfFrameIndexes, + llvm::DenseMap &FrameHistogram); const std::vector &getRadixArray() const { return RadixArray; } diff --git a/llvm/include/llvm/ProfileData/MemProfReader.h b/llvm/include/llvm/ProfileData/MemProfReader.h index b42e4f5977740..f0286820fa462 100644 --- a/llvm/include/llvm/ProfileData/MemProfReader.h +++ b/llvm/include/llvm/ProfileData/MemProfReader.h @@ -76,8 +76,8 @@ class MemProfReader { Callback = std::bind(&MemProfReader::idToFrame, this, std::placeholders::_1); - memprof::CallStackIdConverter CSIdConv( - CSIdToCallStack, Callback); + CallStackIdConverter CSIdConv(CSIdToCallStack, + Callback); const IndexedMemProfRecord &IndexedRecord = Iter->second; GuidRecord = { diff --git a/llvm/lib/ProfileData/MemProf.cpp b/llvm/lib/ProfileData/MemProf.cpp index 8e3053748c087..4ca868722ec4e 100644 --- a/llvm/lib/ProfileData/MemProf.cpp +++ b/llvm/lib/ProfileData/MemProf.cpp @@ -343,15 +343,15 @@ MemProfRecord IndexedMemProfRecord::toMemProfRecord( MemProfRecord Record; Record.AllocSites.reserve(AllocSites.size()); - for (const memprof::IndexedAllocationInfo &IndexedAI : AllocSites) { - memprof::AllocationInfo AI; + for (const IndexedAllocationInfo &IndexedAI : AllocSites) { + AllocationInfo AI; AI.Info = IndexedAI.Info; AI.CallStack = Callback(IndexedAI.CSId); Record.AllocSites.push_back(std::move(AI)); } Record.CallSites.reserve(CallSiteIds.size()); - for (memprof::CallStackId CSId : CallSiteIds) + for (CallStackId CSId : CallSiteIds) Record.CallSites.push_back(Callback(CSId)); return Record; @@ -487,7 +487,7 @@ void CallStackRadixTreeBuilder::build( llvm::MapVector> &&MemProfCallStackData, const llvm::DenseMap &MemProfFrameIndexes, - llvm::DenseMap &FrameHistogram) { + llvm::DenseMap &FrameHistogram) { // Take the vector portion of MemProfCallStackData. The vector is exactly // what we need to sort. Also, we no longer need its lookup capability. llvm::SmallVector CallStacks = MemProfCallStackData.takeVector();