27 io.mapRequired(
"Pass", PassName);
28 io.mapRequired(
"Name", RemarkName);
29 io.mapOptional(
"DebugLoc", RL);
30 io.mapRequired(
"Function", FunctionName);
31 io.mapOptional(
"Hotness", Hotness);
32 io.mapOptional(
"Args", Args);
40 assert(io.outputting() &&
"input not yet implemented");
48 else if (io.mapTag(
"!AnalysisFPCommute",
51 else if (io.mapTag(
"!AnalysisAliasing",
59 if (
auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
60 reinterpret_cast<RemarkSerializer *>(io.getContext()))) {
61 assert(Serializer->StrTab.hasValue() &&
62 "YAMLStrTabSerializer with no StrTab.");
64 unsigned PassID = StrTab.add(Remark->
PassName).first;
65 unsigned NameID = StrTab.add(Remark->
RemarkName).first;
66 unsigned FunctionID = StrTab.add(Remark->
FunctionName).first;
78 assert(io.outputting() &&
"input not yet implemented");
84 if (
auto *Serializer = dyn_cast<YAMLStrTabRemarkSerializer>(
85 reinterpret_cast<RemarkSerializer *>(io.getContext()))) {
86 assert(Serializer->StrTab.hasValue() &&
87 "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);
125 template <
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>(
140 reinterpret_cast<RemarkSerializer *>(io.getContext()))) {
141 assert(Serializer->StrTab.hasValue() &&
142 "YAMLStrTabSerializer with no StrTab.");
144 auto ValueID = StrTab.add(A.Val).first;
145 io.mapRequired(A.Key.data(), ValueID);
148 io.mapRequired(A.Key.data(), S);
150 io.mapRequired(A.Key.data(), A.Val);
152 io.mapOptional(
"DebugLoc", A.Loc);
159 LLVM_YAML_IS_SEQUENCE_VECTOR(
Argument)
169 YAMLOutput(OS, reinterpret_cast<void *>(this)) {
170 StrTab = std::move(StrTabIn);
180 std::unique_ptr<MetaSerializer>
183 return std::make_unique<YAMLMetaSerializer>(
OS, ExternalFilename);
192 MetaSerializer->emit();
203 return std::make_unique<YAMLStrTabMetaSerializer>(
OS, ExternalFilename,
218 OS.
write(Version.data(), Version.size());
227 std::array<char, 8> StrTabSizeBuf;
229 OS.
write(StrTabSizeBuf.data(), StrTabSizeBuf.size());
231 (*StrTab)->serialize(OS);
238 assert(!FilenameBuf.
empty() &&
"The filename can't be empty.");
247 if (ExternalFilename)
255 if (ExternalFilename)
This class represents an incoming formal argument to a Function.
This class represents lattice values for constants.
Helper struct for multiline string block literals.
static void output(const StringBlockVal &S, void *Ctx, raw_ostream &OS)
LLVM_NODISCARD size_t count(char C) const
Return the number of occurrences of C in the string.
void make_absolute(const Twine ¤t_directory, SmallVectorImpl< char > &path)
Make path an absolute path.
static void mapping(IO &io, Argument &A)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static StringRef input(StringRef Scalar, void *Ctx, StringBlockVal &S)
Instrumentation for Order File
size_t size() const
size - Get the array size.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
raw_ostream & write(unsigned char C)
static Argument & element(IO &io, ArrayRef< T > &seq, size_t index)
iterator_range< detail::value_sequence_iterator< ValueT > > seq(ValueT Begin, ValueT End)
StringBlockVal(StringRef R)
void write64le(void *P, uint64_t V)
pointer data()
Return a pointer to the vector's buffer, even if empty().
LLVM_NODISCARD bool empty() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
static size_t size(IO &io, ArrayRef< T > &seq)
constexpr char Args[]
Key for Kernel::Metadata::mArgs.