LLVM 23.0.0git
VPlanUnroll.cpp File Reference

This file implements explicit unrolling for VPlans. More...

#include "VPRecipeBuilder.h"
#include "VPlan.h"
#include "VPlanAnalysis.h"
#include "VPlanCFG.h"
#include "VPlanHelpers.h"
#include "VPlanPatternMatch.h"
#include "VPlanTransforms.h"
#include "VPlanUtils.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Analysis/IVDescriptors.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Intrinsics.h"

Go to the source code of this file.

Functions

static void addStartIndexForScalarSteps (VPScalarIVStepsRecipe *Steps, unsigned Part, VPlan &Plan, VPTypeAnalysis &TypeInfo)
static void addLaneToStartIndex (VPScalarIVStepsRecipe *Steps, unsigned Lane, VPlan &Plan, VPRecipeBase *InsertPt)
 Add a lane offset to the start index of Steps.
static VPValuecloneForLane (VPlan &Plan, VPBuilder &Builder, Type *IdxTy, VPSingleDefRecipe *DefR, VPLane Lane, const DenseMap< VPValue *, SmallVector< VPValue * > > &Def2LaneDefs)
 Create a single-scalar clone of DefR (must be a VPReplicateRecipe, VPInstruction or VPScalarIVStepsRecipe) for lane Lane.
static void convertRecipesInRegionBlocksToSingleScalar (VPlan &Plan, Type *IdxTy, VPBlockBase *Entry, ElementCount VF)
 Convert recipes in region blocks to operate on a single lane 0.
static void processLaneForReplicateRegion (VPlan &Plan, Type *IdxTy, unsigned Lane, VPBasicBlock *OldEntry, VPBasicBlock *NewEntry)
 Update recipes in the cloned blocks rooted at NewEntry to match Lane, using the original blocks rooted at OldEntry as reference.
static void dissolveReplicateRegion (VPRegionBlock *Region, ElementCount VF, VPlan &Plan, Type *IdxTy)
 Dissolve a single replicate region by replicating its blocks for each lane of VF.
static void replicateReplicateRegionsByVF (VPlan &Plan, ElementCount VF, Type *IdxTy)
 Collect and dissolve all replicate regions in the vector loop, replicating their blocks and recipes for each lane of VF.

Detailed Description

This file implements explicit unrolling for VPlans.

Definition in file VPlanUnroll.cpp.

Function Documentation

◆ addLaneToStartIndex()

◆ addStartIndexForScalarSteps()

◆ cloneForLane()

◆ convertRecipesInRegionBlocksToSingleScalar()

void convertRecipesInRegionBlocksToSingleScalar ( VPlan & Plan,
Type * IdxTy,
VPBlockBase * Entry,
ElementCount VF )
static

◆ dissolveReplicateRegion()

void dissolveReplicateRegion ( VPRegionBlock * Region,
ElementCount VF,
VPlan & Plan,
Type * IdxTy )
static

◆ processLaneForReplicateRegion()

void processLaneForReplicateRegion ( VPlan & Plan,
Type * IdxTy,
unsigned Lane,
VPBasicBlock * OldEntry,
VPBasicBlock * NewEntry )
static

◆ replicateReplicateRegionsByVF()