LLVM 20.0.0git
Macros | Functions | Variables
ScalarizeMaskedMemIntrin.cpp File Reference
#include "llvm/Transforms/Scalar/ScalarizeMaskedMemIntrin.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <cassert>
#include <optional>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "scalarize-masked-mem-intrin"
 

Functions

static bool optimizeBlock (BasicBlock &BB, bool &ModifiedDT, const TargetTransformInfo &TTI, const DataLayout &DL, bool HasBranchDivergence, DomTreeUpdater *DTU)
 
static bool optimizeCallInst (CallInst *CI, bool &ModifiedDT, const TargetTransformInfo &TTI, const DataLayout &DL, bool HasBranchDivergence, DomTreeUpdater *DTU)
 
 INITIALIZE_PASS_BEGIN (ScalarizeMaskedMemIntrinLegacyPass, DEBUG_TYPE, "Scalarize unsupported masked memory intrinsics", false, false) INITIALIZE_PASS_END(ScalarizeMaskedMemIntrinLegacyPass
 
static bool isConstantIntVector (Value *Mask)
 
static unsigned adjustForEndian (const DataLayout &DL, unsigned VectorWidth, unsigned Idx)
 
static void scalarizeMaskedLoad (const DataLayout &DL, bool HasBranchDivergence, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static void scalarizeMaskedStore (const DataLayout &DL, bool HasBranchDivergence, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static void scalarizeMaskedGather (const DataLayout &DL, bool HasBranchDivergence, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static void scalarizeMaskedScatter (const DataLayout &DL, bool HasBranchDivergence, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static void scalarizeMaskedExpandLoad (const DataLayout &DL, bool HasBranchDivergence, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static void scalarizeMaskedCompressStore (const DataLayout &DL, bool HasBranchDivergence, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static void scalarizeMaskedVectorHistogram (const DataLayout &DL, CallInst *CI, DomTreeUpdater *DTU, bool &ModifiedDT)
 
static bool runImpl (Function &F, const TargetTransformInfo &TTI, DominatorTree *DT)
 

Variables

 DEBUG_TYPE
 
Scalarize unsupported masked memory intrinsics
 
Scalarize unsupported masked memory false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "scalarize-masked-mem-intrin"

Definition at line 43 of file ScalarizeMaskedMemIntrin.cpp.

Function Documentation

◆ adjustForEndian()

static unsigned adjustForEndian ( const DataLayout DL,
unsigned  VectorWidth,
unsigned  Idx 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( ScalarizeMaskedMemIntrinLegacyPass  ,
DEBUG_TYPE  ,
"Scalarize unsupported masked memory intrinsics"  ,
false  ,
false   
)

◆ isConstantIntVector()

static bool isConstantIntVector ( Value Mask)
static

◆ optimizeBlock()

static bool optimizeBlock ( BasicBlock BB,
bool ModifiedDT,
const TargetTransformInfo TTI,
const DataLayout DL,
bool  HasBranchDivergence,
DomTreeUpdater DTU 
)
static

◆ optimizeCallInst()

static bool optimizeCallInst ( CallInst CI,
bool ModifiedDT,
const TargetTransformInfo TTI,
const DataLayout DL,
bool  HasBranchDivergence,
DomTreeUpdater DTU 
)
static

◆ runImpl()

static bool runImpl ( Function F,
const TargetTransformInfo TTI,
DominatorTree DT 
)
static

◆ scalarizeMaskedCompressStore()

static void scalarizeMaskedCompressStore ( const DataLayout DL,
bool  HasBranchDivergence,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

◆ scalarizeMaskedExpandLoad()

static void scalarizeMaskedExpandLoad ( const DataLayout DL,
bool  HasBranchDivergence,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

◆ scalarizeMaskedGather()

static void scalarizeMaskedGather ( const DataLayout DL,
bool  HasBranchDivergence,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

◆ scalarizeMaskedLoad()

static void scalarizeMaskedLoad ( const DataLayout DL,
bool  HasBranchDivergence,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

◆ scalarizeMaskedScatter()

static void scalarizeMaskedScatter ( const DataLayout DL,
bool  HasBranchDivergence,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

◆ scalarizeMaskedStore()

static void scalarizeMaskedStore ( const DataLayout DL,
bool  HasBranchDivergence,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

◆ scalarizeMaskedVectorHistogram()

static void scalarizeMaskedVectorHistogram ( const DataLayout DL,
CallInst CI,
DomTreeUpdater DTU,
bool ModifiedDT 
)
static

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 85 of file ScalarizeMaskedMemIntrin.cpp.

◆ false

Scalarize unsupported masked memory false

Definition at line 86 of file ScalarizeMaskedMemIntrin.cpp.

◆ intrinsics

Scalarize unsupported masked memory intrinsics

Definition at line 86 of file ScalarizeMaskedMemIntrin.cpp.