LLVM: lib/Transforms/Vectorize/VPlanRecipes.cpp File Reference (original) (raw)
This file contains implementations for different VPlan recipes. More...
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 |
| Functions | |
|---|---|
| static BranchInst * | createCondBranch (Value *Cond, VPBasicBlock *VPBB, VPTransformState &State) |
| Create a conditional branch using Cond branching to the successors of VPBB. | |
| static InstructionCost | getCostForIntrinsics (Intrinsic::ID ID, ArrayRef< const VPValue * > Operands, const VPRecipeWithIRFlags &R, ElementCount VF, VPCostContext &Ctx) |
| Compute the cost for the intrinsic ID with Operands, produced by R. | |
| static Constant * | getSignedIntOrFpConstant (Type *Ty, int64_t C) |
| A helper function that returns an integer or floating-point constant with value C. | |
| static void | scalarizeInstruction (const Instruction *Instr, VPReplicateRecipe *RepRecipe, const VPLane &Lane, VPTransformState &State) |
| A helper function to scalarize a single Instruction in the innermost loop. | |
| static const SCEV * | getAddressAccessSCEV (const VPValue *Ptr, ScalarEvolution &SE, const Loop *L) |
| Returns a SCEV expression for Ptr if it is a pointer computation for which the legacy cost model computes a SCEV expression when computing the address cost. | |
| static bool | isUsedByLoadStoreAddress (const VPUser *V) |
| Returns true if V is used as part of the address of another load or store. | |
| static Instruction * | createReverseEVL (IRBuilderBase &Builder, Value *Operand, Value *EVL, const Twine &Name) |
| Use all-true mask for reverse rather than actual mask, as it avoids a dependence w/o affecting the result. | |
| static Value * | createBitOrPointerCast (IRBuilderBase &Builder, Value *V, VectorType *DstVTy, const DataLayout &DL) |
| static Value * | interleaveVectors (IRBuilderBase &Builder, ArrayRef< Value * > Vals, const Twine &Name) |
| Return a vector containing interleaved elements from multiple smaller input vectors. |
This file contains implementations for different VPlan recipes.
Definition in file VPlanRecipes.cpp.
◆ DEBUG_TYPE
◆ LV_NAME
#define LV_NAME "loop-vectorize"
◆ VectorParts
◆ createBitOrPointerCast()
◆ createCondBranch()
◆ createReverseEVL()
◆ getAddressAccessSCEV()
◆ getCostForIntrinsics()
Compute the cost for the intrinsic [ID](namespacellvm%5F1%5F1CallingConv.html#abdf8cf606905c10634e831390981b0ed "LLVM IR allows to use arbitrary numbers as calling convention identifiers.") with Operands, produced by R.
Definition at line 1738 of file VPlanRecipes.cpp.
References Arguments, llvm::dyn_cast_or_null(), llvm::enumerate(), llvm::InstructionCost::getInvalid(), llvm::ElementCount::isVector(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::toVectorizedTy(), and llvm::toVectorTy().
Referenced by llvm::VPReplicateRecipe::computeCost(), and llvm::VPWidenIntrinsicRecipe::computeCost().
◆ getSignedIntOrFpConstant()
| Constant * getSignedIntOrFpConstant ( Type * Ty, int64_t C ) | static |
|---|
◆ interleaveVectors()
◆ isUsedByLoadStoreAddress()
◆ scalarizeInstruction()
A helper function to scalarize a single Instruction in the innermost loop.
Generates a sequence of scalar instances for lane Lane. Uses the VPValue operands from RepRecipe instead of Instr's operands.
Definition at line 3018 of file VPlanRecipes.cpp.
References llvm::all_of(), llvm::VPIRFlags::applyFlags(), llvm::VPIRMetadata::applyMetadata(), assert(), llvm::canVectorizeTy(), llvm::cast(), DL, llvm::dyn_cast(), llvm::enumerate(), llvm::VPRecipeBase::getDebugLoc(), llvm::VPLane::getFirstLane(), llvm::VPRecipeBase::getParent(), llvm::VPBlockBase::getPlan(), llvm::VPIRFlags::getPredicate(), llvm::VPRecipeBase::getRegion(), llvm::Value::getType(), llvm::VPlan::getVectorLoopRegion(), llvm::VPIRFlags::hasPredicate(), I, II, llvm::vputils::isSingleScalar(), llvm::Value::mutateType(), llvm::VPUser::operands(), llvm::Value::setName(), and llvm::User::setOperand().
Referenced by llvm::VPReplicateRecipe::execute().