MLIR 22.0.0git
SCF.h File Reference

Go to the source code of this file.

Classes

struct  mlir::scf::LoopNest

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::scf

Macros

#define GET_OP_CLASSES

Typedefs

using mlir::scf::ValueVector = SmallVector<Value>
 An owning vector of values, handy to return from functions.
using mlir::scf::LoopVector = SmallVector<scf::ForOp>
using mlir::scf::ValueTypeCastFnTy
 Perform a replacement of one iter OpOperand of an scf.for to the replacement value with a different type.

Functions

void mlir::scf::buildTerminatedBody (OpBuilder &builder, Location loc)
 Default callback for IfOp builders. Inserts a yield without arguments.
ForOp mlir::scf::getForInductionVarOwner (Value val)
 Returns the loop parent of an induction variable.
ParallelOp mlir::scf::getParallelForInductionVarOwner (Value val)
 Returns the parallel loop parent of an induction variable.
ForallOp mlir::scf::getForallOpThreadIndexOwner (Value val)
 Returns the ForallOp parent of an thread index variable.
bool mlir::scf::insideMutuallyExclusiveBranches (Operation *a, Operation *b)
 Return true if ops a and b (or their ancestors) are in mutually exclusive regions/blocks of an IfOp.
void mlir::scf::promote (RewriterBase &rewriter, scf::ForallOp forallOp)
 Promotes the loop body of a scf::ForallOp to its containing block.
LoopNest mlir::scf::buildLoopNest (OpBuilder &builder, Location loc, ValueRange lbs, ValueRange ubs, ValueRange steps, ValueRange iterArgs, function_ref< ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> bodyBuilder=nullptr)
 Creates a perfect nest of "for" loops, i.e.
LoopNest mlir::scf::buildLoopNest (OpBuilder &builder, Location loc, ValueRange lbs, ValueRange ubs, ValueRange steps, function_ref< void(OpBuilder &, Location, ValueRange)> bodyBuilder=nullptr)
 A convenience version for building loop nests without iteration arguments (like for reductions).
SmallVector< Valuemlir::scf::replaceAndCastForOpIterArg (RewriterBase &rewriter, scf::ForOp forOp, OpOperand &operand, Value replacement, const ValueTypeCastFnTy &castFn)
std::optional< llvm::APSInt > mlir::scf::computeUbMinusLb (Value lb, Value ub, bool isSigned)
 Helper function to compute the difference between two values.

Macro Definition Documentation

◆ GET_OP_CLASSES

#define GET_OP_CLASSES

Definition at line 37 of file SCF.h.