|
Enzyme main
|
#include "DataFlowAliasAnalysis.h"#include "Dialect/Dialect.h"#include "Dialect/Ops.h"#include "mlir/Analysis/AliasAnalysis.h"#include "mlir/Analysis/DataFlow/DenseAnalysis.h"#include "mlir/Analysis/DataFlow/SparseAnalysis.h"#include "mlir/Analysis/DataFlow/Utils.h"#include "mlir/Analysis/DataFlowFramework.h"#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"#include "mlir/Interfaces/FunctionInterfaces.h"#include "mlir/Interfaces/SideEffectInterfaces.h"#include "mlir/Interfaces/ViewLikeInterface.h"#include "mlir/Dialect/LLVMIR/LLVMDialect.h"#include "mlir/Dialect/Affine/IR/AffineOps.h"#include "mlir/Dialect/MemRef/IR/MemRef.h"#include "llvm/ADT/SetOperations.h"
Go to the source code of this file.
Functions | |
| static bool | isPointerLike (Type type) |
| template<typename T > | |
| static ChangeResult | mergeSets (DenseSet< T > &dest, const DenseSet< T > &src) |
| static void | deserializePointsTo (ArrayAttr summaryAttr, DenseMap< DistinctAttr, enzyme::AliasClassSet > &summaryMap) |
| std::optional< Value > | getStored (Operation *op) |
| std::optional< Value > | getCopySource (Operation *op) |
| static bool | isMustStore (Operation *op, Value pointer) |
| static bool | isNoOp (Operation *op) |
| static bool | modRefMayMod (std::optional< LLVM::ModRefInfo > modRef) |
| static bool | modRefMayRef (std::optional< LLVM::ModRefInfo > modRef) |
| static bool | mayReadArg (FunctionOpInterface callee, unsigned argNo, std::optional< LLVM::ModRefInfo > argMemMRI) |
| static bool | mayWriteArg (FunctionOpInterface callee, unsigned argNo, std::optional< LLVM::ModRefInfo > argMemMRI) |
| static std::optional< LLVM::ModRefInfo > | getFunctionArgModRef (FunctionOpInterface func) |
| Returns information indicating whether the function may read or write into the memory pointed to by its arguments. | |
| static std::optional< LLVM::ModRefInfo > | getFunctionOtherModRef (FunctionOpInterface func) |
| Returns information indicating whether the function may read or write into the memory other than that pointed to by its arguments, though still accessible from (any) calling context. | |
| static std::optional< LLVM::ModRefInfo > | getFunctionInaccessibleModRef (FunctionOpInterface func) |
| Returns information indicating whether the function may read or write into memory previously inaccessible in the calling context. | |
| static bool | isAliasTransferFullyDescribedByMemoryEffects (Operation *op) |
Returns true if the alias transfer function of the operation is fully described by its memory effects. | |
| void | populateConservativeCallEffects (CallOpInterface call, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
| LogicalResult | getEffectsForExternalCall (CallOpInterface call, SmallVectorImpl< MemoryEffects::EffectInstance > &effects) |
| static void | deserializeAliasSummary (ArrayAttr summary, SmallVectorImpl< enzyme::AliasClassSet > &out) |
Variables | |
| static constexpr llvm::StringLiteral | kLLVMMemoryAttrName = "memory_effects" |
|
static |
Definition at line 1038 of file DataFlowAliasAnalysis.cpp.
References mlir::enzyme::SetLattice< DistinctAttr >::getUndefined(), mlir::enzyme::SetLattice< DistinctAttr >::getUnknown(), mlir::enzyme::SetLattice< ValueT >::insert(), mlir::enzyme::undefinedSetString, and mlir::enzyme::unknownSetString.
Referenced by mlir::enzyme::AliasAnalysis::visitExternalCall().
|
static |
Definition at line 67 of file DataFlowAliasAnalysis.cpp.
References mlir::enzyme::SetLattice< DistinctAttr >::getUndefined(), mlir::enzyme::undefinedSetString, and mlir::enzyme::unknownSetString.
| std::optional< Value > getCopySource | ( | Operation * | op | ) |
Definition at line 220 of file DataFlowActivityAnalysis.cpp.
| LogicalResult getEffectsForExternalCall | ( | CallOpInterface | call, |
| SmallVectorImpl< MemoryEffects::EffectInstance > & | effects ) |
Definition at line 989 of file DataFlowAliasAnalysis.cpp.
Referenced by mlir::enzyme::AliasAnalysis::visitExternalCall().
|
static |
Returns information indicating whether the function may read or write into the memory pointed to by its arguments.
When unknown, returns nullopt.
Definition at line 374 of file DataFlowAliasAnalysis.cpp.
References kLLVMMemoryAttrName.
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer(), and mlir::enzyme::AliasAnalysis::visitExternalCall().
|
static |
Returns information indicating whether the function may read or write into memory previously inaccessible in the calling context.
When unknown, returns nullopt.
Definition at line 487 of file DataFlowAliasAnalysis.cpp.
References kLLVMMemoryAttrName.
Referenced by mlir::enzyme::AliasAnalysis::visitExternalCall().
|
static |
Returns information indicating whether the function may read or write into the memory other than that pointed to by its arguments, though still accessible from (any) calling context.
When unknown, returns nullopt.
Definition at line 399 of file DataFlowAliasAnalysis.cpp.
References kLLVMMemoryAttrName.
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer(), and mlir::enzyme::AliasAnalysis::visitExternalCall().
| std::optional< Value > getStored | ( | Operation * | op | ) |
Definition at line 204 of file DataFlowActivityAnalysis.cpp.
|
static |
Returns true if the alias transfer function of the operation is fully described by its memory effects.
Definition at line 823 of file DataFlowAliasAnalysis.cpp.
|
static |
Definition at line 241 of file DataFlowAliasAnalysis.cpp.
Referenced by mlir::enzyme::PointsToPointerAnalysis::processCapturingStore(), and mlir::enzyme::PointsToPointerAnalysis::visitOperation().
|
static |
Definition at line 246 of file DataFlowAliasAnalysis.cpp.
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitOperation().
|
static |
Definition at line 51 of file DataFlowAliasAnalysis.cpp.
Referenced by populateConservativeCallEffects(), mlir::enzyme::AliasAnalysis::setToEntryState(), mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer(), mlir::enzyme::AliasAnalysis::visitExternalCall(), and mlir::enzyme::AliasAnalysis::visitOperation().
|
static |
Definition at line 335 of file DataFlowAliasAnalysis.cpp.
References modRefMayRef().
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer(), and mlir::enzyme::AliasAnalysis::visitExternalCall().
|
static |
Definition at line 352 of file DataFlowAliasAnalysis.cpp.
References modRefMayMod().
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer().
|
static |
Definition at line 60 of file DataFlowAliasAnalysis.cpp.
|
static |
Definition at line 323 of file DataFlowAliasAnalysis.cpp.
Referenced by mayWriteArg(), and mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer().
|
static |
Definition at line 329 of file DataFlowAliasAnalysis.cpp.
Referenced by mayReadArg(), mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer(), and mlir::enzyme::AliasAnalysis::visitExternalCall().
| void populateConservativeCallEffects | ( | CallOpInterface | call, |
| SmallVectorImpl< MemoryEffects::EffectInstance > & | effects ) |
Definition at line 971 of file DataFlowAliasAnalysis.cpp.
References isPointerLike().
|
staticconstexpr |
Definition at line 321 of file DataFlowAliasAnalysis.cpp.
Referenced by getFunctionArgModRef(), getFunctionInaccessibleModRef(), and getFunctionOtherModRef().