Intel SPMD Program Compiler  1.9.1
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 942 of file opt.cpp.

Constructor & Destructor Documentation

IntrinsicsOpt::IntrinsicsOpt ( )
inline

Definition at line 944 of file opt.cpp.

Member Function Documentation

const char* IntrinsicsOpt::getPassName ( ) const
inline

Definition at line 946 of file opt.cpp.

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

Definition at line 1217 of file opt.cpp.

References maskInstructions.

Referenced by runOnBasicBlock().

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

Definition at line 1229 of file opt.cpp.

References blendInstructions.

Referenced by runOnBasicBlock().

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

Member Data Documentation

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

Definition at line 978 of file opt.cpp.

Referenced by matchingBlendInstruction(), and runOnBasicBlock().

char IntrinsicsOpt::ID = 0
static

Definition at line 949 of file opt.cpp.

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

Definition at line 956 of file opt.cpp.

Referenced by matchesMaskInstruction(), and runOnBasicBlock().


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