LLVM 24.0.0git
llvm::VPIRFlags Class Reference

Class to record and manage LLVM IR flags. More...

#include "Transforms/Vectorize/VPlan.h"

Inheritance diagram for llvm::VPIRFlags:
[legend]

Classes

struct  DisjointFlagsTy
struct  NonNegFlagsTy
struct  TruncFlagsTy
struct  WrapFlagsTy

Public Member Functions

 VPIRFlags ()
 VPIRFlags (Instruction &I)
 VPIRFlags (CmpInst::Predicate Pred)
 VPIRFlags (CmpInst::Predicate Pred, FastMathFlags FMFs)
 VPIRFlags (WrapFlagsTy WrapFlags)
 VPIRFlags (TruncFlagsTy TruncFlags)
 VPIRFlags (FastMathFlags FMFs)
 VPIRFlags (DisjointFlagsTy DisjointFlags)
 VPIRFlags (NonNegFlagsTy NonNegFlags)
 VPIRFlags (ExactFlagsTy ExactFlags)
 VPIRFlags (GEPNoWrapFlags GEPFlags)
 VPIRFlags (RecurKind Kind, bool IsOrdered, bool IsInLoop, FastMathFlags FMFs)
void intersectFlags (const VPIRFlags &Other)
 Only keep flags also present in Other.
void dropPoisonGeneratingFlags ()
 Drop all poison-generating flags.
void applyFlags (Instruction &I) const
 Apply the IR flags to I.
CmpInst::Predicate getPredicate () const
void setPredicate (CmpInst::Predicate Pred)
GEPNoWrapFlags getGEPNoWrapFlags () const
bool hasPredicate () const
 Returns true if the recipe has a comparison predicate.
bool hasFastMathFlags () const
 Returns true if the recipe has fast-math flags.
LLVM_ABI_FOR_TEST FastMathFlags getFastMathFlagsOrNone () const
void setFastMathFlags (FastMathFlags FMFs)
 Set the fast-math flags to FMFs.
bool hasNoUnsignedWrap () const
bool hasNoSignedWrap () const
WrapFlagsTy getNoWrapFlagsOrNone () const
WrapFlagsTy getNoWrapFlags () const
bool isDisjoint () const
RecurKind getRecurKind () const
bool isReductionOrdered () const
bool isReductionInLoop () const
LLVM_ABI_FOR_TEST bool flagsValidForOpcode (unsigned Opcode) const
 Returns true if the set flags are valid for Opcode.
LLVM_ABI_FOR_TEST bool hasRequiredFlagsForOpcode (unsigned Opcode, Type *ResultTy) const
 Returns true if Opcode with scalar result type ResultTy has its required flags set.
void printFlags (raw_ostream &O) const

Static Public Member Functions

static LLVM_ABI_FOR_TEST VPIRFlags getDefaultFlags (unsigned Opcode, Type *ResultTy=nullptr)
 Returns default flags for Opcode and scalar ResultTy for opcodes that support it, asserts otherwise.

Detailed Description

Class to record and manage LLVM IR flags.

Definition at line 667 of file VPlan.h.

Constructor & Destructor Documentation

◆ VPIRFlags() [1/12]

◆ VPIRFlags() [2/12]

◆ VPIRFlags() [3/12]

llvm::VPIRFlags::VPIRFlags ( CmpInst::Predicate Pred)
inline

Definition at line 806 of file VPlan.h.

References AllFlags, assert(), CmpPredStorage, getPredicate(), Pred, and llvm::Bitfield::set().

◆ VPIRFlags() [4/12]

llvm::VPIRFlags::VPIRFlags ( CmpInst::Predicate Pred,
FastMathFlags FMFs )
inline

Definition at line 811 of file VPlan.h.

References AllFlags, assert(), FCmpFlags, FMFs, getPredicate(), Pred, and llvm::Bitfield::set().

◆ VPIRFlags() [5/12]

llvm::VPIRFlags::VPIRFlags ( WrapFlagsTy WrapFlags)
inline

Definition at line 818 of file VPlan.h.

References AllFlags, and WrapFlags.

◆ VPIRFlags() [6/12]

llvm::VPIRFlags::VPIRFlags ( TruncFlagsTy TruncFlags)
inline

Definition at line 823 of file VPlan.h.

References AllFlags, and TruncFlags.

◆ VPIRFlags() [7/12]

llvm::VPIRFlags::VPIRFlags ( FastMathFlags FMFs)
inline

Definition at line 828 of file VPlan.h.

References AllFlags, and FMFs.

◆ VPIRFlags() [8/12]

llvm::VPIRFlags::VPIRFlags ( DisjointFlagsTy DisjointFlags)
inline

Definition at line 832 of file VPlan.h.

References AllFlags, and DisjointFlags.

◆ VPIRFlags() [9/12]

llvm::VPIRFlags::VPIRFlags ( NonNegFlagsTy NonNegFlags)
inline

Definition at line 837 of file VPlan.h.

References AllFlags, and NonNegFlags.

◆ VPIRFlags() [10/12]

llvm::VPIRFlags::VPIRFlags ( ExactFlagsTy ExactFlags)
inline

Definition at line 842 of file VPlan.h.

References AllFlags, and ExactFlags.

◆ VPIRFlags() [11/12]

llvm::VPIRFlags::VPIRFlags ( GEPNoWrapFlags GEPFlags)
inline

Definition at line 847 of file VPlan.h.

References AllFlags, GEPFlagsStorage, and llvm::GEPNoWrapFlags::getRaw().

◆ VPIRFlags() [12/12]

llvm::VPIRFlags::VPIRFlags ( RecurKind Kind,
bool IsOrdered,
bool IsInLoop,
FastMathFlags FMFs )
inline

Definition at line 852 of file VPlan.h.

References AllFlags, FMFs, and ReductionFlags.

Member Function Documentation

◆ applyFlags()

◆ dropPoisonGeneratingFlags()

void llvm::VPIRFlags::dropPoisonGeneratingFlags ( )
inline

Drop all poison-generating flags.

Definition at line 862 of file VPlan.h.

References DisjointFlags, ExactFlags, GEPFlagsStorage, NonNegFlags, TruncFlags, and WrapFlags.

Referenced by llvm::VPlanTransforms::replaceWideCanonicalIVWithWideIV().

◆ flagsValidForOpcode()

◆ getDefaultFlags()

◆ getFastMathFlagsOrNone()

◆ getGEPNoWrapFlags()

◆ getNoWrapFlags()

WrapFlagsTy llvm::VPIRFlags::getNoWrapFlags ( ) const
inline

◆ getNoWrapFlagsOrNone()

WrapFlagsTy llvm::VPIRFlags::getNoWrapFlagsOrNone ( ) const
inline

Definition at line 997 of file VPlan.h.

References hasNoSignedWrap(), and hasNoUnsignedWrap().

◆ getPredicate()

◆ getRecurKind()

RecurKind llvm::VPIRFlags::getRecurKind ( ) const
inline

Definition at line 1017 of file VPlan.h.

References assert(), and ReductionFlags.

Referenced by llvm::VPlanTransforms::handleMultiUseReductions(), and printFlags().

◆ hasFastMathFlags()

bool llvm::VPIRFlags::hasFastMathFlags ( ) const
inline

Returns true if the recipe has fast-math flags.

Definition at line 962 of file VPlan.h.

Referenced by getFastMathFlagsOrNone(), and setFastMathFlags().

◆ hasNoSignedWrap()

bool llvm::VPIRFlags::hasNoSignedWrap ( ) const
inline

Definition at line 986 of file VPlan.h.

References llvm_unreachable, TruncFlags, and WrapFlags.

Referenced by getNoWrapFlags(), and getNoWrapFlagsOrNone().

◆ hasNoUnsignedWrap()

bool llvm::VPIRFlags::hasNoUnsignedWrap ( ) const
inline

Definition at line 975 of file VPlan.h.

References llvm_unreachable, TruncFlags, and WrapFlags.

Referenced by getNoWrapFlags(), and getNoWrapFlagsOrNone().

◆ hasPredicate()

bool llvm::VPIRFlags::hasPredicate ( ) const
inline

Returns true if the recipe has a comparison predicate.

Definition at line 957 of file VPlan.h.

Referenced by llvm::VPReplicateRecipe::execute().

◆ hasRequiredFlagsForOpcode()

bool VPIRFlags::hasRequiredFlagsForOpcode ( unsigned Opcode,
Type * ResultTy ) const

Returns true if Opcode with scalar result type ResultTy has its required flags set.

Definition at line 2872 of file VPlanRecipes.cpp.

References llvm::VPInstruction::ComputeReductionResult, and getDefaultFlags().

Referenced by llvm::VPInstruction::execute(), llvm::VPBlendRecipe::VPBlendRecipe(), and llvm::VPInstruction::VPInstruction().

◆ intersectFlags()

void VPIRFlags::intersectFlags ( const VPIRFlags & Other)

Only keep flags also present in Other.

Other must have the same OpType as the current object.

Definition at line 404 of file VPlanRecipes.cpp.

References assert(), CmpPredStorage, DisjointFlags, ExactFlags, FCmpFlags, GEPFlagsStorage, getFastMathFlagsOrNone(), NonNegFlags, ReductionFlags, TruncFlags, VPIRFlags(), and WrapFlags.

◆ isDisjoint()

bool llvm::VPIRFlags::isDisjoint ( ) const
inline

Definition at line 1011 of file VPlan.h.

References assert(), and DisjointFlags.

◆ isReductionInLoop()

bool llvm::VPIRFlags::isReductionInLoop ( ) const
inline

Definition at line 1029 of file VPlan.h.

References assert(), and ReductionFlags.

Referenced by printFlags().

◆ isReductionOrdered()

bool llvm::VPIRFlags::isReductionOrdered ( ) const
inline

Definition at line 1023 of file VPlan.h.

References assert(), and ReductionFlags.

Referenced by printFlags().

◆ printFlags()

◆ setFastMathFlags()

void llvm::VPIRFlags::setFastMathFlags ( FastMathFlags FMFs)
inline

Set the fast-math flags to FMFs.

Definition at line 970 of file VPlan.h.

References assert(), FMFs, and hasFastMathFlags().

◆ setPredicate()

void llvm::VPIRFlags::setPredicate ( CmpInst::Predicate Pred)
inline

Definition at line 942 of file VPlan.h.

References assert(), CmpPredStorage, FCmpFlags, getPredicate(), Pred, and llvm::Bitfield::set().

Member Data Documentation

◆ AllFlags

uint8_t llvm::VPIRFlags::AllFlags[2]

◆ CmpPredStorage

uint8_t llvm::VPIRFlags::CmpPredStorage

Definition at line 752 of file VPlan.h.

Referenced by getPredicate(), intersectFlags(), setPredicate(), VPIRFlags(), and VPIRFlags().

◆ DisjointFlags

DisjointFlagsTy llvm::VPIRFlags::DisjointFlags

◆ ExactFlags

ExactFlagsTy llvm::VPIRFlags::ExactFlags

◆ FCmpFlags

FCmpFlagsTy llvm::VPIRFlags::FCmpFlags

Definition at line 760 of file VPlan.h.

Referenced by getPredicate(), intersectFlags(), setPredicate(), VPIRFlags(), and VPIRFlags().

◆ FMFs

◆ GEPFlagsStorage

uint8_t llvm::VPIRFlags::GEPFlagsStorage

◆ NonNegFlags

NonNegFlagsTy llvm::VPIRFlags::NonNegFlags

◆ ReductionFlags

ReductionFlagsTy llvm::VPIRFlags::ReductionFlags

◆ TruncFlags

◆ WrapFlags


The documentation for this class was generated from the following files: