LLVM 20.0.0git
|
#include "VPlan.h"
#include "VPlanValue.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <optional>
#include <utility>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "vplan-slp" |
Functions | |
static SmallVector< VPValue *, 4 > | getOperands (ArrayRef< VPValue * > Values, unsigned OperandIndex) |
static bool | areCommutative (ArrayRef< VPValue * > Values) |
static SmallVector< SmallVector< VPValue *, 4 >, 4 > | getOperands (ArrayRef< VPValue * > Values) |
static std::optional< unsigned > | getOpcode (ArrayRef< VPValue * > Values) |
Returns the opcode of Values or ~0 if they do not all agree. | |
static bool | areConsecutiveOrMatch (VPInstruction *A, VPInstruction *B, VPInterleavedAccessInfo &IAI) |
Returns true if A and B access sequential memory if they are loads or stores or if they have identical opcodes otherwise. | |
static unsigned | getLAScore (VPValue *V1, VPValue *V2, unsigned MaxLevel, VPInterleavedAccessInfo &IAI) |
Implements getLAScore from Listing 7 in the paper. | |
Variables | |
static unsigned | LookaheadMaxDepth = 5 |
#define DEBUG_TYPE "vplan-slp" |
Definition at line 37 of file VPlanSLP.cpp.
Definition at line 165 of file VPlanSLP.cpp.
References getOpcode(), and llvm::Instruction::isCommutative().
Referenced by llvm::VPlanSlp::buildGraph().
|
static |
Returns true if A and B access sequential memory if they are loads or stores or if they have identical opcodes otherwise.
Definition at line 202 of file VPlanSLP.cpp.
References A, B, and llvm::VPInterleavedAccessInfo::getInterleaveGroup().
Referenced by getLAScore().
|
static |
Implements getLAScore from Listing 7 in the paper.
Traverses and compares operands of V1 and V2 to MaxLevel.
Definition at line 218 of file VPlanSLP.cpp.
References areConsecutiveOrMatch(), getLAScore(), and I.
Referenced by getLAScore().
Returns the opcode of Values or ~0 if they do not all agree.
Definition at line 191 of file VPlanSLP.cpp.
References llvm::any_of().
Referenced by llvm::R600InstrInfo::analyzeBranch(), areCommutative(), areCompatibleCmpOps(), arePointersCompatible(), llvm::CanonicalLoopInfo::assertOK(), llvm::VPlanSlp::buildGraph(), buildNew(), llvm::slpvectorizer::BoUpSLP::computeMinimumValueSizes(), llvm::ConstantFoldBinaryInstruction(), FoldBUILD_VECTOR(), llvm::SelectionDAG::FoldConstantArithmetic(), llvm::InstCombinerImpl::freelyInvertAllUsersOf(), getAltInstrMask(), llvm::Instruction::getOpcodeName(), llvm::sandboxir::Context::getOrCreateValueInternal(), llvm::Instruction::isArithmeticShift(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isBitwiseLogicOp(), llvm::Instruction::isCast(), llvm::Instruction::isEHPad(), llvm::Instruction::isFenceLike(), llvm::Instruction::isFPDivRem(), llvm::Instruction::isFuncletPad(), llvm::Instruction::isIdempotent(), llvm::Instruction::isIntDivRem(), llvm::Instruction::isLogicalShift(), llvm::Instruction::isNilpotent(), llvm::Instruction::isShift(), isSignedMinMaxClamp(), isSignExtendedW(), llvm::Instruction::isSpecialTerminator(), llvm::Instruction::isTerminator(), llvm::Instruction::isUnaryOp(), LinearizeExprTree(), LLVMGetConstOpcode(), lowerV8I16Shuffle(), llvm::VPRecipeBase::mayWriteToMemory(), ReorganizeVector(), scalarize(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitShl().
|
static |
Definition at line 171 of file VPlanSLP.cpp.
References getOperands(), I, and llvm_unreachable.
|
static |
Definition at line 154 of file VPlanSLP.cpp.
References Operands.
Referenced by llvm::VPlanSlp::buildGraph(), getInvertibleOperands(), and getOperands().
|
static |
Definition at line 40 of file VPlanSLP.cpp.