|
Enzyme main
|
#include "CApi.h"#include "FunctionUtils.h"#include "GradientUtils.h"#include "Utils.h"#include "llvm/ADT/SmallSet.h"#include "llvm/IR/Function.h"#include "llvm/IR/IRBuilder.h"#include "llvm/IR/Instructions.h"#include "llvm/IR/LegacyPassManager.h"#include "llvm/IR/Module.h"#include "llvm/Pass.h"#include "llvm/Transforms/Utils/BasicBlockUtils.h"#include "llvm/Transforms/Utils/Cloning.h"#include "llvm/Passes/PassBuilder.h"#include <string>
Go to the source code of this file.
Classes | |
| class | FixupJuliaCallingConventionNewPM |
| class | FixupBatchedJuliaCallingConventionNewPM |
Macros | |
| #define | addAttribute addAttributeAtIndex |
| #define | removeAttribute removeAttributeAtIndex |
| #define | getAttribute getAttributeAtIndex |
| #define | hasAttribute hasAttributeAtIndex |
Functions | |
| bool | DetectPointerArgOfFn (llvm::Function &F, llvm::SmallPtrSetImpl< llvm::Function * > &calls_todo) |
| bool | needsReRooting (llvm::Argument *arg, bool &anyJLStore, llvm::Type *SRetType=nullptr) |
| bool | needsReReturning (llvm::Argument *arg, size_t &sret_idx, std::map< size_t, size_t > &srets_without_stores) |
| static bool | isOpaque (llvm::Type *T) |
| static void | removeRange (std::vector< std::pair< uint64_t, uint64_t > > &ranges, uint64_t start, uint64_t end) |
| static bool | isReadOnlyNoCapture (Function *F, unsigned argNo) |
| static bool | isGuaranteedToFullyWrite (Function *F, unsigned argNo, Type *T) |
| void | EnzymeFixupJuliaCallingConvention (Function *F, bool sret_jlvalue) |
| void | EnzymeFixupBatchedJuliaCallingConvention (Function *F) |
| bool | registerFixupJuliaPass (StringRef Name, ModulePassManager &MPM) |
| #define addAttribute addAttributeAtIndex |
Definition at line 15 of file FixupJuliaCallingConvention.cpp.
| #define getAttribute getAttributeAtIndex |
Definition at line 17 of file FixupJuliaCallingConvention.cpp.
Referenced by EnzymeFixupJuliaCallingConvention(), needsReReturning(), and needsReRooting().
| #define hasAttribute hasAttributeAtIndex |
Definition at line 18 of file FixupJuliaCallingConvention.cpp.
| #define removeAttribute removeAttributeAtIndex |
Definition at line 16 of file FixupJuliaCallingConvention.cpp.
|
extern |
Referenced by EnzymeFixupJuliaCallingConvention().
| void EnzymeFixupBatchedJuliaCallingConvention | ( | Function * | F | ) |
Definition at line 1321 of file FixupJuliaCallingConvention.cpp.
References GradientUtils::extractMeta().
Referenced by FixupBatchedJuliaCallingConventionNewPM::run().
| void EnzymeFixupJuliaCallingConvention | ( | Function * | F, |
| bool | sret_jlvalue ) |
TODO continue from here down for external rewrites
Definition at line 536 of file FixupJuliaCallingConvention.cpp.
References CountTrackedPointers::all, convertRRootCountFromString(), convertSRetTypeFromString(), convertSRetTypeToString(), copyNonJLValueInto(), CountTrackedPointers::count, CustomErrorHandler, DetectPointerArgOfFn(), EmitFailure(), getAttribute, getBaseObject(), getUnqual(), InternalError, isGuaranteedToFullyWrite(), isOpaque(), isReadOnlyNoCapture(), isWriteOnly(), moveSRetToFromRoots(), needsReReturning(), needsReRooting(), PostCacheStore(), SRetPointerToRootPointer, SRetValueToRootPointer, and Tracked.
Referenced by FixupJuliaCallingConventionNewPM::run().
|
static |
Definition at line 455 of file FixupJuliaCallingConvention.cpp.
References removeRange().
Referenced by EnzymeFixupJuliaCallingConvention().
|
static |
Definition at line 425 of file FixupJuliaCallingConvention.cpp.
Referenced by EnzymeFixupJuliaCallingConvention().
|
static |
Definition at line 450 of file FixupJuliaCallingConvention.cpp.
Referenced by EnzymeFixupJuliaCallingConvention().
| bool needsReReturning | ( | llvm::Argument * | arg, |
| size_t & | sret_idx, | ||
| std::map< size_t, size_t > & | srets_without_stores ) |
Definition at line 386 of file FixupJuliaCallingConvention.cpp.
References convertRRootCountFromString(), and getAttribute.
Referenced by EnzymeFixupJuliaCallingConvention().
| bool needsReRooting | ( | llvm::Argument * | arg, |
| bool & | anyJLStore, | ||
| llvm::Type * | SRetType = nullptr ) |
Definition at line 30 of file FixupJuliaCallingConvention.cpp.
References collectOffset(), convertSRetTypeFromString(), CountTrackedPointers::count, CustomErrorHandler, findAllUsersOf(), GCRewrite, getAttribute, getBaseObject(), and isSpecialPtr().
Referenced by EnzymeFixupJuliaCallingConvention().
| bool registerFixupJuliaPass | ( | StringRef | Name, |
| ModulePassManager & | MPM ) |
Definition at line 1604 of file FixupJuliaCallingConvention.cpp.
|
static |
Definition at line 433 of file FixupJuliaCallingConvention.cpp.
Referenced by isGuaranteedToFullyWrite().