LLVM: include/llvm/ProfileData/PGOCtxProfWriter.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_PROFILEDATA_PGOCTXPROFWRITER_H_

14#define LLVM_PROFILEDATA_PGOCTXPROFWRITER_H_

15

21

22namespace llvm {

31

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

79 enum class EmptyContextCriteria { None, EntryIsZero, AllAreZero };

80

82 const bool IncludeEmpty;

83

85 void writeCallsiteIndex(uint32_t Index);

86 void writeRootEntryCount(uint64_t EntryCount);

90

91public:

93 std::optional VersionOverride = std::nullopt,

94 bool IncludeEmpty = false);

96

97 void startContextSection() override;

101 void endContextSection() override;

102

103 void startFlatSection() override;

105 size_t BufferSize) override;

106 void endFlatSection() override;

107

108

109 static constexpr unsigned CodeLen = 2;

113};

114

116}

117#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.

~PGOCtxProfileWriter() override

Definition PGOCtxProfWriter.h:95

static constexpr unsigned VBREncodingBits

Definition PGOCtxProfWriter.h:111

static constexpr uint32_t CurrentVersion

Definition PGOCtxProfWriter.h:110

PGOCtxProfileWriter(raw_ostream &Out, std::optional< unsigned > VersionOverride=std::nullopt, bool IncludeEmpty=false)

static constexpr StringRef ContainerMagic

Definition PGOCtxProfWriter.h:112

static constexpr unsigned CodeLen

Definition PGOCtxProfWriter.h:109

StringRef - Represent a constant reference to a string, i.e.

Abstraction for the parameter passed to __llvm_ctx_profile_fetch.

This class implements an extremely fast bulk output stream that can only output to a stream.

@ FIRST_APPLICATION_BLOCKID

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI Error createCtxProfFromYAML(StringRef Profile, raw_ostream &Out)

FunctionAddr VTableAddr uintptr_t uintptr_t Version

PGOCtxProfileBlockIDs

Definition PGOCtxProfWriter.h:32

@ ContextNodeBlockID

Definition PGOCtxProfWriter.h:37

@ LAST_VALID

Definition PGOCtxProfWriter.h:41

@ ContextsSectionBlockID

Definition PGOCtxProfWriter.h:35

@ ContextRootBlockID

Definition PGOCtxProfWriter.h:36

@ FlatProfilesSectionBlockID

Definition PGOCtxProfWriter.h:38

@ UnhandledBlockID

Definition PGOCtxProfWriter.h:40

@ FlatProfileBlockID

Definition PGOCtxProfWriter.h:39

@ ProfileMetadataBlockID

Definition PGOCtxProfWriter.h:34

@ FIRST_VALID

Definition PGOCtxProfWriter.h:33

PGOCtxProfileRecords

Definition PGOCtxProfWriter.h:23

@ Counters

Definition PGOCtxProfWriter.h:28

@ Invalid

Definition PGOCtxProfWriter.h:24

@ CallsiteIndex

Definition PGOCtxProfWriter.h:27

@ TotalRootEntryCount

Definition PGOCtxProfWriter.h:29

@ Guid

Definition PGOCtxProfWriter.h:26