LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::MemoryWriteTracking Class Reference

#include "llvm/Analysis/InstructionPrecedenceTracking.h"

Inheritance diagram for llvm::MemoryWriteTracking:
Inheritance graph
[legend]
Collaboration diagram for llvm::MemoryWriteTracking:
Collaboration graph
[legend]

Public Member Functions

 MemoryWriteTracking (DominatorTree *DT)
 
const InstructiongetFirstMemoryWrite (const BasicBlock *BB)
 Returns the topmost instruction that may write memory from the given basic block. More...
 
bool mayWriteToMemory (const BasicBlock *BB)
 Returns true if at least one instruction from the given basic block may write memory. More...
 
bool isDominatedByMemoryWriteFromSameBlock (const Instruction *Insn)
 Returns true if the first memory writing instruction of Insn's block exists and dominates Insn. More...
 
virtual bool isSpecialInstruction (const Instruction *Insn) const
 A predicate that defines whether or not the instruction Insn is considered special and needs to be tracked. More...
 
- Public Member Functions inherited from llvm::InstructionPrecedenceTracking
void insertInstructionTo (const Instruction *Inst, const BasicBlock *BB)
 Notifies this tracking that we are going to insert a new instruction Inst to the basic block BB. More...
 
void removeInstruction (const Instruction *Inst)
 Notifies this tracking that we are going to remove the instruction Inst It makes all necessary updates to internal caches to keep them consistent. More...
 
void clear ()
 Invalidates all information from this tracking. More...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::InstructionPrecedenceTracking
 InstructionPrecedenceTracking (DominatorTree *DT)
 
const InstructiongetFirstSpecialInstruction (const BasicBlock *BB)
 Returns the topmost special instruction from the block BB. More...
 
bool hasSpecialInstructions (const BasicBlock *BB)
 Returns true iff at least one instruction from the basic block BB is special. More...
 
bool isPreceededBySpecialInstruction (const Instruction *Insn)
 Returns true iff the first special instruction of Insn's block exists and dominates Insn. More...
 
virtual ~InstructionPrecedenceTracking ()=default
 

Detailed Description

Definition at line 122 of file InstructionPrecedenceTracking.h.

Constructor & Destructor Documentation

◆ MemoryWriteTracking()

llvm::MemoryWriteTracking::MemoryWriteTracking ( DominatorTree DT)
inline

Definition at line 124 of file InstructionPrecedenceTracking.h.

Member Function Documentation

◆ getFirstMemoryWrite()

const Instruction* llvm::MemoryWriteTracking::getFirstMemoryWrite ( const BasicBlock BB)
inline

Returns the topmost instruction that may write memory from the given basic block.

Returns nullptr if there is no such instructions in the block.

Definition at line 128 of file InstructionPrecedenceTracking.h.

References llvm::InstructionPrecedenceTracking::getFirstSpecialInstruction().

◆ isDominatedByMemoryWriteFromSameBlock()

bool llvm::MemoryWriteTracking::isDominatedByMemoryWriteFromSameBlock ( const Instruction Insn)
inline

Returns true if the first memory writing instruction of Insn's block exists and dominates Insn.

Definition at line 140 of file InstructionPrecedenceTracking.h.

References llvm::InstructionPrecedenceTracking::isPreceededBySpecialInstruction(), and llvm::InstructionPrecedenceTracking::isSpecialInstruction().

◆ isSpecialInstruction()

bool MemoryWriteTracking::isSpecialInstruction ( const Instruction Insn) const
virtual

A predicate that defines whether or not the instruction Insn is considered special and needs to be tracked.

Implementing this method in children classes allows to implement tracking of implicit control flow, memory writing instructions or any other kinds of instructions we might be interested in.

Implements llvm::InstructionPrecedenceTracking.

Definition at line 154 of file InstructionPrecedenceTracking.cpp.

References llvm::PatternMatch::match(), and llvm::Instruction::mayWriteToMemory().

◆ mayWriteToMemory()

bool llvm::MemoryWriteTracking::mayWriteToMemory ( const BasicBlock BB)
inline

Returns true if at least one instruction from the given basic block may write memory.

Definition at line 134 of file InstructionPrecedenceTracking.h.

References llvm::InstructionPrecedenceTracking::hasSpecialInstructions().


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