LLVM 17.0.0git
Macros | Functions | Variables
ComplexDeinterleavingPass.cpp File Reference
#include "llvm/CodeGen/ComplexDeinterleavingPass.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/InitializePasses.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Transforms/Utils/Local.h"
#include <algorithm>
Include dependency graph for ComplexDeinterleavingPass.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "complex-deinterleaving"
 

Functions

 STATISTIC (NumComplexTransformations, "Amount of complex patterns transformed")
 
static bool isInterleavingMask (ArrayRef< int > Mask)
 Checks the given mask, and determines whether said mask is interleaving.
 
static bool isDeinterleavingMask (ArrayRef< int > Mask)
 Checks the given mask, and determines whether said mask is deinterleaving.
 
 INITIALIZE_PASS_BEGIN (ComplexDeinterleavingLegacyPass, DEBUG_TYPE, "Complex Deinterleaving", false, false) INITIALIZE_PASS_END(ComplexDeinterleavingLegacyPass
 
static bool isInstructionPairAdd (Instruction *A, Instruction *B)
 
static bool isInstructionPairMul (Instruction *A, Instruction *B)
 

Variables

static cl::opt< boolComplexDeinterleavingEnabled ("enable-complex-deinterleaving", cl::desc("Enable generation of complex instructions"), cl::init(true), cl::Hidden)
 
 DEBUG_TYPE
 
Complex Deinterleaving
 
Complex false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "complex-deinterleaving"

Definition at line 73 of file ComplexDeinterleavingPass.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ComplexDeinterleavingLegacyPass  ,
DEBUG_TYPE  ,
"Complex Deinterleaving"  ,
false  ,
false   
)

◆ isDeinterleavingMask()

static bool isDeinterleavingMask ( ArrayRef< int >  Mask)
static

Checks the given mask, and determines whether said mask is deinterleaving.

To be deinterleaving, a mask must increment in steps of 2, and either start with 0 or 1. (e.g. an 8x vector deinterleaving mask would be either <0, 2, 4, 6> or <1, 3, 5, 7>).

Definition at line 359 of file ComplexDeinterleavingPass.cpp.

References Idx, and llvm::Offset.

◆ isInstructionPairAdd()

static bool isInstructionPairAdd ( Instruction A,
Instruction B 
)
static

Definition at line 682 of file ComplexDeinterleavingPass.cpp.

References A, and B.

◆ isInstructionPairMul()

static bool isInstructionPairMul ( Instruction A,
Instruction B 
)
static

◆ isInterleavingMask()

static bool isInterleavingMask ( ArrayRef< int >  Mask)
static

Checks the given mask, and determines whether said mask is interleaving.

To be interleaving, a mask must alternate between i and i + (Length / 2), and must contain all numbers within the range of [0..Length) (e.g. a 4x vector interleaving mask would be <0, 2, 1, 3>).

Definition at line 344 of file ComplexDeinterleavingPass.cpp.

References Idx.

◆ STATISTIC()

STATISTIC ( NumComplexTransformations  ,
"Amount of complex patterns transformed"   
)

Variable Documentation

◆ ComplexDeinterleavingEnabled

cl::opt< bool > ComplexDeinterleavingEnabled("enable-complex-deinterleaving", cl::desc("Enable generation of complex instructions"), cl::init(true), cl::Hidden) ( "enable-complex-deinterleaving"  ,
cl::desc("Enable generation of complex instructions")  ,
cl::init(true ,
cl::Hidden   
)
static

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 298 of file ComplexDeinterleavingPass.cpp.

◆ Deinterleaving

Complex Deinterleaving

Definition at line 299 of file ComplexDeinterleavingPass.cpp.

◆ false

Complex false

Definition at line 299 of file ComplexDeinterleavingPass.cpp.