|
LLVM 24.0.0git
|
Helper class that determines VL can use the same opcode. More...
#include "Transforms/Vectorize/SLPVectorizer/SLPCompatibilityAnalysis.h"
Public Member Functions | |
| BinOpSameOpcodeHelper (const Instruction *MainOp, const Instruction *AltOp=nullptr) | |
| bool | add (const Instruction *I) |
| unsigned | getMainOpcode () const |
| bool | hasDefinedMainOpcode () const |
| bool | hasCandidateOpcode (unsigned Opcode) const |
Checks if the list of potential opcodes includes Opcode. | |
| bool | hasAltOp () const |
| unsigned | getAltOpcode () const |
| bool | hasDefinedAltOpcode () const |
| SmallVector< Value * > | getOperand (const Instruction *I) const |
Helper class that determines VL can use the same opcode.
Alternate instruction is supported. In addition, it supports interchangeable instruction. An interchangeable instruction is an instruction that can be converted to another instruction with same semantics. For example, x << 1 is equal to x * 2. x * 1 is equal to x | 0.
Definition at line 52 of file SLPCompatibilityAnalysis.h.
|
inline |
Definition at line 113 of file SLPCompatibilityAnalysis.h.
| bool llvm::slpvectorizer::BinOpSameOpcodeHelper::add | ( | const Instruction * | I | ) |
Definition at line 236 of file SLPCompatibilityAnalysis.cpp.
References assert(), C(), llvm::dyn_cast_if_present(), llvm::APInt::getBitWidth(), I, llvm::isa(), llvm::APInt::isAllOnes(), llvm::APInt::isOne(), llvm::APInt::isPowerOf2(), llvm::APInt::isZero(), and llvm::APInt::ult().
Referenced by llvm::slpvectorizer::InstructionsState::getMatchingMainOpOrAltOp(), and llvm::slpvectorizer::getSameOpcode().
|
inline |
Definition at line 124 of file SLPCompatibilityAnalysis.h.
References getMainOpcode(), and hasAltOp().
Referenced by llvm::slpvectorizer::getSameOpcode(), llvm::slpvectorizer::InstructionsState::isAddSubLikeOp(), and llvm::slpvectorizer::InstructionsState::isMulDivLikeOp().
|
inline |
Definition at line 117 of file SLPCompatibilityAnalysis.h.
Referenced by getAltOpcode(), and llvm::slpvectorizer::getSameOpcode().
|
inline |
Definition at line 130 of file SLPCompatibilityAnalysis.h.
References I.
|
inline |
Definition at line 123 of file SLPCompatibilityAnalysis.h.
Referenced by getAltOpcode(), and hasDefinedAltOpcode().
Checks if the list of potential opcodes includes Opcode.
Definition at line 120 of file SLPCompatibilityAnalysis.h.
Referenced by llvm::slpvectorizer::InstructionsState::getMatchingMainOpOrAltOp().
|
inline |
Definition at line 127 of file SLPCompatibilityAnalysis.h.
References hasAltOp().
Referenced by llvm::slpvectorizer::getSameOpcode().
|
inline |
Definition at line 118 of file SLPCompatibilityAnalysis.h.
Referenced by llvm::slpvectorizer::getSameOpcode().