diff --git a/llvm/include/llvm/ProfileData/InstrProfWriter.h b/llvm/include/llvm/ProfileData/InstrProfWriter.h index 117fddb5729e4..67d85daa81623 100644 --- a/llvm/include/llvm/ProfileData/InstrProfWriter.h +++ b/llvm/include/llvm/ProfileData/InstrProfWriter.h @@ -115,21 +115,6 @@ class InstrProfWriter { void addTemporalProfileTraces(SmallVectorImpl &SrcTraces, uint64_t SrcStreamSize); - /// Add a memprof record for a function identified by its \p Id. - void addMemProfRecord(const GlobalValue::GUID Id, - const memprof::IndexedMemProfRecord &Record); - - /// Add a memprof frame identified by the hash of the contents of the frame in - /// \p FrameId. - bool addMemProfFrame(const memprof::FrameId, const memprof::Frame &F, - function_ref Warn); - - /// Add a call stack identified by the hash of the contents of the call stack - /// in \p CallStack. - bool addMemProfCallStack(const memprof::CallStackId CSId, - const llvm::SmallVector &CallStack, - function_ref Warn); - /// Add the entire MemProfData \p Incoming to the writer context. bool addMemProfData(memprof::IndexedMemProfData Incoming, function_ref Warn); @@ -229,6 +214,21 @@ class InstrProfWriter { /// Add \p Trace using reservoir sampling. void addTemporalProfileTrace(TemporalProfTraceTy Trace); + /// Add a memprof record for a function identified by its \p Id. + void addMemProfRecord(const GlobalValue::GUID Id, + const memprof::IndexedMemProfRecord &Record); + + /// Add a memprof frame identified by the hash of the contents of the frame in + /// \p FrameId. + bool addMemProfFrame(const memprof::FrameId, const memprof::Frame &F, + function_ref Warn); + + /// Add a call stack identified by the hash of the contents of the call stack + /// in \p CallStack. + bool addMemProfCallStack(const memprof::CallStackId CSId, + const llvm::SmallVector &CallStack, + function_ref Warn); + Error writeImpl(ProfOStream &OS); // Writes known header fields and reserves space for fields whose value are