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

Constructor & Destructor Documentation

◆ InstructionSimplifyPass()

InstructionSimplifyPass::InstructionSimplifyPass ( )

Definition at line 1204 of file opt.cpp.

Member Function Documentation

◆ getPassName()

const char* InstructionSimplifyPass::getPassName ( ) const

Definition at line 1207 of file opt.cpp.

◆ runOnBasicBlock()

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

Definition at line 1312 of file opt.cpp.


◆ simplifyBoolVec()

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

Definition at line 1223 of file opt.cpp.

References LLVMTypes::Int1VectorType.

◆ simplifyCall()

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

Definition at line 1296 of file opt.cpp.

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

◆ simplifySelect()

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

Definition at line 1261 of file opt.cpp.

References ALL_OFF, ALL_ON, and lGetMaskStatus().

Member Data Documentation

◆ ID

char InstructionSimplifyPass::ID = 0

Definition at line 1213 of file opt.cpp.

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