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:99
Inherits from: InstructionPrecedenceTracking
Member Variables
Method Overview
- public const llvm::Instruction * getFirstICFI(const llvm::BasicBlock * BB)
- public bool hasICF(const llvm::BasicBlock * BB)
- public bool isDominatedByICFIFromSameBlock(const llvm::Instruction * Insn)
- public bool isSpecialInstruction(const llvm::Instruction * Insn) const
Inherited from InstructionPrecedenceTracking:
- public clear
- protected getFirstSpecialInstruction
- protected hasSpecialInstructions
- public insertInstructionTo
- protected isPreceededBySpecialInstruction
- protected isSpecialInstruction
- public removeInstruction
- public removeUsersOf
Methods
¶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:103
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:109
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:114
Parameters
- const llvm::Instruction* Insn
¶bool isSpecialInstruction(
const llvm::Instruction* Insn) const
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:118
Parameters
- const llvm::Instruction* Insn