class AllocaSliceRewriter

Declaration

class AllocaSliceRewriter : public InstVisitor { /* full declaration omitted */ };

Description

Visitor to rewrite instructions using p particular slice of an alloca to use a new alloca. Also implements the rewriting to vector-based accesses when the partition passes the isVectorPromotionViable predicate. Most of the rewriting logic lives here.

Declared at: llvm/lib/Transforms/Scalar/SROA.cpp:2260

Inherits from: InstVisitor

Method Overview

  • public AllocaSliceRewriter(const llvm::DataLayout & DL, llvm::sroa::AllocaSlices & AS, llvm::SROA & Pass, llvm::AllocaInst & OldAI, llvm::AllocaInst & NewAI, uint64_t NewAllocaBeginOffset, uint64_t NewAllocaEndOffset, bool IsIntegerPromotable, llvm::VectorType * PromotableVecTy, SmallSetVector<llvm::PHINode *, 8> & PHIUsers, SmallSetVector<llvm::SelectInst *, 8> & SelectUsers)
  • public bool visit(AllocaSlices::const_iterator I)

Methods

AllocaSliceRewriter(
    const llvm::DataLayout& DL,
    llvm::sroa::AllocaSlices& AS,
    llvm::SROA& Pass,
    llvm::AllocaInst& OldAI,
    llvm::AllocaInst& NewAI,
    uint64_t NewAllocaBeginOffset,
    uint64_t NewAllocaEndOffset,
    bool IsIntegerPromotable,
    llvm::VectorType* PromotableVecTy,
    SmallSetVector<llvm::PHINode*, 8>& PHIUsers,
    SmallSetVector<llvm::SelectInst*, 8>&
        SelectUsers)

Declared at: llvm/lib/Transforms/Scalar/SROA.cpp:2317

Parameters

const llvm::DataLayout& DL
llvm::sroa::AllocaSlices& AS
llvm::SROA& Pass
llvm::AllocaInst& OldAI
llvm::AllocaInst& NewAI
uint64_t NewAllocaBeginOffset
uint64_t NewAllocaEndOffset
bool IsIntegerPromotable
llvm::VectorType* PromotableVecTy
SmallSetVector<llvm::PHINode*, 8>& PHIUsers
SmallSetVector<llvm::SelectInst*, 8>& SelectUsers

bool visit(AllocaSlices::const_iterator I)

Declared at: llvm/lib/Transforms/Scalar/SROA.cpp:2346

Parameters

AllocaSlices::const_iterator I