LLVM 22.0.0git
|
#include "llvm/Analysis/InstructionPrecedenceTracking.h"
Public Member Functions | |
const Instruction * | getFirstMemoryWrite (const BasicBlock *BB) |
Returns the topmost instruction that may write memory from the given basic block. | |
bool | mayWriteToMemory (const BasicBlock *BB) |
Returns true if at least one instruction from the given basic block may write memory. | |
bool | isDominatedByMemoryWriteFromSameBlock (const Instruction *Insn) |
Returns true if the first memory writing instruction of Insn's block exists and dominates Insn. | |
bool | isSpecialInstruction (const Instruction *Insn) const override |
A predicate that defines whether or not the instruction Insn is considered special and needs to be tracked. | |
Public Member Functions inherited from llvm::InstructionPrecedenceTracking | |
LLVM_ABI 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 . | |
LLVM_ABI 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. | |
LLVM_ABI void | removeUsersOf (const Instruction *Inst) |
Notifies this tracking that we are going to replace all uses of Inst . | |
LLVM_ABI void | clear () |
Invalidates all information from this tracking. |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::InstructionPrecedenceTracking | |
LLVM_ABI const Instruction * | getFirstSpecialInstruction (const BasicBlock *BB) |
Returns the topmost special instruction from the block BB . | |
LLVM_ABI bool | hasSpecialInstructions (const BasicBlock *BB) |
Returns true iff at least one instruction from the basic block BB is special. | |
LLVM_ABI bool | isPreceededBySpecialInstruction (const Instruction *Insn) |
Returns true iff the first special instruction of Insn's block exists and dominates Insn . | |
virtual | ~InstructionPrecedenceTracking ()=default |
Definition at line 121 of file InstructionPrecedenceTracking.h.
|
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 125 of file InstructionPrecedenceTracking.h.
References llvm::InstructionPrecedenceTracking::getFirstSpecialInstruction().
|
inline |
Returns true if the first memory writing instruction of Insn's block exists and dominates Insn.
Definition at line 137 of file InstructionPrecedenceTracking.h.
References llvm::InstructionPrecedenceTracking::isPreceededBySpecialInstruction().
|
overridevirtual |
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 140 of file InstructionPrecedenceTracking.cpp.
References llvm::PatternMatch::m_Intrinsic(), llvm::PatternMatch::match(), and llvm::Instruction::mayWriteToMemory().
|
inline |
Returns true if at least one instruction from the given basic block may write memory.
Definition at line 131 of file InstructionPrecedenceTracking.h.
References llvm::InstructionPrecedenceTracking::hasSpecialInstructions().