LLVM: llvm::sandboxir::Region Class Reference (original) (raw)
The main job of the Region is to point to new instructions generated by vectorization passes. More...
#include "[llvm/SandboxIR/Region.h](Region%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| using | iterator = decltype(Insts.begin()) |
| Public Member Functions | |
|---|---|
| LLVM_ABI | Region (Context &Ctx, TargetTransformInfo &TTI) |
| LLVM_ABI | ~Region () |
| Context & | getContext () 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< iterator > | insts () |
| const ScoreBoard & | getScoreboard () const |
| \Returns the ScoreBoard data structure that keeps track of instr costs. | |
| 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 |
The main job of the Region is to point to new instructions generated by vectorization passes.
It is the unit that RegionPasses operate on with their runOnRegion() function.
The region allows us to stack transformations horizontally, meaning that each transformation operates on a single region and the resulting region is the input to the next transformation, as opposed to vertically, which is the common way of applying a transformation across the whole function. This enables us to check for profitability and decide whether we accept or rollback at a region granularity, which is much better than doing this at the function level.
Definition at line 96 of file Region.h.
◆ iterator
using llvm::sandboxir::Region::iterator = decltype(Insts.begin())
◆ ~Region()
| llvm::sandboxir::Region::~Region | ( | ) |
|---|
◆ begin()
| iterator llvm::sandboxir::Region::begin ( ) | inline |
|---|
◆ clearAux()
| void llvm::sandboxir::Region::clearAux | ( | ) |
|---|
◆ contains()
Returns true if I is in the Region.
Definition at line 150 of file Region.h.
References I.
◆ createRegionsFromMD()
Definition at line 152 of file Region.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::sandboxir::BasicBlock(), llvm::cast(), llvm::dyn_cast(), llvm::errs(), F, I, llvm::SmallVectorTemplateBase< T, bool >::push_back(), Region(), and llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::try_emplace().
Referenced by llvm::sandboxir::RegionsFromMetadata::runOnFunction().
◆ dump() [1/2]
| void llvm::sandboxir::Region::dump | ( | ) | const |
|---|
◆ dump() [2/2]
| void llvm::sandboxir::Region::dump | ( | raw_ostream & | OS | ) | const |
|---|
◆ empty()
| bool llvm::sandboxir::Region::empty ( ) const | inline |
|---|
◆ end()
| iterator llvm::sandboxir::Region::end ( ) | inline |
|---|
◆ getAux()
◆ getContext()
| Context & llvm::sandboxir::Region::getContext ( ) const | inline |
|---|
◆ getScoreboard()
◆ insts()
◆ operator!=()
| bool llvm::sandboxir::Region::operator!= ( const Region & other) const | inline |
|---|
◆ operator==()
◆ setAux()
◆ Context
◆ operator<<
◆ RegionInternalsAttorney
◆ RegionsFromBBs
The documentation for this class was generated from the following files:
- include/llvm/SandboxIR/Region.h
- lib/SandboxIR/Region.cpp