MLIR 22.0.0git
AffineMap.h File Reference
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/Value.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ADT/SmallVectorExtras.h"
#include <optional>

Go to the source code of this file.

Classes

class  mlir::AffineMap
 A multi-dimensional affine map Affine map's are immutable like Type's, and they are uniqued. More...
struct  mlir::MutableAffineMap
 A mutable affine map. Its affine expressions are however unique. More...
struct  llvm::DenseMapInfo< mlir::AffineMap >

Namespaces

namespace  llvm
 The OpAsmOpInterface, see OpAsmInterface.td for more details.
namespace  mlir
 Include the generated interface declarations.
namespace  mlir::detail
 AttrTypeReplacer.

Functions

inline ::llvm::hash_code mlir::hash_value (AffineMap arg)
AffineMap mlir::simplifyAffineMap (AffineMap map)
 Simplifies an affine map by simplifying its underlying AffineExpr results.
AffineMap mlir::compressDims (AffineMap map, const llvm::SmallBitVector &unusedDims)
 Drop the dims that are listed in unusedDims.
AffineMap mlir::compressUnusedDims (AffineMap map)
 Drop the dims that are not used.
SmallVector< AffineMapmlir::compressUnusedDims (ArrayRef< AffineMap > maps)
 Drop the dims that are not used by any of the individual maps in maps.
AffineMap mlir::compressSymbols (AffineMap map, const llvm::SmallBitVector &unusedSymbols)
 Drop the symbols that are listed in unusedSymbols.
AffineMap mlir::compressUnusedSymbols (AffineMap map)
 Drop the symbols that are not used.
SmallVector< AffineMapmlir::compressUnusedSymbols (ArrayRef< AffineMap > maps)
 Drop the symbols that are not used by any of the individual maps in maps.
AffineMap mlir::foldAttributesIntoMap (Builder &b, AffineMap map, ArrayRef< OpFoldResult > operands, SmallVector< Value > &remainingValues)
 Fold all attributes among the given operands into the affine map.
AffineMap mlir::removeDuplicateExprs (AffineMap map)
 Returns a map with the same dimension and symbol count as map, but whose results are the unique affine expressions of map.
AffineMap mlir::inversePermutation (AffineMap map)
 Returns a map of codomain to domain dimensions such that the first codomain dimension for a particular domain dimension is selected.
AffineMap mlir::inverseAndBroadcastProjectedPermutation (AffineMap map)
 Return the reverse map of a projected permutation where the projected dimensions are transformed into 0s.
AffineMap mlir::concatAffineMaps (ArrayRef< AffineMap > maps, MLIRContext *context)
 Concatenates a list of maps into a single AffineMap, stepping over potentially empty maps.
AffineMap mlir::projectDims (AffineMap map, const llvm::SmallBitVector &projectedDimensions, bool compressDimsFlag=false)
 Returns the map that results from projecting out the dimensions specified in projectedDimensions.
AffineMap mlir::projectSymbols (AffineMap map, const llvm::SmallBitVector &projectedSymbols, bool compressSymbolsFlag=false)
 Symbol counterpart of projectDims.
AffineMap mlir::getProjectedMap (AffineMap map, const llvm::SmallBitVector &projectedDimensions, bool compressDimsFlag=true, bool compressSymbolsFlag=true)
 Calls projectDims(map, projectedDimensions, compressDimsFlag).
llvm::SmallBitVector mlir::getUnusedDimsBitVector (ArrayRef< AffineMap > maps)
llvm::SmallBitVector mlir::getUnusedSymbolsBitVector (ArrayRef< AffineMap > maps)
AffineMap mlir::expandDimsToRank (AffineMap map, int64_t rank, const llvm::SmallBitVector &projectedDimensions)
 Expand map to operate on rank dims while projecting out the dims in projectedDimensions.
raw_ostreammlir::operator<< (raw_ostream &os, AffineMap map)
template<typename T>
SmallVector< T > mlir::applyPermutationMap (AffineMap map, llvm::ArrayRef< T > source)
 Apply a permutation from map to source and return the result.
template<typename AffineExprContainer>
static void mlir::getMaxDimAndSymbol (ArrayRef< AffineExprContainer > exprsList, int64_t &maxDim, int64_t &maxSym)
 Calculates maximum dimension and symbol positions from the expressions in exprsLists and stores them in maxDim and maxSym respectively.