LLVM 19.0.0git
Public Member Functions | List of all members
llvm::CodeExtractorAnalysisCache Class Reference

A cache for the CodeExtractor analysis. More...

#include "llvm/Transforms/Utils/CodeExtractor.h"

Public Member Functions

 CodeExtractorAnalysisCache (Function &F)
 
ArrayRef< AllocaInst * > getAllocas () const
 Get the allocas in the function at the time the analysis was created.
 
bool doesBlockContainClobberOfAddr (BasicBlock &BB, AllocaInst *Addr) const
 Check whether BB contains an instruction thought to load from, store to, or otherwise clobber the alloca Addr.
 

Detailed Description

A cache for the CodeExtractor analysis.

The operation 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.

Definition at line 46 of file CodeExtractor.h.

Constructor & Destructor Documentation

◆ CodeExtractorAnalysisCache()

CodeExtractorAnalysisCache::CodeExtractorAnalysisCache ( Function F)

Definition at line 310 of file CodeExtractor.cpp.

References F.

Member Function Documentation

◆ doesBlockContainClobberOfAddr()

bool CodeExtractorAnalysisCache::doesBlockContainClobberOfAddr ( BasicBlock BB,
AllocaInst Addr 
) const

Check whether BB contains an instruction thought to load from, store to, or otherwise clobber the alloca Addr.

Definition at line 363 of file CodeExtractor.cpp.

References Addr.

Referenced by llvm::CodeExtractor::isLegalToShrinkwrapLifetimeMarkers().

◆ getAllocas()

ArrayRef< AllocaInst * > llvm::CodeExtractorAnalysisCache::getAllocas ( ) const
inline

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 CodeExtractor::extractCodeRegion.

Definition at line 65 of file CodeExtractor.h.

Referenced by llvm::CodeExtractor::findAllocas().


The documentation for this class was generated from the following files: