20 bool hasValueStores) {
24void AffineForOp::setupPromotion(
26 llvm::SmallMapVector<Region *, Value, 2> ®ionsToProcess) {
27 Region &bodyRegion = getBodyRegion();
28 if (!hasValueStores) {
29 regionsToProcess.insert({&bodyRegion, reachingDef});
33 getInitsMutable().append(reachingDef);
35 regionsToProcess.insert({&bodyRegion, bodyRegion.
getArguments().back()});
38Value AffineForOp::finalizePromotion(
49 SmallVector<Type> resultTypes(getResultTypes());
50 resultTypes.push_back(slot.
elemType);
52 IRRewriter rewriter(builder);
This class helps build Operations.
result_range getResults()
This class contains a list of basic blocks and a link to the parent operation it is attached to.
BlockArgListType getArguments()
BlockArgument addArgument(Type type, Location loc)
Add one value to the argument list.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Location getLoc() const
Return the location of this value.
Operation * replaceWithNewResults(RewriterBase &rewriter, Operation *op, TypeRange resultTypes)
Creates a shallow copy of an operation with new result types, moving the regions out of the original ...
void updateTerminator(Block *block, Value defaultReachingDef, const DenseMap< Block *, Value > &reachingAtBlockEnd)
Appends the reaching definition for the given block as an operand to its terminator.
Include the generated interface declarations.
Represents a slot in memory.
Value ptr
Pointer to the memory slot, used by operations to refer to it.
Type elemType
Type of the value contained in the slot.