class ImplicitControlFlowTracking
Declaration
class ImplicitControlFlowTracking
: public InstructionPrecedenceTracking { /* full declaration omitted */ };
Description
This class allows to keep track on instructions with implicit control flow. These are instructions that may not pass execution to their successors. For example, throwing calls and guards do not always do this. If we need to know for sure that some instruction is guaranteed to execute if the given block is reached, then we need to make sure that there is no implicit control flow instruction (ICFI) preceding it. For example, this check is required if we perform PRE moving non-speculable instruction to other place.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:97
Inherits from: InstructionPrecedenceTracking
Method Overview
- public ImplicitControlFlowTracking(llvm::DominatorTree * DT)
- public const llvm::Instruction * getFirstICFI(const llvm::BasicBlock * BB)
- public bool hasICF(const llvm::BasicBlock * BB)
- public bool isDominatedByICFIFromSameBlock(const llvm::Instruction * Insn)
- public virtual bool isSpecialInstruction(const llvm::Instruction * Insn) const
Inherited from InstructionPrecedenceTracking:
- public clear
- protected getFirstSpecialInstruction
- protected hasSpecialInstructions
- public insertInstructionTo
- protected isPreceededBySpecialInstruction
- protected isSpecialInstruction
- public removeInstruction
Methods
¶ImplicitControlFlowTracking(
llvm::DominatorTree* DT)
ImplicitControlFlowTracking(
llvm::DominatorTree* DT)
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:99
Parameters
¶const llvm::Instruction* getFirstICFI(
const llvm::BasicBlock* BB)
const llvm::Instruction* getFirstICFI(
const llvm::BasicBlock* BB)
Description
Returns the topmost instruction with implicit control flow from the given basic block. Returns nullptr if there is no such instructions in the block.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:104
Parameters
- const llvm::BasicBlock* BB
¶bool hasICF(const llvm::BasicBlock* BB)
bool hasICF(const llvm::BasicBlock* BB)
Description
Returns true if at least one instruction from the given basic block has implicit control flow.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:110
Parameters
- const llvm::BasicBlock* BB
¶bool isDominatedByICFIFromSameBlock(
const llvm::Instruction* Insn)
bool isDominatedByICFIFromSameBlock(
const llvm::Instruction* Insn)
Description
Returns true if the first ICFI of Insn's block exists and dominates Insn.
Declared at: llvm/include/llvm/Analysis/InstructionPrecedenceTracking.h:115
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:119
Parameters
- const llvm::Instruction* Insn