class CodeExtractorAnalysisCache
Declaration
class CodeExtractorAnalysisCache { /* full declaration omitted */ };
Description
A cache for the CodeExtractor analysis. The operation \ref CodeExtractor::extractCodeRegion is guaranteed not to invalidate this object. This object should conservatively be considered invalid if any other mutating operations on the IR occur. Constructing this object is O(n) in the size of the function.
Declared at: llvm/include/llvm/Transforms/Utils/CodeExtractor.h:46
Member Variables
- private SmallVector<llvm::AllocaInst*, 16> Allocas
- The allocas in the function.
- private DenseMap<llvm::BasicBlock*, DenseSet<llvm::Value*>> BaseMemAddrs
- Base memory addresses of load/store instructions, grouped by block.
- private DenseSet<llvm::BasicBlock*> SideEffectingBlocks
- Blocks which contain instructions which may have unknown side-effects on memory.
Method Overview
- public CodeExtractorAnalysisCache(llvm::Function & F)
- public bool doesBlockContainClobberOfAddr(llvm::BasicBlock & BB, llvm::AllocaInst * Addr) const
- private void findSideEffectInfoForBlock(llvm::BasicBlock & BB)
- public ArrayRef<llvm::AllocaInst *> getAllocas() const
Methods
¶CodeExtractorAnalysisCache(llvm::Function& F)
CodeExtractorAnalysisCache(llvm::Function& F)
Declared at: llvm/include/llvm/Transforms/Utils/CodeExtractor.h:60
Parameters
¶bool doesBlockContainClobberOfAddr(
llvm::BasicBlock& BB,
llvm::AllocaInst* Addr) const
bool doesBlockContainClobberOfAddr(
llvm::BasicBlock& BB,
llvm::AllocaInst* Addr) const
Description
Check whether \p BB contains an instruction thought to load from, store to, or otherwise clobber the alloca \p Addr.
Declared at: llvm/include/llvm/Transforms/Utils/CodeExtractor.h:69
Parameters
- llvm::BasicBlock& BB
- llvm::AllocaInst* Addr
¶void findSideEffectInfoForBlock(
llvm::BasicBlock& BB)
void findSideEffectInfoForBlock(
llvm::BasicBlock& BB)
Declared at: llvm/include/llvm/Transforms/Utils/CodeExtractor.h:57
Parameters
- llvm::BasicBlock& BB
¶ArrayRef<llvm::AllocaInst*> getAllocas() const
ArrayRef<llvm::AllocaInst*> getAllocas() const
Description
Get the allocas in the function at the time the analysis was created. Note that some of these allocas may no longer be present in the function, due to \ref CodeExtractor::extractCodeRegion.
Declared at: llvm/include/llvm/Transforms/Utils/CodeExtractor.h:65