LLVM: include/llvm/IR/LLVMRemarkStreamer.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_IR_LLVMREMARKSTREAMER_H

15#define LLVM_IR_LLVMREMARKSTREAMER_H

16

21#include

22#include

23#include

24

25namespace llvm {

26

32}

33

34

35

38

39

40

42

43public:

45

47};

48

49template

52 std::error_code EC;

53

60

63};

64

71

78

85

86

87

88

89

91 struct Finalizer {

93

95

96 Finalizer(const Finalizer &) = delete;

97 Finalizer &operator=(const Finalizer &) = delete;

98

100 Other.Context = nullptr;

101 }

102

103 Finalizer &operator=(Finalizer &&Other) {

105 return *this;

106 }

107

109

111 };

112

113 std::unique_ptr OutputFile;

114 Finalizer Finalize;

115

116public:

118

121 : OutputFile(std::move(OutputFile)), Finalize(&Ctx) {}

122

124 explicit operator bool() { return bool(OutputFile); }

125

126

129 return std::move(OutputFile);

130 }

131

133

136};

137

138

139

140

141

142

147

148

149

150

152 LLVMContext &Context, raw_ostream &OS, StringRef RemarksPasses,

155

156

157

158

160

161}

162

163#endif

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

R600 Control Flow Finalizer

Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...

Base class for error info classes.

virtual std::string message() const

Return the error message as a string.

virtual std::error_code convertToErrorCode() const =0

Convert this error to a std::error_code.

Base class for user error types.

Lightweight error class with error context and mandatory checking.

This is an important class for using LLVM in a threaded context.

LLVMRemarkFileHandle(std::unique_ptr< ToolOutputFile > OutputFile, LLVMContext &Ctx)

Definition LLVMRemarkStreamer.h:119

std::unique_ptr< ToolOutputFile > releaseFile()

Finalize remark emission and release the underlying ToolOutputFile.

Definition LLVMRemarkStreamer.h:127

void finalize()

Definition LLVMRemarkStreamer.h:132

ToolOutputFile * get()

Definition LLVMRemarkStreamer.h:123

ToolOutputFile & operator*()

Definition LLVMRemarkStreamer.h:134

ToolOutputFile * operator->()

Definition LLVMRemarkStreamer.h:135

LLVMRemarkFileHandle()

Definition LLVMRemarkStreamer.h:117

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

This is an optimization pass for GlobalISel generic memory operations.

cl::opt< std::string > RemarksFormat("lto-pass-remarks-format", cl::desc("The format used for serializing remarks (default: YAML)"), cl::value_desc("format"), cl::init("yaml"))

LLVM_ABI Expected< LLVMRemarkFileHandle > setupLLVMOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename, StringRef RemarksPasses, StringRef RemarksFormat, bool RemarksWithHotness, std::optional< uint64_t > RemarksHotnessThreshold=0)

Set up optimization remarks that output to a file.

cl::opt< std::string > RemarksPasses("lto-pass-remarks-filter", cl::desc("Only record optimization remarks from passes whose " "names match the given regular expression"), cl::value_desc("regex"))

void handleAllErrors(Error E, HandlerTs &&... Handlers)

Behaves the same as handleErrors, except that by contract all errors must be handled by the given han...

cl::opt< bool > RemarksWithHotness("lto-pass-remarks-with-hotness", cl::desc("With PGO, include profile count in optimization remarks"), cl::Hidden)

cl::opt< std::string > RemarksFilename("lto-pass-remarks-output", cl::desc("Output filename for pass remarks"), cl::value_desc("filename"))

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

cl::opt< std::optional< uint64_t >, false, remarks::HotnessThresholdParser > RemarksHotnessThreshold("lto-pass-remarks-hotness-threshold", cl::desc("Minimum profile count required for an " "optimization remark to be output." " Use 'auto' to apply the threshold from profile summary."), cl::value_desc("uint or 'auto'"), cl::init(0), cl::Hidden)

LLVM_ABI void finalizeLLVMOptimizationRemarks(LLVMContext &Context)

Finalize optimization remarks and deregister the RemarkStreamer from the Context.

Implement std::hash so that hash_code can be used in STL containers.

void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)

Implement std::swap in terms of BitVector swap.