Enzyme main
Loading...
Searching...
No Matches
CacheUtility.h File Reference
#include <llvm/Config/llvm-config.h>
#include "SCEV/ScalarEvolution.h"
#include "SCEV/ScalarEvolutionExpander.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/Instructions.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/Dominators.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Utils/ValueMapper.h"
#include "FunctionUtils.h"
#include "MustExitScalarEvolution.h"
Include dependency graph for CacheUtility.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LoopContext
 Container for all loop information to synthesize gradients. More...
 
class  CacheUtility
 
struct  CacheUtility::LimitContext
 

Enumerations

enum class  UnwrapMode {
  LegalFullUnwrap , LegalFullUnwrapNoTapeReplace , AttemptFullUnwrapWithLookup , AttemptFullUnwrap ,
  AttemptSingleUnwrap
}
 Modes of potential unwraps. More...
 

Functions

static bool operator== (const LoopContext &lhs, const LoopContext &rhs)
 
static llvm::raw_ostream & operator<< (llvm::raw_ostream &os, UnwrapMode mode)
 
std::pair< llvm::PHINode *, llvm::Instruction * > InsertNewCanonicalIV (llvm::Loop *L, llvm::Type *Ty, const llvm::Twine &Name="iv")
 
void RemoveRedundantIVs (llvm::BasicBlock *Header, llvm::PHINode *CanonicalIV, llvm::Instruction *Increment, MustExitScalarEvolution &SE, llvm::function_ref< void(llvm::Instruction *, llvm::Value *)> replacer, llvm::function_ref< void(llvm::Instruction *)> eraser)
 

Variables

llvm::cl::opt< bool > EfficientBoolCache
 Pack 8 bools together in a single byte.
 
llvm::cl::opt< bool > EnzymeZeroCache
 

Enumeration Type Documentation

◆ UnwrapMode

enum class UnwrapMode
strong

Modes of potential unwraps.

Enumerator
LegalFullUnwrap 
LegalFullUnwrapNoTapeReplace 
AttemptFullUnwrapWithLookup 
AttemptFullUnwrap 
AttemptSingleUnwrap 

Definition at line 105 of file CacheUtility.h.

Function Documentation

◆ InsertNewCanonicalIV()

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

◆ operator<<()

static llvm::raw_ostream & operator<< ( llvm::raw_ostream & os,
UnwrapMode mode )
inlinestatic

◆ operator==()

static bool operator== ( const LoopContext & lhs,
const LoopContext & rhs )
inlinestatic

Definition at line 100 of file CacheUtility.h.

References LoopContext::parent.

◆ RemoveRedundantIVs()

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

Variable Documentation

◆ EfficientBoolCache

llvm::cl::opt<bool> EfficientBoolCache
extern

◆ EnzymeZeroCache

llvm::cl::opt<bool> EnzymeZeroCache
extern