class VPRegionBlock

Declaration

class VPRegionBlock : public VPBlockBase { /* full declaration omitted */ };

Description

VPRegionBlock represents a collection of VPBasicBlocks and VPRegionBlocks which form a Single-Entry-Single-Exiting subgraph of the output IR CFG. A VPRegionBlock may indicate that its contents are to be replicated several times. This is designed to support predicated scalarization, in which a scalar if-then code structure needs to be generated VF * UF times. Having this replication indicator helps to keep a single model for multiple candidate VF's. The actual replication takes place only once the desired VF and UF have been determined.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2143

Inherits from: VPBlockBase

Member Variables

private llvm::VPBlockBase* Entry
Hold the Single Entry of the SESE region modelled by the VPRegionBlock.
private llvm::VPBlockBase* Exiting
Hold the Single Exiting block of the SESE region modelled by the VPRegionBlock.
private bool IsReplicator
An indicator whether this region is to generate multiple replicated instances of output IR corresponding to its VPBlockBases.

Method Overview

  • public VPRegionBlock(llvm::VPBlockBase * Entry, llvm::VPBlockBase * Exiting, const std::string & Name = "", bool IsReplicator = false)
  • public VPRegionBlock(const std::string & Name = "", bool IsReplicator = false)
  • public static inline bool classof(const llvm::VPBlockBase * V)
  • public void dropAllReferences(llvm::VPValue * NewValue)
  • public void execute(struct VPTransformState * State)
  • public llvm::VPBlockBase & front() const
  • public const llvm::VPBlockBase * getEntry() const
  • public llvm::VPBlockBase * getEntry()
  • public const llvm::VPBlockBase * getExiting() const
  • public llvm::VPBlockBase * getExiting()
  • public llvm::VPBasicBlock * getPreheaderVPBB()
  • public bool isReplicator() const
  • public void print(llvm::raw_ostream & O, const llvm::Twine & Indent, llvm::VPSlotTracker & SlotTracker) const
  • public void setEntry(llvm::VPBlockBase * EntryBlock)
  • public void setExiting(llvm::VPBlockBase * ExitingBlock)
  • public ~VPRegionBlock()

Inherited from VPBlockBase:

Methods

VPRegionBlock(llvm::VPBlockBase* Entry,
              llvm::VPBlockBase* Exiting,
              const std::string& Name = "",
              bool IsReplicator = false)

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2156

Parameters

llvm::VPBlockBase* Entry
llvm::VPBlockBase* Exiting
const std::string& Name = ""
bool IsReplicator = false

VPRegionBlock(const std::string& Name = "",
              bool IsReplicator = false)

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2165

Parameters

const std::string& Name = ""
bool IsReplicator = false

static inline bool classof(
    const llvm::VPBlockBase* V)

Description

Method to support type inquiry through isa, cast, and dyn_cast.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2178

Parameters

const llvm::VPBlockBase* V

void dropAllReferences(llvm::VPValue* NewValue)

Description

Replace all operands of VPUsers in the block with \p NewValue and also replaces all uses of VPValues defined in the block with NewValue.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2226

Parameters

llvm::VPValue* NewValue

void execute(struct VPTransformState* State)

Description

The method which generates the output IR instructions that correspond to this VPRegionBlock, thereby "executing" the VPlan.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2224

Parameters

struct VPTransformState* State

llvm::VPBlockBase& front() const

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2198

const llvm::VPBlockBase* getEntry() const

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2182

llvm::VPBlockBase* getEntry()

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2183

const llvm::VPBlockBase* getExiting() const

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2200

llvm::VPBlockBase* getExiting()

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2201

llvm::VPBasicBlock* getPreheaderVPBB()

Description

Returns the pre-header VPBasicBlock of the loop region.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2213

bool isReplicator() const

Description

An indicator whether this region is to generate multiple replicated instances of output IR corresponding to its VPBlockBases.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2220

void print(llvm::raw_ostream& O,
           const llvm::Twine& Indent,
           llvm::VPSlotTracker& SlotTracker) const

Description

Print this VPRegionBlock to \p O (recursively), prefixing all lines with\p Indent. \p SlotTracker is used to print unnamed VPValue's using consequtive numbers. Note that the numbering is applied to the whole VPlan, so printing individual regions is consistent with the whole VPlan printing.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2235

Parameters

llvm::raw_ostream& O
const llvm::Twine& Indent
llvm::VPSlotTracker& SlotTracker

void setEntry(llvm::VPBlockBase* EntryBlock)

Description

Set \p EntryBlock as the entry VPBlockBase of this VPRegionBlock. \p EntryBlock must have no predecessors.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2187

Parameters

llvm::VPBlockBase* EntryBlock

void setExiting(llvm::VPBlockBase* ExitingBlock)

Description

Set \p ExitingBlock as the exiting VPBlockBase of this VPRegionBlock. \p ExitingBlock must have no successors.

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2205

Parameters

llvm::VPBlockBase* ExitingBlock

~VPRegionBlock()

Declared at: llvm/lib/Transforms/Vectorize/VPlan.h:2169