class InstructionPrecedenceTracking
Declaration
class InstructionPrecedenceTracking { /* full declaration omitted */ };
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:30
Member Variables
- private DenseMap<const llvm::BasicBlock*, const llvm::Instruction*> FirstSpecialInsts
Method Overview
- public void clear()
- private void fill(const llvm::BasicBlock * BB)
- protected const llvm::Instruction * getFirstSpecialInstruction(const llvm::BasicBlock * BB)
- protected bool hasSpecialInstructions(const llvm::BasicBlock * BB)
- public void insertInstructionTo(const llvm::Instruction * Inst, const llvm::BasicBlock * BB)
- protected bool isPreceededBySpecialInstruction(const llvm::Instruction * Insn)
- protected virtual bool isSpecialInstruction(const llvm::Instruction * Insn) const
- public void removeInstruction(const llvm::Instruction * Inst)
- public void removeUsersOf(const llvm::Instruction * Inst)
- private void validate(const llvm::BasicBlock * BB) const
- private void validateAll() const
- protected virtual ~InstructionPrecedenceTracking()
Methods
¶void clear()
void clear()
Description
Invalidates all information from this tracking.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:89
¶void fill(const llvm::BasicBlock* BB)
void fill(const llvm::BasicBlock* BB)
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:37
Parameters
- const llvm::BasicBlock* BB
¶const llvm::Instruction*
getFirstSpecialInstruction(
const llvm::BasicBlock* BB)
const llvm::Instruction*
getFirstSpecialInstruction(
const llvm::BasicBlock* BB)
Description
Returns the topmost special instruction from the block \p BB. Returns nullptr if there is no special instructions in the block.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:54
Parameters
- const llvm::BasicBlock* BB
¶bool hasSpecialInstructions(
const llvm::BasicBlock* BB)
bool hasSpecialInstructions(
const llvm::BasicBlock* BB)
Description
Returns true iff at least one instruction from the basic block \p BB is special.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:58
Parameters
- const llvm::BasicBlock* BB
¶void insertInstructionTo(
const llvm::Instruction* Inst,
const llvm::BasicBlock* BB)
void insertInstructionTo(
const llvm::Instruction* Inst,
const llvm::BasicBlock* BB)
Description
Notifies this tracking that we are going to insert a new instruction \p Inst to the basic block \p BB. It makes all necessary updates to internal caches to keep them consistent.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:77
Parameters
- const llvm::Instruction* Inst
- const llvm::BasicBlock* BB
¶bool isPreceededBySpecialInstruction(
const llvm::Instruction* Insn)
bool isPreceededBySpecialInstruction(
const llvm::Instruction* Insn)
Description
Returns true iff the first special instruction of \p Insn's block exists and dominates \p Insn.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:62
Parameters
- const llvm::Instruction* Insn
¶virtual bool isSpecialInstruction(
const llvm::Instruction* Insn) const
virtual bool isSpecialInstruction(
const llvm::Instruction* Insn) const
Description
A predicate that defines whether or not the instruction \p 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.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:69
Parameters
- const llvm::Instruction* Insn
¶void removeInstruction(
const llvm::Instruction* Inst)
void removeInstruction(
const llvm::Instruction* Inst)
Description
Notifies this tracking that we are going to remove the instruction \p Inst It makes all necessary updates to internal caches to keep them consistent.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:81
Parameters
- const llvm::Instruction* Inst
¶void removeUsersOf(const llvm::Instruction* Inst)
void removeUsersOf(const llvm::Instruction* Inst)
Description
Notifies this tracking that we are going to replace all uses of \p Inst. It makes all necessary updates to internal caches to keep them consistent. Should typically be called before a RAUW.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:86
Parameters
- const llvm::Instruction* Inst
¶void validate(const llvm::BasicBlock* BB) const
void validate(const llvm::BasicBlock* BB) const
Description
Asserts that the cached info for \p BB is up-to-date. This helps to catch the usage error of accessing a block without properly invalidating after a previous transform.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:43
Parameters
- const llvm::BasicBlock* BB
¶void validateAll() const
void validateAll() const
Description
Asserts whether or not the contents of this tracking is up-to-date. This helps to catch the usage error of accessing a block without properly invalidating after a previous transform.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:48
¶virtual ~InstructionPrecedenceTracking()
virtual ~InstructionPrecedenceTracking()
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:71