|
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 47 of file SLPCompatibilityAnalysis.h.
|
inline |
Definition at line 108 of file SLPCompatibilityAnalysis.h.
| bool llvm::slpvectorizer::BinOpSameOpcodeHelper::add | ( | const Instruction * | I | ) |
Definition at line 227 of file SLPCompatibilityAnalysis.cpp.
References assert(), C(), llvm::dyn_cast_or_null(), 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 getSameOpcode().
|
inline |
Definition at line 119 of file SLPCompatibilityAnalysis.h.
References getMainOpcode(), and hasAltOp().
Referenced by getSameOpcode(), llvm::slpvectorizer::InstructionsState::isAddSubLikeOp(), and llvm::slpvectorizer::InstructionsState::isMulDivLikeOp().
|
inline |
Definition at line 112 of file SLPCompatibilityAnalysis.h.
Referenced by getAltOpcode(), and getSameOpcode().
|
inline |
Definition at line 125 of file SLPCompatibilityAnalysis.h.
References I.
|
inline |
Definition at line 118 of file SLPCompatibilityAnalysis.h.
Referenced by getAltOpcode(), and hasDefinedAltOpcode().
Checks if the list of potential opcodes includes Opcode.
Definition at line 115 of file SLPCompatibilityAnalysis.h.
Referenced by llvm::slpvectorizer::InstructionsState::getMatchingMainOpOrAltOp().
|
inline |
Definition at line 122 of file SLPCompatibilityAnalysis.h.
References hasAltOp().
Referenced by getSameOpcode().
|
inline |
Definition at line 113 of file SLPCompatibilityAnalysis.h.
Referenced by getSameOpcode().