|
Enzyme main
|
#include "Dialect/Ops.h"#include "Interfaces/AutoDiffOpInterface.h"#include "Interfaces/AutoDiffTypeInterface.h"#include "mlir/IR/Dominance.h"#include "mlir/IR/IRMapping.h"#include "mlir/IR/Matchers.h"#include "mlir/IR/SymbolTable.h"#include "mlir/Interfaces/FunctionInterfaces.h"#include "llvm/ADT/BreadthFirstIterator.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"#include "mlir/Dialect/Func/IR/FuncOps.h"#include "CloneFunction.h"#include "EnzymeLogic.h"

Go to the source code of this file.
Functions | |
| Type | getShadowType (Type type, unsigned width=1) |
| mlir::FunctionType | getFunctionTypeForClone (mlir::FunctionType FTy, DerivativeMode mode, unsigned width, mlir::Type additionalArg, llvm::ArrayRef< bool > returnPrimals, llvm::ArrayRef< bool > returnShadows, llvm::ArrayRef< DIFFE_TYPE > ReturnActivity, llvm::ArrayRef< DIFFE_TYPE > ArgActivity) |
| void | cloneInto (Region *src, Region *dest, Region::iterator destPos, IRMapping &mapper, std::map< Operation *, Operation * > &opMap) |
| Clone this region into 'dest' before the given position in 'dest'. | |
| void | cloneInto (Region *src, Region *dest, IRMapping &mapper, std::map< mlir::Operation *, mlir::Operation * > &opMap) |
| Operation * | clone (Operation *src, IRMapping &mapper, Operation::CloneOptions options, std::map< Operation *, Operation * > &opMap) |
| FunctionOpInterface | CloneFunctionWithReturns (DerivativeMode mode, unsigned width, FunctionOpInterface F, IRMapping &ptrInputs, ArrayRef< DIFFE_TYPE > ArgActivity, SmallPtrSetImpl< mlir::Value > &constants, SmallPtrSetImpl< mlir::Value > &nonconstants, SmallPtrSetImpl< mlir::Value > &returnvals, const std::vector< bool > &returnPrimals, const std::vector< bool > &returnShadows, ArrayRef< DIFFE_TYPE > ReturnActivity, Twine name, IRMapping &VMap, std::map< Operation *, Operation * > &OpMap, mlir::Type additionalArg) |
| Operation * clone | ( | Operation * | src, |
| IRMapping & | mapper, | ||
| Operation::CloneOptions | options, | ||
| std::map< Operation *, Operation * > & | opMap ) |
| FunctionOpInterface CloneFunctionWithReturns | ( | DerivativeMode | mode, |
| unsigned | width, | ||
| FunctionOpInterface | F, | ||
| IRMapping & | ptrInputs, | ||
| ArrayRef< DIFFE_TYPE > | ArgActivity, | ||
| SmallPtrSetImpl< mlir::Value > & | constants, | ||
| SmallPtrSetImpl< mlir::Value > & | nonconstants, | ||
| SmallPtrSetImpl< mlir::Value > & | returnvals, | ||
| const std::vector< bool > & | returnPrimals, | ||
| const std::vector< bool > & | returnShadows, | ||
| ArrayRef< DIFFE_TYPE > | ReturnActivity, | ||
| Twine | name, | ||
| IRMapping & | VMap, | ||
| std::map< Operation *, Operation * > & | OpMap, | ||
| mlir::Type | additionalArg ) |
Definition at line 203 of file CloneFunction.cpp.
References cloneInto(), CONSTANT, DUP_ARG, DUP_NONEED, getFunctionTypeForClone(), getShadowType(), and OUT_DIFF.
Referenced by mlir::enzyme::MGradientUtilsReverse::CreateFromClone().
| void cloneInto | ( | Region * | src, |
| Region * | dest, | ||
| IRMapping & | mapper, | ||
| std::map< mlir::Operation *, mlir::Operation * > & | opMap ) |
| void cloneInto | ( | Region * | src, |
| Region * | dest, | ||
| Region::iterator | destPos, | ||
| IRMapping & | mapper, | ||
| std::map< Operation *, Operation * > & | opMap ) |
Clone this region into 'dest' before the given position in 'dest'.
Definition at line 124 of file CloneFunction.cpp.
References clone(), and cloneInto().
| mlir::FunctionType getFunctionTypeForClone | ( | mlir::FunctionType | FTy, |
| DerivativeMode | mode, | ||
| unsigned | width, | ||
| mlir::Type | additionalArg, | ||
| llvm::ArrayRef< bool > | returnPrimals, | ||
| llvm::ArrayRef< bool > | returnShadows, | ||
| llvm::ArrayRef< DIFFE_TYPE > | ReturnActivity, | ||
| llvm::ArrayRef< DIFFE_TYPE > | ArgActivity ) |
| Type getShadowType | ( | Type | type, |
| unsigned | width = 1 ) |
Definition at line 10 of file CloneFunction.cpp.
Referenced by CloneFunctionWithReturns(), mlir::enzyme::MDiffeGradientUtils::diffe(), EnzymeVectorSplitPhi(), getFunctionTypeForClone(), mlir::enzyme::MGradientUtils::setInvertedPointer(), GradientUtils::usedInRooting(), and mlir::enzyme::MDiffeGradientUtils::zeroDiffe().