Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Classes | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
IntrinsicsOpt Class Reference
Inheritance diagram for IntrinsicsOpt:
Inheritance graph
[legend]
Collaboration diagram for IntrinsicsOpt:
Collaboration graph
[legend]

Classes

struct  BlendInstruction
 
struct  MaskInstruction
 

Public Member Functions

 IntrinsicsOpt ()
 
llvm::StringRef getPassName () const
 
bool runOnBasicBlock (llvm::BasicBlock &BB)
 
bool runOnFunction (llvm::Function &F)
 

Static Public Attributes

static char ID = 0
 

Private Member Functions

bool matchesMaskInstruction (llvm::Function *function)
 
BlendInstructionmatchingBlendInstruction (llvm::Function *function)
 

Private Attributes

std::vector< MaskInstructionmaskInstructions
 
std::vector< BlendInstructionblendInstructions
 

Detailed Description

This is a relatively simple optimization pass that does a few small optimizations that LLVM's x86 optimizer doesn't currently handle. (Specifically, MOVMSK of a constant can be replaced with the corresponding constant value, BLENDVPS and AVX masked load/store with either an 'all on' or 'all off' masks can be replaced with simpler operations.

Todo:
The better thing to do would be to submit a patch to LLVM to get these; they're presumably pretty simple patterns to match.

Definition at line 676 of file opt.cpp.

Constructor & Destructor Documentation

◆ IntrinsicsOpt()

IntrinsicsOpt::IntrinsicsOpt ( )
inline

Definition at line 678 of file opt.cpp.

Member Function Documentation

◆ getPassName()

llvm::StringRef IntrinsicsOpt::getPassName ( ) const
inline

Definition at line 680 of file opt.cpp.

◆ matchesMaskInstruction()

bool IntrinsicsOpt::matchesMaskInstruction ( llvm::Function *  function)
private

Definition at line 943 of file opt.cpp.

◆ matchingBlendInstruction()

IntrinsicsOpt::BlendInstruction * IntrinsicsOpt::matchingBlendInstruction ( llvm::Function *  function)
private

Definition at line 952 of file opt.cpp.

◆ runOnBasicBlock()

bool IntrinsicsOpt::runOnBasicBlock ( llvm::BasicBlock &  BB)

◆ runOnFunction()

bool IntrinsicsOpt::runOnFunction ( llvm::Function &  F)

Definition at line 934 of file opt.cpp.

Member Data Documentation

◆ blendInstructions

std::vector<BlendInstruction> IntrinsicsOpt::blendInstructions
private

Definition at line 715 of file opt.cpp.

◆ ID

char IntrinsicsOpt::ID = 0
static

Definition at line 686 of file opt.cpp.

◆ maskInstructions

std::vector<MaskInstruction> IntrinsicsOpt::maskInstructions
private

Definition at line 693 of file opt.cpp.


The documentation for this class was generated from the following file: