|
Enzyme main
|
#include <algorithm>#include <set>#include <utility>#include "llvm/IR/Function.h"#include "llvm/IR/Module.h"#include "llvm/IR/Type.h"#include "llvm/Support/CommandLine.h"#include "llvm/Analysis/AliasAnalysis.h"#include "llvm/ADT/SmallVector.h"#include "llvm/Support/ErrorHandling.h"#include "ActivityAnalysis.h"#include "FunctionUtils.h"#include "TraceUtils.h"#include "TypeAnalysis/TypeAnalysis.h"#include "Utils.h"#include "mlir/IR/IRMapping.h"#include "mlir/Interfaces/FunctionInterfaces.h"#include "../../Utils.h"#include <functional>

Go to the source code of this file.
Classes | |
| class | AugmentedReturn |
| return structtype if recursive function More... | |
| struct | ReverseCacheKey |
todiff is the function to differentiate retType is the activity info of the return. More... | |
| struct | RequestContext |
| struct | FloatRepresentation |
| struct | FloatTruncation |
| class | EnzymeLogic |
| struct | EnzymeLogic::AugmentedCacheKey |
| struct | EnzymeLogic::ForwardCacheKey |
| class | mlir::enzyme::MFnTypeInfo |
| class | mlir::enzyme::MTypeAnalysis |
| class | mlir::enzyme::MTypeResults |
| class | mlir::enzyme::MEnzymeLogic |
| struct | mlir::enzyme::MEnzymeLogic::MForwardCacheKey |
| struct | mlir::enzyme::MEnzymeLogic::MReverseCacheKey |
Namespaces | |
| namespace | mlir |
| namespace | mlir::enzyme |
Typedefs | |
| typedef void | mlir::enzyme::buildReturnFunction(OpBuilder &, mlir::Block *) |
Enumerations | |
| enum class | AugmentedStruct { Tape , Return , DifferentialReturn } |
| enum class | CacheType { Self , Shadow , Tape } |
| enum | TruncateMode { TruncMemMode = 0b0001 , TruncOpMode = 0b0010 , TruncOpFullModuleMode = 0b0110 } |
Functions | |
| static std::string | str (AugmentedStruct c) |
| static llvm::raw_ostream & | operator<< (llvm::raw_ostream &o, AugmentedStruct c) |
| static std::string | str (CacheType c) |
| static llvm::raw_ostream & | operator<< (llvm::raw_ostream &o, CacheType c) |
| static llvm::Type * | getTypeForWidth (llvm::LLVMContext &ctx, unsigned width, bool builtinFloat) |
| static const char * | truncateModeStr (TruncateMode mode) |
| bool | shouldAugmentCall (llvm::CallInst *op, const GradientUtils *gutils) |
| bool | legalCombinedForwardReverse (llvm::CallInst *origop, const std::map< llvm::ReturnInst *, llvm::StoreInst * > &replacedReturns, llvm::SmallVectorImpl< llvm::Instruction * > &postCreate, llvm::SmallVectorImpl< llvm::Instruction * > &userReplace, const GradientUtils *gutils, const llvm::SmallPtrSetImpl< const llvm::Instruction * > &unnecessaryInstructions, const llvm::SmallPtrSetImpl< llvm::BasicBlock * > &oldUnreachable, const bool subretused) |
| std::pair< llvm::SmallVector< llvm::Type *, 4 >, llvm::SmallVector< llvm::Type *, 4 > > | getDefaultFunctionTypeForAugmentation (llvm::FunctionType *called, bool returnUsed, DIFFE_TYPE retType) |
| std::pair< llvm::SmallVector< llvm::Type *, 4 >, llvm::SmallVector< llvm::Type *, 4 > > | getDefaultFunctionTypeForGradient (llvm::FunctionType *called, DIFFE_TYPE retType) |
Variables | |
| llvm::cl::opt< bool > | EnzymePrint |
| constexpr char | EnzymeFPRTPrefix [] = "__enzyme_fprt_" |
| constexpr char | EnzymeFPRTOriginalPrefix [] = "__enzyme_fprt_original_" |
| llvm::cl::opt< bool > | looseTypeAnalysis |
| llvm::cl::opt< bool > | nonmarkedglobals_inactiveloads |
|
strong |
| Enumerator | |
|---|---|
| Tape | |
| Return | |
| DifferentialReturn | |
Definition at line 60 of file EnzymeLogic.h.
|
strong |
| Enumerator | |
|---|---|
| Self | |
| Shadow | |
| Tape | |
Definition at line 80 of file EnzymeLogic.h.
| enum TruncateMode |
| Enumerator | |
|---|---|
| TruncMemMode | |
| TruncOpMode | |
| TruncOpFullModuleMode | |
Definition at line 336 of file EnzymeLogic.h.
| std::pair< llvm::SmallVector< llvm::Type *, 4 >, llvm::SmallVector< llvm::Type *, 4 > > getDefaultFunctionTypeForAugmentation | ( | llvm::FunctionType * | called, |
| bool | returnUsed, | ||
| DIFFE_TYPE | retType ) |
| std::pair< llvm::SmallVector< llvm::Type *, 4 >, llvm::SmallVector< llvm::Type *, 4 > > getDefaultFunctionTypeForGradient | ( | llvm::FunctionType * | called, |
| DIFFE_TYPE | retType ) |
|
static |
Definition at line 319 of file EnzymeLogic.h.
| bool legalCombinedForwardReverse | ( | llvm::CallInst * | origop, |
| const std::map< llvm::ReturnInst *, llvm::StoreInst * > & | replacedReturns, | ||
| llvm::SmallVectorImpl< llvm::Instruction * > & | postCreate, | ||
| llvm::SmallVectorImpl< llvm::Instruction * > & | userReplace, | ||
| const GradientUtils * | gutils, | ||
| const llvm::SmallPtrSetImpl< const llvm::Instruction * > & | unnecessaryInstructions, | ||
| const llvm::SmallPtrSetImpl< llvm::BasicBlock * > & | oldUnreachable, | ||
| const bool | subretused ) |
|
inlinestatic |
Definition at line 75 of file EnzymeLogic.h.
|
inlinestatic |
Definition at line 95 of file EnzymeLogic.h.
| bool shouldAugmentCall | ( | llvm::CallInst * | op, |
| const GradientUtils * | gutils ) |
|
inlinestatic |
Definition at line 62 of file EnzymeLogic.h.
Referenced by convertRRootCountFromString(), convertSRetTypeFromString(), dontAnalyze(), EmitFailure(), EmitFailure(), EmitFailure(), EmitNoDerivativeError(), EmitNoDerivativeError(), EmitNoTypeError(), EmitWarning(), EmitWarning(), EmitWarningAlways(), EnzymeAnonymousAliasScope(), EnzymeAnonymousAliasScopeDomain(), EnzymeGradientUtilsInvertedPointersToString(), EnzymeTypeAnalyzerToString(), CacheUtility::erase(), ErrorIfRuntimeInactive(), extractBLAS(), TypeResults::firstPointer(), getOrInsertDifferentialMPI_Wait(), handleCustomDerivative(), isMemFreeLibMFunction(), parseActivityString(), parseBaseType(), AdjointGenerator::recursivelyHandleSubfunction(), SanitizeDerivatives(), TypeAnalyzer::visitBinaryOperation(), AdjointGenerator::visitCastInst(), AdjointGenerator::visitCommonStore(), AdjointGenerator::visitExtractValueInst(), AdjointGenerator::visitInsertValueInst(), TypeAnalyzer::visitIntrinsicInst(), AdjointGenerator::visitLoadLike(), AdjointGenerator::visitMemSetCommon(), AdjointGenerator::visitMemTransferCommon(), TypeAnalyzer::visitMemTransferCommon(), and TypeAnalyzer::visitPHINode().
|
inlinestatic |
Definition at line 82 of file EnzymeLogic.h.
|
static |
Definition at line 341 of file EnzymeLogic.h.
|
constexpr |
Definition at line 58 of file EnzymeLogic.h.
|
constexpr |
Definition at line 57 of file EnzymeLogic.h.
|
extern |
Referenced by PreProcessCache::preprocessForClone().
|
extern |
Referenced by AdjointGenerator::createBinaryOperatorAdjoint(), AdjointGenerator::createBinaryOperatorDual(), AdjointGenerator::createSelectInstAdjoint(), AdjointGenerator::DifferentiableMemCopyFloats(), AdjointGenerator::handleAdjointForIntrinsic(), AdjointGenerator::visitAtomicRMWInst(), AdjointGenerator::visitCastInst(), AdjointGenerator::visitCommonStore(), AdjointGenerator::visitExtractValueInst(), AdjointGenerator::visitInsertValueInst(), AdjointGenerator::visitLoadLike(), AdjointGenerator::visitMemSetCommon(), and AdjointGenerator::visitMemTransferCommon().
|
extern |
Referenced by AdjointGenerator::visitLoadLike().