23 if (Buffer.
size() < Sequence.size())
25 for (
size_t Idx = 0;
Idx <= Buffer.
size() - Sequence.size(); ++
Idx) {
26 if (0 ==
memcmp(
static_cast<const void *
>(&Buffer[
Idx]),
27 static_cast<const void *
>(Sequence.begin()),
40 for (
const auto &El : Elements) {
42 StrTabBuilder.
add(El.Name);
47 FinalElement.
Rows =
static_cast<uint8_t>(El.Indices.size());
49 FinalElement.
Cols = El.Cols;
52 FinalElement.
Kind = El.Kind;
53 FinalElement.
Type = El.Type;
54 FinalElement.
Mode = El.Mode;
56 FinalElement.
Stream = El.Stream;
61 IndexBuffer.
insert(IndexBuffer.
end(), El.Indices.begin(),
102 if (ResourceCount > 0)
106 OS.
write(
reinterpret_cast<const char *
>(&Res), BindingSize);
122 for (
auto I : IndexBuffer)
125 if (SignatureElements.
size() > 0) {
132 OS.
write(
reinterpret_cast<const char *
>(&SignatureElements[0]),
171 for (
auto ElAndName :
zip(SignatureElements, SemanticNames)) {
200 for (
const auto &
P : Params) {
204 FinalElement.
Stream =
P.Stream;
206 static_cast<uint32_t>(StrTabBuilder.
add(
P.Name)) + TableStart;
207 FinalElement.
Index =
P.Index;
211 FinalElement.
Mask =
P.Mask;
220 return std::tie(L.Stream, L.Register, L.NameOffset) <
221 std::tie(R.Stream, R.Register, R.NameOffset);
224 for (
auto &El : SigParams)
233 OS.
write(
reinterpret_cast<const char *
>(SigParams.
data()),
static constexpr size_t npos
static void ProcessElementList(StringTableBuilder &StrTabBuilder, SmallVectorImpl< uint32_t > &IndexBuffer, SmallVectorImpl< v0::SignatureElement > &FinalElements, SmallVectorImpl< StringRef > &SemanticNames, ArrayRef< PSVSignatureElement > Elements)
static size_t FindSequence(ArrayRef< uint32_t > Buffer, ArrayRef< uint32_t > Sequence)
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
Merge contiguous icmps into a memcmp
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void reserve(size_type N)
iterator insert(iterator I, T &&Elt)
void push_back(const T &Elt)
pointer data()
Return a pointer to the vector's buffer, even if empty().
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
static constexpr size_t npos
Utility for building string tables with deduplicated suffixes.
void finalizeInOrder()
Finalize the string table without reording it.
size_t getOffset(CachedHashStringRef S) const
Get the offest of a string in the string table.
void write(raw_ostream &OS) const
size_t add(CachedHashStringRef S)
Add a string to the builder.
void finalize()
Analyze the strings and build the final table.
void write(raw_ostream &OS)
This class implements an extremely fast bulk output stream that can only output to a stream.
raw_ostream & write(unsigned char C)
void write_array(raw_ostream &os, ArrayRef< value_type > values, endianness endian)
void write(void *memory, value_type value, endianness endian)
Write a value to memory with a particular endianness.
constexpr bool IsBigEndianHost
This is an optimization pass for GlobalISel generic memory operations.
detail::zippy< detail::zip_shortest, T, U, Args... > zip(T &&t, U &&u, Args &&...args)
zip iterator for two or more iteratable types.
void stable_sort(R &&Range)
uint8_t SigPatchOrPrimElements
uint8_t SigOutputElements
SigMinPrecision MinPrecision
D3DSystemValue SystemValue
SigComponentType CompType
dxbc::PSV::v3::RuntimeInfo BaseData
llvm::StringRef EntryName
SmallVector< uint32_t > PatchOrPrimMasks
SmallVector< uint32_t > PatchOutputMap
SmallVector< dxbc::PSV::v2::ResourceBindInfo > Resources
void finalize(Triple::EnvironmentType Stage)
SmallVector< PSVSignatureElement > InputElements
SmallVector< uint32_t > InputPatchMap
SmallVector< PSVSignatureElement > OutputElements
SmallVector< PSVSignatureElement > PatchOrPrimElements
void write(raw_ostream &OS, uint32_t Version=std::numeric_limits< uint32_t >::max()) const
std::array< SmallVector< uint32_t >, 4 > OutputVectorMasks
std::array< SmallVector< uint32_t >, 4 > InputOutputMap