LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::MemorySSA::CachingWalker Class Referencefinal

A MemorySSAWalker that does AA walks to disambiguate accesses. More...

Inheritance diagram for llvm::MemorySSA::CachingWalker:
Inheritance graph
[legend]
Collaboration diagram for llvm::MemorySSA::CachingWalker:
Collaboration graph
[legend]

Public Member Functions

 CachingWalker (MemorySSA *, AliasAnalysis *, DominatorTree *)
 
 ~CachingWalker () override=default
 
MemoryAccessgetClobberingMemoryAccess (MemoryAccess *) override
 Does the same thing as getClobberingMemoryAccess(const Instruction *I), but takes a MemoryAccess instead of an Instruction. More...
 
MemoryAccessgetClobberingMemoryAccess (MemoryAccess *, const MemoryLocation &) override
 Given a potentially clobbering memory access and a new location, calling this will give you the nearest dominating clobbering MemoryAccess (by skipping non-aliasing def links). More...
 
void invalidateInfo (MemoryAccess *) override
 Given a memory access, invalidate anything this walker knows about that access. More...
 
void setAutoResetWalker (bool AutoReset)
 Whether we call resetClobberWalker() after each time we actually walk to answer a clobber query. More...
 
void resetClobberWalker ()
 Drop the walker's persistent data structures. More...
 
void verify (const MemorySSA *MSSA) override
 
- Public Member Functions inherited from llvm::MemorySSAWalker
 MemorySSAWalker (MemorySSA *)
 
virtual ~MemorySSAWalker ()=default
 
MemoryAccessgetClobberingMemoryAccess (const Instruction *I)
 Given a memory Mod/Ref/ModRef'ing instruction, calling this will give you the nearest dominating MemoryAccess that Mod's the location the instruction accesses (by skipping any def which AA can prove does not alias the location(s) accessed by the instruction given). More...
 

Additional Inherited Members

- Public Types inherited from llvm::MemorySSAWalker
using MemoryAccessSet = SmallVector< MemoryAccess *, 8 >
 
- Protected Attributes inherited from llvm::MemorySSAWalker
MemorySSAMSSA
 

Detailed Description

A MemorySSAWalker that does AA walks to disambiguate accesses.

It no longer does caching on its own, but the name has been retained for the moment.

Definition at line 890 of file MemorySSA.cpp.

Constructor & Destructor Documentation

◆ CachingWalker()

MemorySSA::CachingWalker::CachingWalker ( MemorySSA M,
AliasAnalysis A,
DominatorTree D 
)

Definition at line 1980 of file MemorySSA.cpp.

◆ ~CachingWalker()

llvm::MemorySSA::CachingWalker::~CachingWalker ( )
overridedefault

Member Function Documentation

◆ getClobberingMemoryAccess() [1/2]

MemoryAccess * MemorySSA::CachingWalker::getClobberingMemoryAccess ( MemoryAccess )
overridevirtual

◆ getClobberingMemoryAccess() [2/2]

MemoryAccess * MemorySSA::CachingWalker::getClobberingMemoryAccess ( MemoryAccess ,
const MemoryLocation  
)
overridevirtual

Given a potentially clobbering memory access and a new location, calling this will give you the nearest dominating clobbering MemoryAccess (by skipping non-aliasing def links).

This version of the function is mainly used to disambiguate phi translated pointers, where the value of a pointer may have changed from the initial memory access. Note that this expects to be handed either a MemoryUse, or an already potentially clobbering access. Unlike the above API, if given a MemoryDef that clobbers the pointer as the starting access, it will return that MemoryDef, whereas the above would return the clobber starting from the use side of the memory def.

Implements llvm::MemorySSAWalker.

Definition at line 2006 of file MemorySSA.cpp.

References llvm::dbgs(), DEBUG, I, llvm::Instruction::isFenceLike(), llvm::MemorySSA::isLiveOnEntryDef(), and llvm::MemorySSAWalker::MSSA.

◆ invalidateInfo()

void MemorySSA::CachingWalker::invalidateInfo ( MemoryAccess )
overridevirtual

Given a memory access, invalidate anything this walker knows about that access.

This API is used by walkers that store information to perform basic cache invalidation. This will be called by MemorySSA at appropriate times for the walker it uses or returns.

Reimplemented from llvm::MemorySSAWalker.

Definition at line 1984 of file MemorySSA.cpp.

References assert(), and resetClobberWalker().

◆ resetClobberWalker()

void llvm::MemorySSA::CachingWalker::resetClobberWalker ( )
inline

Drop the walker's persistent data structures.

Definition at line 913 of file MemorySSA.cpp.

Referenced by invalidateInfo().

◆ setAutoResetWalker()

void llvm::MemorySSA::CachingWalker::setAutoResetWalker ( bool  AutoReset)
inline

Whether we call resetClobberWalker() after each time we actually walk to answer a clobber query.

Definition at line 910 of file MemorySSA.cpp.

◆ verify()

void llvm::MemorySSA::CachingWalker::verify ( const MemorySSA MSSA)
inlineoverridevirtual

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