38 Header->getParent(), Exit);
40 Header->getParent(), Exit);
46 PHINode::Create(I32Ty, 2, Name +
".iv", Header->getTerminator()->getIterator());
47 IV->addIncoming(ConstantInt::get(I32Ty, 0), Preheader);
49 B.SetInsertPoint(Latch);
50 Value *Inc =
B.CreateAdd(
IV, Step, Name +
".step");
51 Value *
Cond =
B.CreateICmpNE(Inc, Bound, Name +
".cond");
55 "Expected a non-zero step size. This is chosen by the pass and "
56 "should always be non-zero to imply a finite loop.");
61 IV->addIncoming(Inc, Latch);
75 L->addBasicBlockToLoop(Header, LI);
76 L->addBasicBlockToLoop(Body, LI);
77 L->addBasicBlockToLoop(Latch, LI);
94 ParentL->addChildLoop(ColumnLoopInfo);
100 "cols",
B, DTU, ColumnLoopInfo, LI);
104 B.getInt64(
TileSize),
"rows",
B, DTU, RowLoopInfo, LI);
109 B.getInt64(
TileSize),
"inner",
B, DTU, KLoopInfo, LI);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
This file contains the declarations for profiling metadata utility functions.
const SmallVectorImpl< MachineOperand > & Cond
static const uint32_t IV[8]
LLVM Basic Block Representation.
const Function * getParent() const
Return the enclosing method, or null if none.
static BasicBlock * Create(LLVMContext &Context, const Twine &Name="", Function *Parent=nullptr, BasicBlock *InsertBefore=nullptr)
Creates a new BasicBlock.
LLVM_ABI const BasicBlock * getSinglePredecessor() const
Return the predecessor of this block if it has a single predecessor block.
LLVM_ABI const BasicBlock * getSingleSuccessor() const
Return the successor of this block if it has a single successor.
LLVM_ABI LLVMContext & getContext() const
Get the context in which this basic block lives.
const Instruction * getTerminator() const LLVM_READONLY
Returns the terminator instruction if the block is well formed or null if the block is not well forme...
static BranchInst * Create(BasicBlock *IfTrue, InsertPosition InsertBefore=nullptr)
BasicBlock * getSuccessor(unsigned i) const
void setSuccessor(unsigned idx, BasicBlock *NewSucc)
This is the shared class of boolean and integer constants.
uint64_t getZExtValue() const
Return the constant as a 64-bit unsigned integer value after it has been zero extended as appropriate...
static constexpr UpdateKind Delete
static constexpr UpdateKind Insert
void applyUpdatesPermissive(ArrayRef< UpdateT > Updates)
Submit updates to all available trees.
Common base class shared among various IRBuilders.
void addChildLoop(LoopT *NewChild)
Add the specified loop to be a child of this loop.
void addTopLevelLoop(LoopT *New)
This adds the specified loop to the collection of top-level loops.
LoopT * AllocateLoop(ArgsTy &&...Args)
LoopT * getLoopFor(const BlockT *BB) const
Return the inner most loop that BB lives in.
Represents a single loop in the control flow graph.
static PHINode * Create(Type *Ty, unsigned NumReservedValues, const Twine &NameStr="", InsertPosition InsertBefore=nullptr)
Constructors - NumReservedValues is a hint for the number of incoming edges that this phi node will h...
StringRef - Represent a constant reference to a string, i.e.
static LLVM_ABI IntegerType * getInt64Ty(LLVMContext &C)
@ BR
Control flow instructions. These all have token chains.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr Value
cl::opt< bool > ProfcheckDisableMetadataFixes
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
LLVM_ABI void setFittedBranchWeights(Instruction &I, ArrayRef< uint64_t > Weights, bool IsExpected, bool ElideAllZero=false)
Variant of setBranchWeights where the Weights will be fit first to uint32_t by shifting right.
unsigned NumInner
Number of columns of the first matrix of a multiply / number of rows of the second matrix of a multip...
MatrixLoop ColumnLoop
The loop iterating on the columns.
MatrixLoop RowLoop
The loop iterating on the rows.
unsigned NumRows
Number of rows of the matrix.
BasicBlock * CreateTiledLoops(BasicBlock *Start, BasicBlock *End, IRBuilderBase &B, DomTreeUpdater &DTU, LoopInfo &LI)
Creates an IR loop nests for tiling of the form below.
unsigned NumColumns
Number of columns of the matrix.
unsigned TileSize
Number of rows/columns in a tile.
MatrixLoop KLoop
The loop iterating on k (inner dimension).