LLVM  16.0.0git
llvm::DoNothingMemorySSAWalker Class Referencefinal

A MemorySSAWalker that does no alias queries, or anything else. More...

#include "llvm/Analysis/MemorySSA.h"

Inheritance diagram for llvm::DoNothingMemorySSAWalker:
[legend]
Collaboration diagram for llvm::DoNothingMemorySSAWalker:
[legend]

Public Member Functions

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

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

virtual MemoryAccessgetClobberingMemoryAccess (MemoryAccess *)=0
Does the same thing as getClobberingMemoryAccess(const Instruction *I), but takes a MemoryAccess instead of an Instruction. More...

virtual MemoryAccessgetClobberingMemoryAccess (MemoryAccess *, const MemoryLocation &)=0
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...

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

virtual void invalidateInfo (MemoryAccess *)
Given a memory access, invalidate anything this walker knows about that access. More...

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

Protected Attributes inherited from llvm::MemorySSAWalker
MemorySSAMSSA

Detailed Description

A MemorySSAWalker that does no alias queries, or anything else.

It simply returns the links as they were constructed by the builder.

Definition at line 1083 of file MemorySSA.h.

◆ getClobberingMemoryAccess() [1/5]

 MemoryAccess* llvm::MemorySSAWalker::getClobberingMemoryAccess
inline

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).

Note that this will return a single access, and it must dominate the Instruction, so if an operand of a MemoryPhi node Mod's the instruction, this will return the MemoryPhi, not the operand. This means that given: if (a) { 1 = MemoryDef(liveOnEntry) store a } else { 2 = MemoryDef(liveOnEntry) store b } 3 = MemoryPhi(2, 1) MemoryUse(3) load a

calling this API on load(a) will return the MemoryPhi, not the MemoryDef in the if (a) branch.

Definition at line 1044 of file MemorySSA.h.

◆ getClobberingMemoryAccess() [2/5]

 MemoryAccess * DoNothingMemorySSAWalker::getClobberingMemoryAccess ( MemoryAccess * )
overridevirtual

Does the same thing as getClobberingMemoryAccess(const Instruction *I), but takes a MemoryAccess instead of an Instruction.

Implements llvm::MemorySSAWalker.

Definition at line 2602 of file MemorySSA.cpp.

◆ getClobberingMemoryAccess() [3/5]

 virtual MemoryAccess* llvm::MemorySSAWalker::getClobberingMemoryAccess

Does the same thing as getClobberingMemoryAccess(const Instruction *I), but takes a MemoryAccess instead of an Instruction.

◆ getClobberingMemoryAccess() [4/5]

 MemoryAccess * DoNothingMemorySSAWalker::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 2608 of file MemorySSA.cpp.

◆ getClobberingMemoryAccess() [5/5]

 virtual MemoryAccess* llvm::MemorySSAWalker::getClobberingMemoryAccess

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.

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