Splits and processes shuffle mask depending on the number of input and output registers. The function does 2 main things: 1) splits the source/destination vectors into real registers; 2) do the mask analysis to identify which real registers are permuted. Then the function processes resulting registers mask using provided action items. If no input register is defined, NoInputAction action is used. If only 1 input register is used, SingleInputAction is used, otherwise ManyInputsAction is used to process > 2 input registers and masks.

Synopsis

Declared in <llvm/Analysis/VectorUtils.h>

void
processShuffleMasks(
    ArrayRef<int> Mask,
    unsigned int NumOfSrcRegs,
    unsigned int NumOfDestRegs,
    unsigned int NumOfUsedRegs,
    function_ref<void()> NoInputAction,
    function_ref<void(xref:llvm/ArrayRef-08.adoc[ArrayRef<int>, unsigned int, unsigned int)>] SingleInputAction,
    function_ref<void(xref:llvm/ArrayRef-08.adoc[ArrayRef<int>, unsigned int, unsigned int, bool)>] ManyInputsAction);

Parameters

Name

Description

Mask

Original shuffle mask.

NumOfSrcRegs

Number of source registers.

NumOfDestRegs

Number of destination registers.

NumOfUsedRegs

Number of actually used destination registers.

NoInputAction

An efficient, type‐erasing, non‐owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns.

SingleInputAction

An efficient, type‐erasing, non‐owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns.

ManyInputsAction

An efficient, type‐erasing, non‐owning reference to a callable. This is intended for use as the type of a function parameter that is not used after the function in question returns.

Created with MrDocs