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

Constructor & Destructor Documentation

InstructionSimplifyPass::InstructionSimplifyPass ( )

Definition at line 1257 of file opt.cpp.

Member Function Documentation

const char* InstructionSimplifyPass::getPassName ( ) const

Definition at line 1260 of file opt.cpp.

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

Definition at line 1380 of file opt.cpp.

References DEBUG_END_PASS, DEBUG_START_PASS, simplifyCall(), and simplifySelect().

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

Definition at line 1277 of file opt.cpp.

References LLVMTypes::Int1VectorType.

Referenced by simplifySelect().

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

Definition at line 1360 of file opt.cpp.

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

Referenced by runOnBasicBlock().

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

Definition at line 1319 of file opt.cpp.

References ALL_OFF, ALL_ON, lGetMaskStatus(), and simplifyBoolVec().

Referenced by runOnBasicBlock().

Member Data Documentation

char InstructionSimplifyPass::ID = 0

Definition at line 1263 of file opt.cpp.

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