Enzyme main
Loading...
Searching...
No Matches
CacheUtility.cpp File Reference
#include "CacheUtility.h"
#include "FunctionUtils.h"
Include dependency graph for CacheUtility.cpp:

Go to the source code of this file.

Functions

llvm::cl::opt< bool > EfficientBoolCache ("enzyme-smallbool", cl::init(false), cl::Hidden, cl::desc("Place 8 bools together in a single byte"))
 Pack 8 bools together in a single byte.
 
llvm::cl::opt< bool > EnzymeZeroCache ("enzyme-zero-cache", cl::init(false), cl::Hidden, cl::desc("Zero initialize the cache"))
 
llvm::cl::opt< bool > EnzymePrintPerf ("enzyme-print-perf", cl::init(false), cl::Hidden, cl::desc("Enable Enzyme to print performance info"))
 
llvm::cl::opt< bool > EfficientMaxCache ("enzyme-max-cache", cl::init(false), cl::Hidden, cl::desc("Avoid reallocs when possible by potentially overallocating cache"))
 
std::pair< PHINode *, Instruction * > InsertNewCanonicalIV (Loop *L, Type *Ty, const llvm::Twine &Name)
 
std::pair< PHINode *, Instruction * > FindCanonicalIV (Loop *L, Type *Ty)
 
void RemoveRedundantIVs (BasicBlock *Header, PHINode *CanonicalIV, Instruction *Increment, MustExitScalarEvolution &SE, llvm::function_ref< void(Instruction *, Value *)> replacer, llvm::function_ref< void(Instruction *)> eraser)
 
void CanonicalizeLatches (const Loop *L, BasicBlock *Header, BasicBlock *Preheader, PHINode *CanonicalIV, MustExitScalarEvolution &SE, CacheUtility &gutils, Instruction *Increment, ArrayRef< BasicBlock * > latches)
 

Function Documentation

◆ CanonicalizeLatches()

void CanonicalizeLatches ( const Loop * L,
BasicBlock * Header,
BasicBlock * Preheader,
PHINode * CanonicalIV,
MustExitScalarEvolution & SE,
CacheUtility & gutils,
Instruction * Increment,
ArrayRef< BasicBlock * > latches )

Definition at line 317 of file CacheUtility.cpp.

Referenced by CacheUtility::getContext().

◆ EfficientBoolCache()

llvm::cl::opt< bool > EfficientBoolCache ( "enzyme-smallbool" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Place 8 bools together in a single byte")  )

Pack 8 bools together in a single byte.

◆ EfficientMaxCache()

llvm::cl::opt< bool > EfficientMaxCache ( "enzyme-max-cache" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Avoid reallocs when possible by potentially overallocating cache")  )

◆ EnzymePrintPerf()

llvm::cl::opt< bool > EnzymePrintPerf ( "enzyme-print-perf" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Enable Enzyme to print performance info")  )

◆ EnzymeZeroCache()

llvm::cl::opt< bool > EnzymeZeroCache ( "enzyme-zero-cache" ,
cl::init(false) ,
cl::Hidden ,
cl::desc("Zero initialize the cache")  )

◆ FindCanonicalIV()

std::pair< PHINode *, Instruction * > FindCanonicalIV ( Loop * L,
Type * Ty )

Definition at line 150 of file CacheUtility.cpp.

References getFirstNonPHIOrDbg().

Referenced by CacheUtility::getContext().

◆ InsertNewCanonicalIV()

std::pair< PHINode *, Instruction * > InsertNewCanonicalIV ( Loop * L,
Type * Ty,
const llvm::Twine & Name )

Definition at line 122 of file CacheUtility.cpp.

Referenced by CanonicalizeLoops().

◆ RemoveRedundantIVs()

void RemoveRedundantIVs ( BasicBlock * Header,
PHINode * CanonicalIV,
Instruction * Increment,
MustExitScalarEvolution & SE,
llvm::function_ref< void(Instruction *, Value *)> replacer,
llvm::function_ref< void(Instruction *)> eraser )

Definition at line 208 of file CacheUtility.cpp.

Referenced by CanonicalizeLoops().