18#include "llvm/IR/IntrinsicsDirectX.h"
36 return I.getIntrinsicID() == Intrinsic::dx_load_input ||
37 I.getIntrinsicID() == Intrinsic::dx_store_output;
42 if (!
Node ||
Node->getNumOperands() != 13)
44 for (
unsigned I = 0;
I != 13; ++
I) {
48 unsigned Width = (
I == 7 || (
I >= 9 &&
I <= 11)) ? 8 : 32;
49 if (!CI || CI->getBitWidth() != Width)
58 for (
const MDOperand &Index : Indices->operands()) {
60 if (!CI || CI->getBitWidth() != 32)
73 switch (
E.SemanticKind) {
74 case dxbc::PSV::SemanticKind::Target:
77 "SV_Target requires 16- or 32-bit floating-point components");
79 case dxbc::PSV::SemanticKind::Position:
80 if (
E.Rows != 1 ||
E.Cols != 4 ||
83 "SV_Position requires one row of four floating-point components");
85 case dxbc::PSV::SemanticKind::VertexID:
86 if (
E.Rows != 1 ||
E.Cols != 1 ||
90 "SV_VertexID requires a scalar 16- or 32-bit integer");
92 case dxbc::PSV::SemanticKind::InstanceID:
93 if (
E.Rows != 1 ||
E.Cols != 1 ||
96 "SV_InstanceID requires a scalar 16- or 32-bit unsigned integer");
98 case dxbc::PSV::SemanticKind::ShadingRate:
99 if (
E.Rows != 1 ||
E.Cols != 1 ||
102 "SV_ShadingRate requires a scalar 16- or 32-bit unsigned integer");
104 case dxbc::PSV::SemanticKind::SampleIndex:
105 if (
E.Rows != 1 ||
E.Cols != 1 ||
108 "SV_SampleIndex requires a scalar 16- or 32-bit unsigned integer");
110 case dxbc::PSV::SemanticKind::PrimitiveID:
111 if (
E.Rows != 1 ||
E.Cols != 1 ||
114 "SV_PrimitiveID requires a scalar 16- or 32-bit unsigned integer");
116 case dxbc::PSV::SemanticKind::IsFrontFace:
117 if (
E.Rows != 1 ||
E.Cols != 1 ||
119 return signatureError(
"SV_IsFrontFace requires a scalar 32-bit integer");
121 case dxbc::PSV::SemanticKind::Barycentrics:
122 if (
E.Rows != 1 ||
E.Cols != 3 ||
124 return signatureError(
"SV_Barycentrics requires one row of three 16- or "
125 "32-bit floating-point components");
134 switch (
E.SemanticKind) {
135 case dxbc::PSV::SemanticKind::Target:
136 if (
E.Rows != 1 ||
E.SemanticIndices.front() >= 8)
138 "pixel targets require one row and an index within 0-7");
140 case dxbc::PSV::SemanticKind::VertexID:
141 if (
E.SemanticIndices.front() != 0)
144 case dxbc::PSV::SemanticKind::Barycentrics:
145 if (
E.SemanticIndices.front() != 0)
146 return signatureError(
"SV_Barycentrics requires semantic index 0");
148 case dxbc::PSV::SemanticKind::SampleIndex:
149 if (
E.SemanticIndices.front() != 0)
150 return signatureError(
"SV_SampleIndex requires semantic index 0");
152 case dxbc::PSV::SemanticKind::PrimitiveID:
153 if (
E.SemanticIndices.front() != 0)
154 return signatureError(
"SV_PrimitiveID requires semantic index 0");
156 case dxbc::PSV::SemanticKind::IsFrontFace:
157 if (
E.SemanticIndices.front() != 0)
158 return signatureError(
"SV_IsFrontFace requires semantic index 0");
169 switch (
E.SemanticKind) {
170 case dxbc::PSV::SemanticKind::Barycentrics:
172 return signatureError(
"SV_Barycentrics requires shader model 6.1");
185 bool Native16,
unsigned &Extent) {
190 return signatureError(
"expected a signature element list or null");
192 std::set<std::pair<std::string, uint32_t>> Semantics;
194 unsigned NumAllocated = 0;
195 std::array<uint8_t, MaxSignatureRows> AllocatedColumns = {};
196 std::array<dxbc::PSV::InterpolationMode, MaxSignatureRows> RowModes = {};
197 std::array<bool, MaxSignatureRows> RowNative16 = {};
204 return Parsed.takeError();
206 if (
E.SigId !=
Out.size())
207 return signatureError(
"signature IDs must be dense and in list order");
209 return signatureError(
"nonempty signatures are currently supported only "
210 "for vertex and pixel entries");
213 if (
E.SemanticName.empty() ||
E.SemanticName.contains(
'\0'))
219 return signatureError(
"nonzero stream requires a geometry output");
223 return signatureError(
"invalid or unsupported semantic for this stage "
224 "and signature category");
226 return signatureError(
"semantic accessed by a dedicated intrinsic must "
227 "not appear in an input/output signature");
229 ? dxbc::PSV::SemanticKind::Arbitrary
231 if (
E.SemanticKind != ExpectedKind)
232 return signatureError(
"semantic name and kind disagree at this signature "
237 " must not have an allocated location");
239 if (!
E.isAllocated())
241 E.SemanticName +
"') has no allocated location");
245 "allocated signature element exceeds register bounds");
247 if (
E.InterpMode == dxbc::PSV::InterpolationMode::Invalid)
251 if (!Semantics.emplace(
E.SemanticName.upper(), Index).second)
259 if (
E.SemanticKind == dxbc::PSV::SemanticKind::Barycentrics) {
261 if (
E.InterpMode == Mode::Undefined ||
E.InterpMode == Mode::Constant)
263 "noperspective interpolation");
267 (
E.StartRow != Extent ||
E.StartCol != 0))
268 return signatureError(
"vertex inputs require stacked locations in "
269 "signature order (element " +
272 (
E.StartRow !=
E.SemanticIndices.front() ||
E.StartCol != 0))
273 return signatureError(
"pixel target location must match its semantic "
274 "index at column 0");
277 E.InterpMode != dxbc::PSV::InterpolationMode::Constant)
279 "integer pixel inputs require constant interpolation");
281 if (
E.isAllocated()) {
282 if (++NumAllocated > MaxAllocatedElements)
290 for (
unsigned Row =
E.StartRow; Row !=
E.StartRow +
E.Rows; ++Row) {
291 if (AllocatedColumns[Row] & Mask)
295 if (AllocatedColumns[Row] && RowModes[Row] !=
E.InterpMode)
297 "signature elements have different interpolation "
300 if (AllocatedColumns[Row] && RowNative16[Row] != IsNative16)
301 return signatureError(
"signature elements have different component "
305 AllocatedColumns[Row] |= Mask;
306 RowModes[Row] =
E.InterpMode;
307 RowNative16[Row] = IsNative16;
309 Extent = std::max(Extent,
E.StartRow +
E.Rows);
311 E.SemanticName = Info.Names.insert(
E.SemanticName).first->getKey();
316 Out.push_back(std::move(
E));
322 bool Input =
I.getIntrinsicID() == Intrinsic::dx_load_input;
327 assert(ID &&
"signature ID is marked as ImmArg and must be constant");
328 if (ID->getZExtValue() >= Elements.size())
330 " signature: signature access has an invalid element "
332 Twine(ID->getZExtValue()));
333 auto &
E = Elements[ID->getZExtValue()];
334 auto AccessError = [&](
const Twine &Message) {
336 " ('" +
E.SemanticName +
"'): " + Message);
338 if (
E.SemanticKind == dxbc::PSV::SemanticKind::SampleIndex)
339 return AccessError(
"must not be read with dx.op.load/store");
340 Type *Ty =
Input ?
I.getType() :
I.getArgOperand(3)->getType();
343 Width = VT->getNumElements();
344 Ty = VT->getElementType();
346 if (!Col || Col->getZExtValue() >=
E.Cols ||
347 Width >
E.Cols - Col->getZExtValue())
348 return AccessError(
"signature access has an invalid component index");
350 if (Row && Row->getZExtValue() >=
E.Rows)
351 return AccessError(
"signature access has an invalid row index");
352 if (!Row &&
E.Rows == 1)
354 "dynamic indexing requires a multi-row signature element");
355 bool CorrectType =
false;
356 switch (
E.CompType) {
358 CorrectType = Ty->isHalfTy();
361 CorrectType = Ty->isFloatTy();
365 CorrectType = Ty->isIntegerTy(16);
369 CorrectType = Ty->isIntegerTy(32);
373 CorrectType = Ty->isIntegerTy(32);
379 return AccessError(
"signature access type disagrees with its element");
380 uint8_t Mask = ((1U << Width) - 1) << Col->getZExtValue();
381 E.UsageMask |= Mask <<
E.getStartColOrZero();
383 E.DynIndexMask |= Mask;
398 if (!
Input.isAllocated())
401 for (
unsigned IC = 0; IC != 4; ++IC) {
402 if (!(
Input.UsageMask & (1U << IC)))
404 unsigned Base = ((
Input.StartRow +
IR) * 4 + IC) * Words;
405 for (
const auto &Output : Sig.
Outputs)
406 for (
unsigned OR = 0; OR != Output.Rows; ++OR)
407 for (
unsigned OC = 0; OC != 4; ++OC) {
408 if (!(Output.UsageMask & (1U << OC)))
410 unsigned Bit = (Output.StartRow + OR) * 4 + OC;
422 if (
Record->getNumOperands() != 3)
424 "expected an entry/input/output signature triple");
427 if (!
F ||
F->getParent() != &M ||
F->isDeclaration())
429 "signature entry must be a defined function in the module");
434 return signatureError(
"signature function is not a shader entry");
435 if (Info.Entries.contains(
F))
439 Sig.
Stage = EP->ShaderStage;
441 M.getModuleFlag(
"dx.nativelowprec")))
445 "native 16-bit signatures require shader model 6.2");
448 " signature: " +
toString(std::move(Err)));
453 return AddContext(std::move(Err),
"input");
457 return AddContext(std::move(Err),
"output");
465 Info.Entries.try_emplace(
F, std::move(Sig));
471 if (!Info.Entries.contains(&
F))
476 "' has no entry signature metadata");
477 return std::move(Info);
484 M.getContext().emitError(
"Invalid semantic signature: " +
488 return std::move(*Result);
494 if (Elements.empty())
503 for (
const auto &
E : Elements) {
514 Props.
append({
I32(3),
I32(
E.UsageMask >>
E.getStartColOrZero())});
517 I8(
static_cast<uint8_t>(
E.CompType)),
518 I8(
static_cast<uint8_t>(
E.SemanticKind)),
520 I32(
E.Rows), I8(
E.Cols),
I32(
E.StartRow), I8(
E.StartCol),
529 return Legacy ? dxbc::SigComponentType::Unknown
530 : dxbc::SigComponentType::UInt32;
532 return dxbc::SigComponentType::SInt16;
534 return dxbc::SigComponentType::UInt16;
536 return dxbc::SigComponentType::SInt32;
538 return dxbc::SigComponentType::UInt32;
540 return dxbc::SigComponentType::Float16;
542 return dxbc::SigComponentType::Float32;
551 case KindTy::Arbitrary:
552 return dxbc::D3DSystemValue::Undefined;
553 case KindTy::VertexID:
554 return dxbc::D3DSystemValue::VertexID;
555 case KindTy::InstanceID:
556 return dxbc::D3DSystemValue::InstanceID;
557 case KindTy::Position:
558 return dxbc::D3DSystemValue::Position;
559 case KindTy::IsFrontFace:
560 return dxbc::D3DSystemValue::IsFrontFace;
561 case KindTy::ClipDistance:
562 return dxbc::D3DSystemValue::ClipDistance;
563 case KindTy::CullDistance:
564 return dxbc::D3DSystemValue::CullDistance;
566 return dxbc::D3DSystemValue::Target;
567 case KindTy::ShadingRate:
568 return dxbc::D3DSystemValue::ShadingRate;
569 case KindTy::Barycentrics:
570 return dxbc::D3DSystemValue::Barycentrics;
571 case KindTy::SampleIndex:
572 return dxbc::D3DSystemValue::SampleIndex;
573 case KindTy::PrimitiveID:
574 return dxbc::D3DSystemValue::PrimitiveID;
586 switch (
E.SemanticKind) {
587 case Kind::Arbitrary:
588 return E.SemanticName;
590 return "SV_VertexID";
591 case Kind::InstanceID:
592 return "SV_InstanceID";
594 return "SV_Position";
595 case Kind::IsFrontFace:
596 return "SV_IsFrontFace";
597 case Kind::ClipDistance:
598 return "SV_ClipDistance";
599 case Kind::CullDistance:
600 return "SV_CullDistance";
603 case Kind::ShadingRate:
604 return "SV_ShadingRate";
605 case Kind::Barycentrics:
606 return "SV_Barycentrics";
607 case Kind::SampleIndex:
608 return "SV_SampleIndex";
609 case Kind::PrimitiveID:
610 return "SV_PrimitiveID";
619 for (
const auto &
E : Elements) {
622 Input ?
E.getAlwaysReadsMask() :
E.getNeverWritesMask();
624 ExclusiveMask =
Input ? 0 :
static_cast<uint8_t>(~Mask);
625 for (
auto [Row, Index] :
enumerate(
E.SemanticIndices))
630 ExclusiveMask,
E.getMinPrecision(!Native16));
637 for (
const auto &
E : Elements) {
641 {
E.SemanticKind == dxbc::PSV::SemanticKind::Arbitrary ?
E.SemanticName
645 E.Cols,
E.getStartColOrZero(),
E.isAllocated(),
E.SemanticKind,
647 E.DynIndexMask,
static_cast<uint8_t>(
E.GSStream)});
675 for (
const auto &Output :
Outputs) {
676 if (!Output.isAllocated())
678 for (
unsigned R = 0; R != Output.Rows; ++R)
679 for (
unsigned C = 0;
C != 4; ++
C) {
680 if (!(Output.UsageMask & (1U <<
C)))
682 unsigned Bit = (Output.StartRow + R) * 4 +
C;
683 Mask[Bit / 32] |= 1U << (Bit % 32);
691 bool UsesViewID)
const {
705 return E.SemanticKind == dxbc::PSV::SemanticKind::Position;
710 return E.InterpMode == dxbc::PSV::InterpolationMode::LinearSample ||
712 dxbc::PSV::InterpolationMode::LinearNoperspectiveSample ||
713 E.SemanticKind == dxbc::PSV::SemanticKind::SampleIndex;
729 OS <<
" " << Name <<
": " << Elements.size() <<
" elements, " << Vectors
731 for (
const auto &E : Elements)
732 OS <<
" " << E.SigId <<
": " << E.SemanticName <<
" rows=" << E.Rows
733 <<
" cols=" <<
unsigned(E.Cols) <<
" at " << E.StartRow <<
":"
735 <<
" dynamic=" <<
unsigned(E.DynIndexMask) <<
'\n';
743 if (
const auto *Sig =
get(&
F)) {
744 OS <<
"Semantic signatures for '" <<
F.getName() <<
"':\n";
779 "DXIL Semantic Signature Analysis",
false,
true)
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Expand Atomic instructions
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
static GlobalVariable * buildSignature(Module &M, Signature &Sig, StringRef Name, StringRef SectionName, const dxil::ModuleMetadataInfo &MMI)
static Error diagnoseSemanticType(const SemanticSignatureElement &E)
static Error diagnoseSemanticIndex(const SemanticSignatureElement &E)
static bool isSignatureAccess(const IntrinsicInst &I)
static bool isIntegerComponent(ElementType Type)
static MDNode * emitSignature(LLVMContext &Ctx, ArrayRef< SemanticSignatureElement > Elements, VersionTuple ValidatorVersion)
static void buildSignature(mcdxbc::Signature &Sig, ArrayRef< SemanticSignatureElement > Elements, bool Input, bool Native16, bool Legacy)
static dxbc::D3DSystemValue getSystemValue(dxbc::PSV::SemanticKind Kind)
static Expected< ModuleSignatureInfo > analyzeModule(Module &M, const ModuleMetadataInfo &MMI)
static ModuleSignatureInfo collectSignatures(Module &M, const ModuleMetadataInfo &MMI)
static dxbc::SigComponentType getComponentType(ElementType Type, bool Legacy)
static void buildDependencyMap(EntrySignature &Sig)
static Error diagnoseSemanticShaderModel(const SemanticSignatureElement &E, const VersionTuple &ShaderModelVersion)
static Error checkElementNode(const MDNode *Node)
static void buildPSVElements(SmallVectorImpl< mcdxbc::PSVSignatureElement > &Dest, ArrayRef< SemanticSignatureElement > Elements, bool Legacy)
static StringRef getContainerSemanticName(const SemanticSignatureElement &E)
static Error signatureError(const Twine &Message)
static Error analyzeAccess(const IntrinsicInst &I, EntrySignature &Sig)
static Error parseSignature(Metadata *MD, SmallVectorImpl< SemanticSignatureElement > &Out, ModuleSignatureInfo &Info, Triple::EnvironmentType Stage, IOType IO, const VersionTuple &ShaderModelVersion, bool Native16, unsigned &Extent)
Module.h This file contains the declarations for the Module class.
Legalize the Machine IR a function s Machine IR
uint64_t IntrinsicInst * II
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
A wrapper class for inspecting calls to intrinsic functions.
This is an important class for using LLVM in a threaded context.
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
Tracking metadata reference owned by Metadata.
static LLVM_ABI MDString * get(LLVMContext &Context, StringRef Str)
A Module instance is used to store all the information related to an LLVM module.
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void assign(size_type NumElts, ValueParamT Elt)
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
static LLVM_ABI IntegerType * getInt32Ty(LLVMContext &C)
static LLVM_ABI IntegerType * getInt8Ty(LLVMContext &C)
Represents a version number in the form major[.minor[.subminor[.build]]].
bool empty() const
Determine whether this version information is empty (e.g., all version components are zero).
const EntrySignature * get(const Function *F) const
void print(raw_ostream &OS, const Module &M) const
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
void print(raw_ostream &OS, const Module *M) const override
print - Print out the internal state of the pass.
Result run(Module &M, ModuleAnalysisManager &AM)
void addParam(uint32_t Stream, StringRef Name, uint32_t Index, dxbc::D3DSystemValue SystemValue, dxbc::SigComponentType CompType, uint32_t Register, uint8_t Mask, uint8_t ExclusiveMask, dxbc::SigMinPrecision MinPrecision)
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
ElementType
The element type of an SRV or UAV resource.
static constexpr uint32_t UnallocatedRow
LLVM_ABI SemanticInterpretation getInterpretationKind(dxbc::PSV::SemanticKind SemanticKind, Triple::EnvironmentType ShaderStage, IOType IOTy)
LLVM_ABI dxbc::PSV::SemanticKind getSemanticKind(StringRef SemanticName)
static constexpr unsigned MaxSignatureRows
std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > dyn_extract_or_null(Y &&MD)
Extract a Value from Metadata, if any, allowing null.
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
auto enumerate(FirstRange &&First, RestRanges &&...Rest)
Given two or more input ranges, returns a new range whose values are tuples (A, B,...
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
void append_range(Container &C, Range &&R)
Wrapper function to append range R to container C.
bool isa_and_nonnull(const Y &Val)
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
auto dyn_cast_or_null(const Y &Val)
bool any_of(R &&range, UnaryPredicate P)
Provide wrappers to std::any_of which take ranges instead of having to pass begin/end explicitly.
DWARFExpression::Operation Op
std::string toString(const APInt &I, unsigned Radix, bool Signed, bool formatAsCLiteral=false, bool UpperCase=true, bool InsertSeparators=false)
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
A special type used by analysis passes to provide an address that identifies that particular analysis...
PipelinePSVInfo StageInfo
uint8_t SigOutputVectors[4]
uint8_t OutputPositionPresent
SmallVector< hlsl::SemanticSignatureElement > Inputs
SmallVector< uint32_t > getDependencyState(bool UsesViewID) const
Return the serialized dx.viewIdState words for this entry: input scalar count, output scalar count,...
Triple::EnvironmentType Stage
void buildSignatures(mcdxbc::Signature &Input, mcdxbc::Signature &Output, VersionTuple ValidatorVersion) const
Append ISG1/OSG1 parameters to the supplied builders.
SmallVector< hlsl::SemanticSignatureElement > Outputs
void updatePSV(mcdxbc::PSVRuntimeInfo &PSV, VersionTuple ValidatorVersion, bool UsesViewID) const
Append PSV signature elements and set vector extents, the dependency map, the view ID output mask if ...
SmallVector< uint32_t > getViewIDOutputMask() const
Return the mask of output scalars that depend on the view ID.
MDTuple * getAsMetadata(LLVMContext &Ctx, VersionTuple ValidatorVersion) const
Return the DXIL input/output/patch-constant signature triple.
SmallVector< uint32_t > InputOutputMap
void print(raw_ostream &OS) const
static LLVM_ABI Expected< SemanticSignatureElement > fromMetadata(const MDNode *Node)
dxbc::PSV::v3::RuntimeInfo BaseData
SmallVector< PSVSignatureElement > InputElements
SmallVector< PSVSignatureElement > OutputElements
std::array< SmallVector< uint32_t >, 4 > OutputVectorMasks
std::array< SmallVector< uint32_t >, 4 > InputOutputMap