|
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 46 of file SLPCompatibilityAnalysis.h.
|
inline |
Definition at line 107 of file SLPCompatibilityAnalysis.h.
| bool llvm::slpvectorizer::BinOpSameOpcodeHelper::add | ( | const Instruction * | I | ) |
Definition at line 221 of file SLPCompatibilityAnalysis.cpp.
References assert(), llvm::CallingConv::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 getSameOpcode().
|
inline |
Definition at line 118 of file SLPCompatibilityAnalysis.h.
References getMainOpcode(), and hasAltOp().
Referenced by getSameOpcode().
|
inline |
Definition at line 111 of file SLPCompatibilityAnalysis.h.
Referenced by getAltOpcode(), and getSameOpcode().
|
inline |
Definition at line 124 of file SLPCompatibilityAnalysis.h.
References I.
|
inline |
Definition at line 117 of file SLPCompatibilityAnalysis.h.
Referenced by getAltOpcode(), and hasDefinedAltOpcode().
Checks if the list of potential opcodes includes Opcode.
Definition at line 114 of file SLPCompatibilityAnalysis.h.
|
inline |
Definition at line 121 of file SLPCompatibilityAnalysis.h.
References hasAltOp().
Referenced by getSameOpcode().
|
inline |
Definition at line 112 of file SLPCompatibilityAnalysis.h.
Referenced by getSameOpcode().