Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Public Member Functions | Static Public Attributes | Static Private Member Functions | List of all members
InstructionSimplifyPass Class Reference
Inheritance diagram for InstructionSimplifyPass:
Inheritance graph
[legend]
Collaboration diagram for InstructionSimplifyPass:
Collaboration graph
[legend]

Public Member Functions

 InstructionSimplifyPass ()
 
llvm::StringRef getPassName () const
 
bool runOnBasicBlock (llvm::BasicBlock &BB)
 
bool runOnFunction (llvm::Function &F)
 

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.

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

Constructor & Destructor Documentation

◆ InstructionSimplifyPass()

InstructionSimplifyPass::InstructionSimplifyPass ( )
inline

Definition at line 974 of file opt.cpp.

Member Function Documentation

◆ getPassName()

llvm::StringRef InstructionSimplifyPass::getPassName ( ) const
inline

Definition at line 976 of file opt.cpp.

◆ runOnBasicBlock()

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

Definition at line 1080 of file opt.cpp.

References DEBUG_END_PASS, and DEBUG_START_PASS.

◆ runOnFunction()

bool InstructionSimplifyPass::runOnFunction ( llvm::Function &  F)

Definition at line 1104 of file opt.cpp.

◆ simplifyBoolVec()

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

Definition at line 990 of file opt.cpp.

References LLVMTypes::Int1VectorType.

◆ simplifyCall()

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

Definition at line 1064 of file opt.cpp.

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

◆ simplifySelect()

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

Definition at line 1028 of file opt.cpp.

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

Member Data Documentation

◆ ID

char InstructionSimplifyPass::ID = 0
static

Definition at line 980 of file opt.cpp.


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