Enzyme main
Loading...
Searching...
No Matches
DataFlowActivityAnalysis.cpp File Reference
#include "DataFlowActivityAnalysis.h"
#include "DataFlowAliasAnalysis.h"
#include "Dialect/Ops.h"
#include "Interfaces/AutoDiffOpInterface.h"
#include "Interfaces/AutoDiffTypeInterface.h"
#include "mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h"
#include "mlir/Analysis/DataFlow/DeadCodeAnalysis.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/Linalg/IR/Linalg.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Analysis/AliasAnalysis/LocalAliasAnalysis.h"
Include dependency graph for DataFlowActivityAnalysis.cpp:

Go to the source code of this file.

Functions

raw_ostream & operator<< (raw_ostream &os, const enzyme::ValueActivity &val)
 
raw_ostream & operator<< (raw_ostream &os, const CallControlFlowAction &action)
 
std::optional< Value > getStored (Operation *op)
 
std::optional< Value > getCopySource (Operation *op)
 
void forEachAliasedAlloc (const AliasClassLattice *ptrAliasClass, function_ref< void(DistinctAttr)> forEachFn)
 The dense analyses operate using a pointer's "canonical allocation", the Value corresponding to its allocation.
 
void traverseCallGraph (FunctionOpInterface root, SymbolTableCollection *symbolTable, function_ref< void(FunctionOpInterface)> processFunc)
 
void printActivityAnalysisResults (DataFlowSolver &solver, FunctionOpInterface callee, const SmallPtrSet< Operation *, 2 > &returnOps, SymbolTableCollection *symbolTable, bool verbose, bool annotate)
 

Function Documentation

◆ forEachAliasedAlloc()

void forEachAliasedAlloc ( const AliasClassLattice * ptrAliasClass,
function_ref< void(DistinctAttr)> forEachFn )

The dense analyses operate using a pointer's "canonical allocation", the Value corresponding to its allocation.

The callback may receive null allocation when the class alias set is unknown. If the classes are undefined, the callback will not be called at all.

Definition at line 232 of file DataFlowActivityAnalysis.cpp.

Referenced by mlir::enzyme::DenseBackwardActivityAnalysis::visitOperation(), and mlir::enzyme::DenseForwardActivityAnalysis::visitOperation().

◆ getCopySource()

◆ getStored()

◆ operator<<() [1/2]

raw_ostream & operator<< ( raw_ostream & os,
const CallControlFlowAction & action )

Definition at line 53 of file DataFlowActivityAnalysis.cpp.

◆ operator<<() [2/2]

raw_ostream & operator<< ( raw_ostream & os,
const enzyme::ValueActivity & val )

Definition at line 48 of file DataFlowActivityAnalysis.cpp.

References mlir::enzyme::ValueActivity::print().

◆ printActivityAnalysisResults()

void printActivityAnalysisResults ( DataFlowSolver & solver,
FunctionOpInterface callee,
const SmallPtrSet< Operation *, 2 > & returnOps,
SymbolTableCollection * symbolTable,
bool verbose,
bool annotate )

◆ traverseCallGraph()

void traverseCallGraph ( FunctionOpInterface root,
SymbolTableCollection * symbolTable,
function_ref< void(FunctionOpInterface)> processFunc )

Definition at line 242 of file DataFlowActivityAnalysis.cpp.