LLVM  12.0.0git
Macros | Functions | Variables
VPlanSLP.cpp File Reference
#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>
Include dependency graph for VPlanSLP.cpp:

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< unsignedgetOpcode (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
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "vplan-slp"

Definition at line 45 of file VPlanSLP.cpp.

Function Documentation

◆ areCommutative()

static bool areCommutative ( ArrayRef< VPValue * >  Values)
static

Definition at line 171 of file VPlanSLP.cpp.

References getOpcode(), and llvm::Instruction::isCommutative().

Referenced by llvm::VPlanSlp::buildGraph().

◆ areConsecutiveOrMatch()

static bool areConsecutiveOrMatch ( VPInstruction A,
VPInstruction B,
VPInterleavedAccessInfo IAI 
)
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 B, llvm::VPInterleavedAccessInfo::getInterleaveGroup(), llvm::SPII::Load, and llvm::SPII::Store.

Referenced by getLAScore().

◆ getLAScore()

static unsigned getLAScore ( VPValue V1,
VPValue V2,
unsigned  MaxLevel,
VPInterleavedAccessInfo IAI 
)
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(), I, and llvm::NVPTX::PTXLdStInstCode::V2.

◆ getOpcode()

static Optional<unsigned> getOpcode ( ArrayRef< VPValue * >  Values)
static

◆ getOperands() [1/2]

static SmallVector<VPValue *, 4> getOperands ( ArrayRef< VPValue * >  Values,
unsigned  OperandIndex 
)
static

Definition at line 160 of file VPlanSLP.cpp.

References Operands.

Referenced by llvm::VPlanSlp::buildGraph(), and getOperands().

◆ getOperands() [2/2]

static SmallVector<SmallVector<VPValue *, 4>, 4> getOperands ( ArrayRef< VPValue * >  Values)
static

Definition at line 177 of file VPlanSLP.cpp.

References getOperands(), I, llvm_unreachable, llvm::SPII::Load, and llvm::SPII::Store.

Variable Documentation

◆ LookaheadMaxDepth

unsigned LookaheadMaxDepth = 5
static

Definition at line 48 of file VPlanSLP.cpp.