Intel SPMD Program Compiler  1.9.2
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 ()
 
const char * getPassName () const
 
bool runOnBasicBlock (llvm::BasicBlock &BB)
 

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 951 of file opt.cpp.

Constructor & Destructor Documentation

IntrinsicsOpt::IntrinsicsOpt ( )
inline

Definition at line 953 of file opt.cpp.

Member Function Documentation

const char* IntrinsicsOpt::getPassName ( ) const
inline

Definition at line 956 of file opt.cpp.

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

Definition at line 1230 of file opt.cpp.

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

Definition at line 1242 of file opt.cpp.

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

Member Data Documentation

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

Definition at line 991 of file opt.cpp.

char IntrinsicsOpt::ID = 0
static

Definition at line 962 of file opt.cpp.

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

Definition at line 969 of file opt.cpp.


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