LLVM
8.0.1
|
#include "VPlan.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/VectorUtils.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/InstrTypes.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/GraphWriter.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include <cassert>
#include <iterator>
#include <string>
#include <vector>
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 Optional< unsigned > | getOpcode (ArrayRef< VPValue *> Values) |
Returns the opcode of Values or ~0 if they do not all agree. More... | |
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. More... | |
static unsigned | getLAScore (VPValue *V1, VPValue *V2, unsigned MaxLevel, VPInterleavedAccessInfo &IAI) |
Implements getLAScore from Listing 7 in the paper. More... | |
Variables | |
static unsigned | LookaheadMaxDepth = 5 |
#define DEBUG_TYPE "vplan-slp" |
Definition at line 46 of file VPlanSLP.cpp.
Definition at line 171 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 208 of file VPlanSLP.cpp.
References llvm::VPInterleavedAccessInfo::getInterleaveGroup(), llvm::VPInstruction::getOpcode(), llvm::SPII::Load, and llvm::SPII::Store.
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 224 of file VPlanSLP.cpp.
References areConsecutiveOrMatch(), assert(), llvm::dbgs(), llvm::Depth, E, llvm::SmallVectorBase::empty(), llvm::Failed(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), LLVM_DEBUG, llvm::SPII::Load, LookaheadMaxDepth, Mode, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorImpl< T >::reserve(), second, and llvm::SmallVectorBase::size().
Returns the opcode of Values or ~0 if they do not all agree.
Definition at line 197 of file VPlanSLP.cpp.
References llvm::any_of(), and llvm::None.
Referenced by llvm::R600InstrInfo::analyzeBranch(), areCommutative(), llvm::VPlanSlp::buildGraph(), buildMultiplyTree(), buildNew(), buildVector(), llvm::slpvectorizer::BoUpSLP::canMapToVector(), canNarrowShiftAmt(), canonicalizeSaturatedSubtract(), llvm::UnOpInit::clone(), llvm::BinOpInit::clone(), llvm::TernOpInit::clone(), llvm::ObjectSizeOffsetEvaluator::compute(), llvm::ConstantFoldBinaryInstruction(), createRdxShuffleMask(), detectAVGPattern(), llvm::MCInst::dump_pretty(), llvm::VPRecipeBase::eraseFromParent(), llvm::Instruction::extractProfMetadata(), llvm::Instruction::extractProfTotalWeight(), llvm::R600InstrInfo::fitsReadPortLimitations(), llvm::UnOpInit::Fold(), llvm::BinOpInit::Fold(), llvm::TernOpInit::Fold(), FoldBUILD_VECTOR(), foldVecTruncToExtElt(), generateSignBits(), llvm::ConstantExpr::getAsInstruction(), llvm::UnOpInit::getAsString(), llvm::BinOpInit::getAsString(), llvm::TernOpInit::getAsString(), llvm::CallBase::getNumSubclassExtraOperands(), llvm::Instruction::getOpcodeName(), llvm::ConstantExpr::getOpcodeName(), getSameOpcode(), llvm::SDValue::getScalarValueSizeInBits(), llvm::SelectionDAG::getTargetMemSDNode(), llvm::ConstantExpr::getWithOperands(), llvm::ConstantExpr::hasIndices(), hasZeroSignBit(), INITIALIZE_PASS(), llvm::Instruction::isArithmeticShift(), llvm::Instruction::isBinaryOp(), llvm::Instruction::isBitwiseLogicOp(), llvm::Instruction::isCast(), llvm::ConstantExpr::isCast(), llvm::Instruction::isCommutative(), llvm::ConstantExpr::isCompare(), llvm::Instruction::isEHPad(), llvm::Instruction::isExceptionalTerminator(), llvm::Instruction::isFenceLike(), llvm::Instruction::isFuncletPad(), llvm::ConstantExpr::isGEPWithNoNotionalOverIndexing(), llvm::Instruction::isIdempotent(), llvm::Instruction::isIntDivRem(), llvm::Instruction::isLogicalShift(), llvm::Instruction::isNilpotent(), llvm::Instruction::isShift(), isShuffle(), isSignedMinMaxClamp(), llvm::PPCInstrInfo::isSignOrZeroExtended(), llvm::Instruction::isTerminator(), llvm::Instruction::isUnaryOp(), LinearizeExprTree(), LLVMGetConstOpcode(), matchRotate(), llvm::MCInst::print(), llvm::VPInstruction::print(), llvm::UnOpInit::Profile(), llvm::BinOpInit::Profile(), llvm::TernOpInit::Profile(), ReorganizeVector(), llvm::UnOpInit::resolveReferences(), llvm::BinOpInit::resolveReferences(), llvm::TernOpInit::resolveReferences(), shouldMergeGEPs(), shouldReorderOperands(), llvm::HexagonShuffler::shuffle(), SRAGlobal(), unswitchBestCondition(), unswitchNontrivialInvariants(), unswitchTrivialBranch(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitPHINode(), and llvm::InstCombiner::visitShl().
|
static |
Definition at line 161 of file VPlanSLP.cpp.
References llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by llvm::VPlanSlp::buildGraph(), and getOperands().
|
static |
Definition at line 177 of file VPlanSLP.cpp.
References getOperands(), I, llvm_unreachable, llvm::SPII::Load, llvm::SmallVectorTemplateBase< T >::push_back(), and llvm::SPII::Store.
|
static |
Definition at line 49 of file VPlanSLP.cpp.
Referenced by getLAScore().