Enzyme main
Loading...
Searching...
No Matches
ActivityAnnotations.cpp File Reference
#include "ActivityAnnotations.h"
#include "DataFlowAliasAnalysis.h"
#include "DataFlowLattice.h"
#include "Dialect/Dialect.h"
#include "Dialect/Ops.h"
#include "Interfaces/AutoDiffOpInterface.h"
#include "mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h"
#include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h"
#include "mlir/Analysis/DataFlow/DenseAnalysis.h"
#include "mlir/Analysis/DataFlow/SparseAnalysis.h"
#include "mlir/Analysis/DataFlowFramework.h"
#include "mlir/Interfaces/FunctionInterfaces.h"
#include "llvm/Support/raw_ostream.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
Include dependency graph for ActivityAnnotations.cpp:

Go to the source code of this file.

Functions

static bool isPossiblyActive (Type type)
 
static bool isFullyActive (Operation *op)
 True iff all results differentially depend on all operands.
 
void deserializeReturnOrigins (ArrayAttr returnOrigins, SmallVectorImpl< enzyme::ValueOriginSet > &out)
 
static void traversePointsToSets (const enzyme::AliasClassSet &start, const enzyme::PointsToSets &pointsToSets, function_ref< void(DistinctAttr)> visit)
 Visit everything transitively pointed-to by any pointer in start.
 
template<typename KeyT , typename ElementT >
void printMapOfSetsLattice (const DenseMap< KeyT, enzyme::SetLattice< ElementT > > map, raw_ostream &os)
 
std::optional< Value > getStored (Operation *op)
 
std::optional< Value > getCopySource (Operation *op)
 
static void deserializePointsTo (ArrayAttr summaryAttr, DenseMap< DistinctAttr, enzyme::ValueOriginSet > &summaryMap)
 

Function Documentation

◆ deserializePointsTo()

◆ deserializeReturnOrigins()

◆ getCopySource()

◆ getStored()

◆ isFullyActive()

static bool isFullyActive ( Operation * op)
static

True iff all results differentially depend on all operands.

Definition at line 70 of file ActivityAnnotations.cpp.

Referenced by mlir::enzyme::BackwardActivityAnnotationAnalysis::visitOperation(), and mlir::enzyme::ForwardActivityAnnotationAnalysis::visitOperation().

◆ isPossiblyActive()

◆ printMapOfSetsLattice()

template<typename KeyT , typename ElementT >
void printMapOfSetsLattice ( const DenseMap< KeyT, enzyme::SetLattice< ElementT > > map,
raw_ostream & os )

◆ traversePointsToSets()

static void traversePointsToSets ( const enzyme::AliasClassSet & start,
const enzyme::PointsToSets & pointsToSets,
function_ref< void(DistinctAttr)> visit )
static

Visit everything transitively pointed-to by any pointer in start.

Definition at line 190 of file ActivityAnnotations.cpp.

References mlir::enzyme::PointsToSets::getPointsTo().

Referenced by mlir::enzyme::runActivityAnnotations(), and mlir::enzyme::DenseBackwardActivityAnnotationAnalysis::setToExitState().