| MLIR
    22.0.0git
    | 
#include "mlir/Dialect/Func/Utils/Utils.h"#include "mlir/Dialect/Func/IR/FuncOps.h"#include "mlir/IR/IRMapping.h"#include "mlir/IR/PatternMatch.h"#include "llvm/ADT/STLExtras.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Support/DebugLog.h"Go to the source code of this file.
| Macros | |
| #define | DEBUG_TYPE "func-utils" | 
| Functions | |
| static llvm::SmallVector< llvm::SmallVector< int > > | getInverseMapping (ArrayRef< int > oldIdxToNewIdx) | 
| This method creates an inverse mapping of the provided map oldToNew.  More... | |
| template<typename Element > | |
| static SmallVector< Element > | getMappedElements (ArrayRef< Element > origElements, const llvm::SmallVector< llvm::SmallVector< int >> &newIdxToOldIdxs) | 
| This method returns a new vector of elements that are mapped from the origElementsbased on thenewIdxToOldIdxsmapping.  More... | |
| 
 | static | 
This method creates an inverse mapping of the provided map oldToNew. 
Given an array where oldIdxToNewIdx[i] = j means old index i maps to new index j, This method returns a vector where result[j] contains all old indices that map to new index j.
Example:
Definition at line 38 of file Utils.cpp.
References mlir::detail::enumerate().
| 
 | static | 
This method returns a new vector of elements that are mapped from the origElements based on the newIdxToOldIdxs mapping. 
This function assumes that the newIdxToOldIdxs mapping is valid, i.e. for each new index, there is at least one old index that maps to it. Also, It assumes that mapping to the same old index has the same element in the origElements vector.