class VPReductionPHIRecipe

Declaration

class VPReductionPHIRecipe : public VPHeaderPHIRecipe { /* full declaration omitted */ };

Description

A recipe for handling reduction phis. The start value is the first operand of the recipe and the incoming value from the backedge is the second operand.

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

Inherits from: VPHeaderPHIRecipe

Member Variables

private const llvm::RecurrenceDescriptor& RdxDesc
Descriptor for the reduction.
private bool IsInLoop
The phi is part of an in-loop reduction.
private bool IsOrdered
The phi is part of an ordered reduction. Requires IsInLoop to be true.

Inherited from VPValue:

protected UnderlyingVal
protected Def

Method Overview

  • public VPReductionPHIRecipe(llvm::PHINode * Phi, const llvm::RecurrenceDescriptor & RdxDesc, llvm::VPValue & Start, bool IsInLoop = false, bool IsOrdered = false)
  • public static inline bool classof(const llvm::VPRecipeBase * R)
  • public static inline bool classof(const llvm::VPHeaderPHIRecipe * R)
  • public static inline bool classof(const llvm::VPValue * V)
  • public void execute(llvm::VPTransformState & State)
  • public const llvm::RecurrenceDescriptor & getRecurrenceDescriptor() const
  • public bool isInLoop() const
  • public bool isOrdered() const
  • public void print(llvm::raw_ostream & O, const llvm::Twine & Indent, llvm::VPSlotTracker & SlotTracker) const
  • public ~VPReductionPHIRecipe()

Inherited from VPHeaderPHIRecipe:

Inherited from VPValue:

Inherited from VPRecipeBase:

Inherited from VPUser:

Inherited from VPDef:

Methods

VPReductionPHIRecipe(
    llvm::PHINode* Phi,
    const llvm::RecurrenceDescriptor& RdxDesc,
    llvm::VPValue& Start,
    bool IsInLoop = false,
    bool IsOrdered = false)

Description

Create a new VPReductionPHIRecipe for the reduction \p Phi described by \p RdxDesc.

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

Parameters

llvm::PHINode* Phi
const llvm::RecurrenceDescriptor& RdxDesc
llvm::VPValue& Start
bool IsInLoop = false
bool IsOrdered = false

static inline bool classof(
    const llvm::VPRecipeBase* R)

Description

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

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

Parameters

const llvm::VPRecipeBase* R

static inline bool classof(
    const llvm::VPHeaderPHIRecipe* R)

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

Parameters

const llvm::VPHeaderPHIRecipe* R

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

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

Parameters

const llvm::VPValue* V

void execute(llvm::VPTransformState& State)

Description

Generate the phi/select nodes.

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

Parameters

llvm::VPTransformState& State

const llvm::RecurrenceDescriptor&
getRecurrenceDescriptor() const

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

bool isInLoop() const

Description

Returns true, if the phi is part of an in-loop reduction.

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

bool isOrdered() const

Description

Returns true, if the phi is part of an ordered reduction.

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

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

Description

Print the recipe.

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

Parameters

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

~VPReductionPHIRecipe()

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