Intel SPMD Program Compiler  1.10.0
Public Member Functions | Static Public Attributes | Static Private Member Functions | List of all members
InstructionSimplifyPass Class Reference
Inheritance diagram for InstructionSimplifyPass:
Inheritance graph
Collaboration diagram for InstructionSimplifyPass:
Collaboration graph

Public Member Functions

 InstructionSimplifyPass ()
const char * getPassName () const
bool runOnBasicBlock (llvm::BasicBlock &BB)

Static Public Attributes

static char ID = 0

Static Private Member Functions

static bool simplifySelect (llvm::SelectInst *selectInst, llvm::BasicBlock::iterator iter)
static llvm::Value * simplifyBoolVec (llvm::Value *value)
static bool simplifyCall (llvm::CallInst *callInst, llvm::BasicBlock::iterator iter)

Detailed Description

This simple optimization pass looks for a vector select instruction with an all-on or all-off constant mask, simplifying it to the appropriate operand if so.

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

Constructor & Destructor Documentation

InstructionSimplifyPass::InstructionSimplifyPass ( )

Definition at line 1274 of file opt.cpp.

Member Function Documentation

const char* InstructionSimplifyPass::getPassName ( ) const

Definition at line 1278 of file opt.cpp.

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

Definition at line 1401 of file opt.cpp.


llvm::Value * InstructionSimplifyPass::simplifyBoolVec ( llvm::Value *  value)

Definition at line 1298 of file opt.cpp.

References LLVMTypes::Int1VectorType.

bool InstructionSimplifyPass::simplifyCall ( llvm::CallInst *  callInst,
llvm::BasicBlock::iterator  iter 

Definition at line 1381 of file opt.cpp.

References lGetMask(), LLVMInt64(), m, and Module::module.

bool InstructionSimplifyPass::simplifySelect ( llvm::SelectInst *  selectInst,
llvm::BasicBlock::iterator  iter 

Definition at line 1340 of file opt.cpp.

References ALL_OFF, ALL_ON, and lGetMaskStatus().

Member Data Documentation

char InstructionSimplifyPass::ID = 0

Definition at line 1284 of file opt.cpp.

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