LLVM 18.0.0git
|
This file contains implementations for different VPlan recipes. More...
#include "VPlan.h"
#include "VPlanAnalysis.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/IVDescriptors.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/IRBuilder.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/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/ScalarEvolutionExpander.h"
#include <cassert>
Go to the source code of this file.
Namespaces | |
namespace | llvm |
This is an optimization pass for GlobalISel generic memory operations. | |
Macros | |
#define | LV_NAME "loop-vectorize" |
#define | DEBUG_TYPE LV_NAME |
Typedefs | |
using | VectorParts = SmallVector< Value *, 2 > |
Functions | |
static Value * | getStepVector (Value *Val, Value *StartIdx, Value *Step, Instruction::BinaryOps BinOp, ElementCount VF, IRBuilderBase &Builder) |
This function adds (StartIdx * Step, (StartIdx + 1) * Step, (StartIdx + 2) * Step, ...) to each vector element of Val. | |
static Constant * | getSignedIntOrFpConstant (Type *Ty, int64_t C) |
A helper function that returns an integer or floating-point constant with value C. | |
static Value * | getRuntimeVFAsFloat (IRBuilderBase &B, Type *FTy, ElementCount VF) |
This file contains implementations for different VPlan recipes.
Definition in file VPlanRecipes.cpp.
#define DEBUG_TYPE LV_NAME |
Definition at line 43 of file VPlanRecipes.cpp.
#define LV_NAME "loop-vectorize" |
Definition at line 42 of file VPlanRecipes.cpp.
using VectorParts = SmallVector<Value *, 2> |
Definition at line 36 of file VPlanRecipes.cpp.
|
static |
Definition at line 862 of file VPlanRecipes.cpp.
References assert(), B, llvm::IntegerType::get(), llvm::Type::getContext(), llvm::getRuntimeVF(), llvm::Type::getScalarSizeInBits(), and llvm::Type::isFloatingPointTy().
Referenced by llvm::VPWidenIntOrFpInductionRecipe::execute().
A helper function that returns an integer or floating-point constant with value C.
Definition at line 857 of file VPlanRecipes.cpp.
References llvm::CallingConv::C, llvm::ConstantFP::get(), llvm::ConstantInt::getSigned(), and llvm::Type::isIntegerTy().
Referenced by llvm::VPWidenIntOrFpInductionRecipe::execute(), and llvm::VPScalarIVStepsRecipe::execute().
|
static |
This function adds (StartIdx * Step, (StartIdx + 1) * Step, (StartIdx + 2) * Step, ...) to each vector element of Val.
The sequence starts at StartIndex. Opcode
is relevant for FP induction variable.
Definition at line 806 of file VPlanRecipes.cpp.
References assert(), llvm::IRBuilderBase::CreateAdd(), llvm::IRBuilderBase::CreateBinOp(), llvm::IRBuilderBase::CreateFAdd(), llvm::IRBuilderBase::CreateFMul(), llvm::IRBuilderBase::CreateMul(), llvm::IRBuilderBase::CreateStepVector(), llvm::IRBuilderBase::CreateUIToFP(), llvm::IRBuilderBase::CreateVectorSplat(), llvm::IntegerType::get(), llvm::VectorType::get(), llvm::Type::getContext(), llvm::Type::getScalarSizeInBits(), llvm::Type::getScalarType(), llvm::Value::getType(), llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::ElementCount::isVector().
Referenced by llvm::VPWidenIntOrFpInductionRecipe::execute().