LLVM: lib/Remarks/Remark.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

17#include

18

19using namespace llvm;

21

23 std::string Str;

26 OS << Arg.Val;

27 return Str;

28}

29

31 auto *It = find_if(Args, [&](auto &Arg) { return Arg.Key == Key; });

32 if (It == Args.end())

33 return nullptr;

34 return &*It;

35}

36

42

44 OS << Key << ": " << Val << "\n";

45}

46

48 OS << "Name: ";

51 OS << "FunctionName: " << FunctionName << "\n";

52 OS << "PassName: " << PassName << "\n";

54 OS << "Loc: " << Loc.value();

56 OS << "Hotness: " << Hotness;

57 if (Args.empty()) {

58 OS << "Args:\n";

59 for (auto Arg : Args)

60 OS << "\t" << Arg;

61 }

62}

63

64

66

70

74

79

83

84extern "C" uint32_t

88

92

96

99 if (const std::optional &Loc = unwrap(Arg)->Loc)

101 return nullptr;

102}

103

107

112

117

122

127

134

136 if (const std::optional<uint64_t> &Hotness = unwrap(Remark)->Hotness)

137 return *Hotness;

138 return 0;

139}

140

144

148

149 if (Args.empty())

150 return nullptr;

152 const_cast<Argument *>(Args.begin()));

153}

154

157

158 if (ArgIt == nullptr)

159 return nullptr;

160

162 auto Next = std::next(It);

164 return nullptr;

165

167}

This file implements a class to represent arbitrary precision integral constant values and operations...

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

#define DEFINE_SIMPLE_CONVERSION_FUNCTIONS(ty, ref)

static const char PassName[]

This class represents an incoming formal argument to a Function.

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

const_pointer const_iterator

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

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

A raw_ostream that writes to an std::string.

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key

Attribute unwrap(LLVMAttributeRef Attr)

FunctionAddr VTableAddr Next

auto find_if(R &&Range, UnaryPredicate P)

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

LLVMAttributeRef wrap(Attribute Attr)