|
LLVM
10.0.0
|
#include "llvm/Analysis/InstructionPrecedenceTracking.h"
Public Member Functions | |
| 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... | |
Protected Member Functions | |
| InstructionPrecedenceTracking (DominatorTree *DT) | |
| const Instruction * | getFirstSpecialInstruction (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 bool | isSpecialInstruction (const Instruction *Insn) const =0 |
A predicate that defines whether or not the instruction Insn is considered special and needs to be tracked. More... | |
| virtual | ~InstructionPrecedenceTracking ()=default |
Definition at line 28 of file InstructionPrecedenceTracking.h.
|
inlineprotected |
Definition at line 52 of file InstructionPrecedenceTracking.h.
References clear(), getFirstSpecialInstruction(), hasSpecialInstructions(), insertInstructionTo(), isPreceededBySpecialInstruction(), isSpecialInstruction(), removeInstruction(), and ~InstructionPrecedenceTracking().
|
protectedvirtualdefault |
Referenced by InstructionPrecedenceTracking().
| void InstructionPrecedenceTracking::clear | ( | ) |
Invalidates all information from this tracking.
Definition at line 116 of file InstructionPrecedenceTracking.cpp.
References llvm::OrderedInstructions::invalidateBlock().
Referenced by InstructionPrecedenceTracking().
|
protected |
Returns the topmost special instruction from the block BB.
Returns nullptr if there is no special instructions in the block.
Definition at line 35 of file InstructionPrecedenceTracking.cpp.
References assert(), ExpensiveAsserts, and llvm::RISCVFeatures::validate().
Referenced by llvm::ImplicitControlFlowTracking::getFirstICFI(), llvm::MemoryWriteTracking::getFirstMemoryWrite(), hasSpecialInstructions(), InstructionPrecedenceTracking(), and isPreceededBySpecialInstruction().
|
protected |
Returns true iff at least one instruction from the basic block BB is special.
Definition at line 53 of file InstructionPrecedenceTracking.cpp.
References getFirstSpecialInstruction().
Referenced by llvm::ImplicitControlFlowTracking::hasICF(), InstructionPrecedenceTracking(), and llvm::MemoryWriteTracking::mayWriteToMemory().
| void InstructionPrecedenceTracking::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.
It makes all necessary updates to internal caches to keep them consistent.
Definition at line 103 of file InstructionPrecedenceTracking.cpp.
References llvm::OrderedInstructions::invalidateBlock(), and isSpecialInstruction().
Referenced by InstructionPrecedenceTracking().
|
protected |
Returns true iff the first special instruction of Insn's block exists and dominates Insn.
Definition at line 58 of file InstructionPrecedenceTracking.cpp.
References assert(), llvm::OrderedInstructions::dominates(), getFirstSpecialInstruction(), llvm::Instruction::getParent(), I, isSpecialInstruction(), and llvm::RISCVFeatures::validate().
Referenced by InstructionPrecedenceTracking(), llvm::ImplicitControlFlowTracking::isDominatedByICFIFromSameBlock(), and llvm::MemoryWriteTracking::isDominatedByMemoryWriteFromSameBlock().
|
protectedpure 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.
Implemented in llvm::MemoryWriteTracking, and llvm::ImplicitControlFlowTracking.
Referenced by insertInstructionTo(), InstructionPrecedenceTracking(), llvm::ImplicitControlFlowTracking::isDominatedByICFIFromSameBlock(), llvm::MemoryWriteTracking::isDominatedByMemoryWriteFromSameBlock(), isPreceededBySpecialInstruction(), and removeInstruction().
| void InstructionPrecedenceTracking::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.
Definition at line 110 of file InstructionPrecedenceTracking.cpp.
References llvm::Instruction::getParent(), llvm::OrderedInstructions::invalidateBlock(), and isSpecialInstruction().
Referenced by InstructionPrecedenceTracking().
1.8.13