9#ifndef LLVM_SANDBOXIR_REGION_H
10#define LLVM_SANDBOXIR_REGION_H
52 OS <<
"BeforeCost: " << BeforeCost <<
"\n";
53 OS <<
"AfterCost: " << AfterCost <<
"\n";
105 static constexpr const char *MDKind =
"sandboxvec";
106 static constexpr const char *RegionStr =
"sandboxregion";
107 static constexpr const char *AuxMDKind =
"sandboxaux";
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file implements a set that has insertion order iteration characteristics.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A vector that has set insertion semantics.
iterator end()
Get an iterator to the end of the SetVector.
bool empty() const
Determine if the SetVector is empty or not.
iterator begin()
Get an iterator to the beginning of the SetVector.
bool contains(const key_type &key) const
Check if the SetVector contains the given key.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
An ID for a registered callback.
A sandboxir::User with operands, opcode and linked with previous/next instructions in an instruction ...
A helper client-attorney class for unit tests.
static void add(Region &Rgn, Instruction *I)
static void remove(Region &Rgn, Instruction *I)
The main job of the Region is to point to new instructions generated by vectorization passes.
Context & getContext() const
bool contains(Instruction *I) const
Returns true if I is in the Region.
const SmallVector< Instruction * > & getAux() const
\Returns the auxiliary vector.
iterator_range< iterator > insts()
bool operator!=(const Region &other) const
static LLVM_ABI SmallVector< std::unique_ptr< Region > > createRegionsFromMD(Function &F, TargetTransformInfo &TTI)
const ScoreBoard & getScoreboard() const
\Returns the ScoreBoard data structure that keeps track of instr costs.
friend raw_ostream & operator<<(raw_ostream &OS, const Region &Rgn)
LLVM_ABI void clearAux()
Clears all auxiliary data.
decltype(Insts.begin()) iterator
void dump(raw_ostream &OS) const
bool empty() const
Returns true if the Region has no instructions.
InstructionCost getBeforeCost() const
\Returns the cost of the Removed instructions.
LLVM_ABI void remove(Instruction *I)
Mark I as a deleted instruction from the region.
InstructionCost getAfterCost() const
\Returns the cost of the newly added instructions.
ScoreBoard(Region &Rgn, TargetTransformInfo &TTI)
LLVM_DUMP_METHOD void dump() const
void dump(raw_ostream &OS) const
void add(Instruction *I)
Mark I as a newly added instruction to the region.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.