LLVM 23.0.0git
llvm::sandboxir::RegionWithScore Class Referencefinal

A Region class that tracks its instructions score. More...

#include "llvm/Transforms/Vectorize/SandboxVectorizer/RegionWithScore.h"

Inheritance diagram for llvm::sandboxir::RegionWithScore:
[legend]

Public Member Functions

 RegionWithScore (Context &Ctx, const TargetTransformInfo &TTI)
 RegionWithScore (Region &&Rgn, const TargetTransformInfo &TTI)
const ScoreBoardgetScoreboard () const
 \Returns the ScoreBoard data structure that keeps track of instr costs.
Public Member Functions inherited from llvm::sandboxir::Region
LLVM_ABI Region (Context &Ctx)
virtual LLVM_ABI ~Region ()
 Region (const Region &)=delete
 Region (Region &&)=default
ContextgetContext () const
bool contains (Instruction *I) const
 Returns true if I is in the Region.
bool empty () const
 Returns true if the Region has no instructions.
LLVM_ABI void setAux (ArrayRef< Instruction * > Aux)
 Set the auxiliary vector.
const SmallVector< Instruction * > & getAux () const
 \Returns the auxiliary vector.
LLVM_ABI void clearAux ()
 Clears all auxiliary data.
iterator begin ()
iterator end ()
iterator_range< iteratorinsts ()
RegionClassID getSubclassID () const
LLVM_ABI_FOR_TEST bool operator== (const Region &Other) const
 This is an expensive check, meant for testing.
bool operator!= (const Region &other) const
LLVM_ABI_FOR_TEST void dump (raw_ostream &OS) const
void dump () const

Static Public Member Functions

static bool classof (const Region *From)
static SmallVector< std::unique_ptr< RegionWithScore > > createRegionsFromMD (Function &F, const TargetTransformInfo &TTI)
Static Public Member Functions inherited from llvm::sandboxir::Region
static LLVM_ABI SmallVector< std::unique_ptr< Region > > createRegionsFromMD (Function &F)

Friends

class RegionsFromBBs

Additional Inherited Members

Public Types inherited from llvm::sandboxir::Region
using iterator = decltype(Insts.begin())
Protected Member Functions inherited from llvm::sandboxir::Region
void addRaw (Instruction *I)
 Adds I to the set.
void setAux (unsigned Idx, Instruction *I)
 Set I as the Idx'th element in the auxiliary vector.
void dropAuxMetadata (Instruction *I)
 Helper for dropping Aux metadata for I.
void removeFromAux (Instruction *I)
 Remove instruction I from Aux and drop metadata.
LLVM_ABI Region (Context &Ctx, RegionClassID ID)
Static Protected Member Functions inherited from llvm::sandboxir::Region
template<typename RegionT, typename RegionFactoryT>
static SmallVector< std::unique_ptr< RegionT > > createRegionsFromMD (Function &F, RegionFactoryT Factory)
Protected Attributes inherited from llvm::sandboxir::Region
SetVector< Instruction * > Insts
 All the instructions in the Region.
SmallVector< Instruction * > Aux
 An auxiliary sequence of Instruction-Index pairs.
MDNodeRegionMDN
 MDNode that we'll use to mark instructions as being part of the region.
ContextCtx
RegionClassID ID
Context::CallbackID CreateInstCB
 ID (for later deregistration) of the "create instruction" callback.
Context::CallbackID EraseInstCB
 ID (for later deregistration) of the "erase instruction" callback.
Static Protected Attributes inherited from llvm::sandboxir::Region
static constexpr const charMDKind = "sandboxvec"
static constexpr const charRegionStr = "sandboxregion"
static constexpr const charAuxMDKind = "sandboxaux"

Detailed Description

A Region class that tracks its instructions score.

Definition at line 57 of file RegionWithScore.h.

Constructor & Destructor Documentation

◆ RegionWithScore() [1/2]

llvm::sandboxir::RegionWithScore::RegionWithScore ( Context & Ctx,
const TargetTransformInfo & TTI )
inline

◆ RegionWithScore() [2/2]

llvm::sandboxir::RegionWithScore::RegionWithScore ( Region && Rgn,
const TargetTransformInfo & TTI )
inline

Definition at line 78 of file RegionWithScore.h.

References llvm::move(), and llvm::sandboxir::Region::Region().

Member Function Documentation

◆ classof()

bool llvm::sandboxir::RegionWithScore::classof ( const Region * From)
inlinestatic

◆ createRegionsFromMD()

SmallVector< std::unique_ptr< RegionWithScore > > llvm::sandboxir::RegionWithScore::createRegionsFromMD ( Function & F,
const TargetTransformInfo & TTI )
static

◆ getScoreboard()

const ScoreBoard & llvm::sandboxir::RegionWithScore::getScoreboard ( ) const
inline

\Returns the ScoreBoard data structure that keeps track of instr costs.

Definition at line 86 of file RegionWithScore.h.

◆ RegionsFromBBs

friend class RegionsFromBBs
friend

Definition at line 66 of file RegionWithScore.h.

References I, and RegionsFromBBs.

Referenced by RegionsFromBBs.


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