26 std::optional<RemarkLocation> RL,
T FunctionName,
27 std::optional<uint64_t> Hotness,
30 io.mapRequired(
"Name", RemarkName);
31 io.mapOptional(
"DebugLoc", RL);
32 io.mapRequired(
"Function", FunctionName);
33 io.mapOptional(
"Hotness", Hotness);
34 io.mapOptional(
"Args", Args);
42 assert(io.outputting() &&
"input not yet implemented");
50 else if (io.mapTag(
"!AnalysisFPCommute",
53 else if (io.mapTag(
"!AnalysisAliasing",
61 if (
auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
63 assert(Serializer->StrTab &&
"YAMLStrTabSerializer with no StrTab.");
79 assert(io.outputting() &&
"input not yet implemented");
85 if (
auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
87 assert(Serializer->StrTab &&
"YAMLStrTabSerializer with no StrTab.");
89 unsigned FileID = StrTab.add(File).first;
90 io.mapRequired(
"File", FileID);
92 io.mapRequired(
"File", File);
95 io.mapRequired(
"Line", Line);
96 io.mapRequired(
"Column", Col);
99 static const bool flow =
true;
111 return ScalarTraits<StringRef>::output(S.
Value, Ctx,
OS);
115 return ScalarTraits<StringRef>::input(Scalar, Ctx, S.
Value);
125template <
typename T>
struct SequenceTraits<
ArrayRef<
T>> {
128 assert(io.outputting() &&
"input not yet implemented");
130 return const_cast<T &
>(
seq[index]);
137 assert(io.outputting() &&
"input not yet implemented");
139 if (
auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
141 assert(Serializer->StrTab &&
"YAMLStrTabSerializer with no StrTab.");
143 auto ValueID = StrTab.add(
A.Val).first;
144 io.mapRequired(
A.Key.data(), ValueID);
147 io.mapRequired(
A.Key.data(), S);
149 io.mapRequired(
A.Key.data(),
A.Val);
151 io.mapOptional(
"DebugLoc",
A.Loc);
166 std::optional<StringTable> StrTabIn)
168 YAMLOutput(
OS, reinterpret_cast<void *>(this)) {
169 StrTab = std::move(StrTabIn);
180 raw_ostream &
OS, std::optional<StringRef> ExternalFilename) {
181 return std::make_unique<YAMLMetaSerializer>(
OS, ExternalFilename);
199 raw_ostream &
OS, std::optional<StringRef> ExternalFilename) {
201 return std::make_unique<YAMLStrTabMetaSerializer>(
OS, ExternalFilename,
220 std::optional<const StringTable *> StrTab) {
222 uint64_t StrTabSize = StrTab ? (*StrTab)->SerializedSize : 0;
226 std::array<char, 8> StrTabSizeBuf;
228 OS.
write(StrTabSizeBuf.data(), StrTabSizeBuf.size());
230 (*StrTab)->serialize(
OS);
237 assert(!FilenameBuf.
empty() &&
"The filename can't be empty.");
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static const char PassName[]
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
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),...
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
pointer data()
Return a pointer to the vector's buffer, even if empty().
StringRef - Represent a constant reference to a string, i.e.
size_t count(char C) const
Return the number of occurrences of C in the string.
A table of densely packed, null-terminated strings indexed by offset.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & write(unsigned char C)
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
void write64le(void *P, uint64_t V)
void make_absolute(const Twine ¤t_directory, SmallVectorImpl< char > &path)
Make path an absolute path.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
auto seq(T Begin, T End)
Iterate over an integral type from Begin up to - but not including - End.
Implement std::hash so that hash_code can be used in STL containers.
static void output(const StringBlockVal &S, void *Ctx, raw_ostream &OS)
static StringRef input(StringRef Scalar, void *Ctx, StringBlockVal &S)
static void mapping(IO &io, Argument &A)
static Argument & element(IO &io, ArrayRef< T > &seq, size_t index)
static size_t size(IO &io, ArrayRef< T > &seq)
Helper struct for multiline string block literals.
StringBlockVal(StringRef R)