Intel SPMD Program Compiler  1.10.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
Collaboration diagram for IntrinsicsOpt:
Collaboration graph


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.

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

Constructor & Destructor Documentation

IntrinsicsOpt::IntrinsicsOpt ( )

Definition at line 957 of file opt.cpp.

Member Function Documentation

const char* IntrinsicsOpt::getPassName ( ) const

Definition at line 960 of file opt.cpp.

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

Definition at line 1234 of file opt.cpp.

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

Definition at line 1246 of file opt.cpp.

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

Member Data Documentation

std::vector<BlendInstruction> IntrinsicsOpt::blendInstructions

Definition at line 995 of file opt.cpp.

char IntrinsicsOpt::ID = 0

Definition at line 966 of file opt.cpp.

std::vector<MaskInstruction> IntrinsicsOpt::maskInstructions

Definition at line 973 of file opt.cpp.

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