LLVM: include/llvm/ProfileData/IndexedMemProfData.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_PROFILEDATA_INDEXEDMEMPROFDATA_H
16#define LLVM_PROFILEDATA_INDEXEDMEMPROFDATA_H
17
24
25namespace llvm {
29
30
32
33
34
35
37
38
40
42 const FrameId Id = hashFrame(F);
44 return Id;
45 }
46
52
55 CallStacks.try_emplace(CSId, std::move(CS));
56 return CSId;
57 }
58
59private:
60
61
62
63
64
71 std::memcpy(&Id, Hash.data(), sizeof(Hash));
72 return Id;
73 }
74
75
83 std::memcpy(&CSId, Hash.data(), sizeof(Hash));
84 return CSId;
85 }
86};
87}
88
89
93 std::unique_ptrmemprof::DataAccessProfData DataAccessProfileData,
94 std::unique_ptrmemprof::MemProfSummary MemProfSum);
95}
96#endif
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
HashResultTy< HasherT_ > final()
Forward to HasherT::final() if available.
Interface to help hash various types through a hasher type.
std::enable_if_t< hashbuilder_detail::IsHashableData< T >::value, HashBuilder & > add(T Value)
Implement hashing for hashable data types, e.g. integral or enum values.
This class implements a map that also provides access to all stored values in a deterministic order.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
std::array< uint8_t, NumBytes > BLAKE3Result
The constant LLVM_BLAKE3_OUT_LEN provides the default output length, 32 bytes, which is recommended f...
LLVM_ABI Error writeMemProf(ProfOStream &OS, memprof::IndexedMemProfData &MemProfData, memprof::IndexedVersion MemProfVersionRequested, bool MemProfFullSchema, std::unique_ptr< memprof::DataAccessProfData > DataAccessProfileData, std::unique_ptr< memprof::MemProfSummary > MemProfSum)
llvm::MapVector< CallStackId, llvm::SmallVector< FrameId > > CallStacks
Definition IndexedMemProfData.h:39
CallStackId addCallStack(SmallVector< FrameId > &&CS)
Definition IndexedMemProfData.h:53
llvm::MapVector< GlobalValue::GUID, IndexedMemProfRecord > Records
Definition IndexedMemProfData.h:31
CallStackId addCallStack(ArrayRef< FrameId > CS)
Definition IndexedMemProfData.h:47
FrameId addFrame(const Frame &F)
Definition IndexedMemProfData.h:41
llvm::MapVector< FrameId, Frame > Frames
Definition IndexedMemProfData.h:36