|
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/DataFlowFramework.h"#include "mlir/Dialect/LLVMIR/LLVMAttrs.h"#include "mlir/Interfaces/CastInterfaces.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/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 1048 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 66 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 485 of file DataFlowActivityAnalysis.cpp.
Referenced by DenseBackwardActivityAnalysis::visitOperation(), and DenseForwardActivityAnalysis::visitOperation().
| LogicalResult getEffectsForExternalCall | ( | CallOpInterface | call, |
| SmallVectorImpl< MemoryEffects::EffectInstance > & | effects ) |
Definition at line 999 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 396 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 499 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 421 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 475 of file DataFlowActivityAnalysis.cpp.
Referenced by DenseBackwardActivityAnalysis::visitOperation(), and DenseForwardActivityAnalysis::visitOperation().
|
static |
Returns true if the alias transfer function of the operation is fully described by its memory effects.
Definition at line 835 of file DataFlowAliasAnalysis.cpp.
|
static |
Definition at line 263 of file DataFlowAliasAnalysis.cpp.
Referenced by mlir::enzyme::PointsToPointerAnalysis::processCapturingStore(), and mlir::enzyme::PointsToPointerAnalysis::visitOperation().
|
static |
Definition at line 268 of file DataFlowAliasAnalysis.cpp.
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitOperation().
|
static |
Definition at line 50 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 357 of file DataFlowAliasAnalysis.cpp.
References modRefMayRef().
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer(), and mlir::enzyme::AliasAnalysis::visitExternalCall().
|
static |
Definition at line 374 of file DataFlowAliasAnalysis.cpp.
References modRefMayMod().
Referenced by mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer().
|
static |
Definition at line 59 of file DataFlowAliasAnalysis.cpp.
|
static |
Definition at line 345 of file DataFlowAliasAnalysis.cpp.
Referenced by mayWriteArg(), and mlir::enzyme::PointsToPointerAnalysis::visitCallControlFlowTransfer().
|
static |
Definition at line 351 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 981 of file DataFlowAliasAnalysis.cpp.
References isPointerLike().
|
staticconstexpr |
Definition at line 343 of file DataFlowAliasAnalysis.cpp.
Referenced by getFunctionArgModRef(), getFunctionInaccessibleModRef(), and getFunctionOtherModRef().