20#ifndef LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H
21#define LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H
46 void validateAll()
const;
104 return getFirstSpecialInstruction(BB);
110 return hasSpecialInstructions(BB);
115 return isPreceededBySpecialInstruction(Insn);
118 bool isSpecialInstruction(
const Instruction *Insn)
const override;
126 return getFirstSpecialInstruction(BB);
132 return hasSpecialInstructions(BB);
138 return isPreceededBySpecialInstruction(Insn);
141 bool isSpecialInstruction(
const Instruction *Insn)
const override;
This file defines the DenseMap class.
LLVM Basic Block Representation.
This class allows to keep track on instructions with implicit control flow.
const Instruction * getFirstICFI(const BasicBlock *BB)
Returns the topmost instruction with implicit control flow from the given basic block.
bool isDominatedByICFIFromSameBlock(const Instruction *Insn)
Returns true if the first ICFI of Insn's block exists and dominates Insn.
bool hasICF(const BasicBlock *BB)
Returns true if at least one instruction from the given basic block has implicit control flow.
LLVM_ABI void clear()
Invalidates all information from this tracking.
LLVM_ABI void removeUsersOf(const Instruction *Inst)
Notifies this tracking that we are going to replace all uses of Inst.
virtual ~InstructionPrecedenceTracking()=default
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 update...
LLVM_ABI const Instruction * getFirstSpecialInstruction(const BasicBlock *BB)
Returns the topmost special instruction from the block BB.
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 tr...
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.
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.
const Instruction * getFirstMemoryWrite(const BasicBlock *BB)
Returns the topmost instruction that may write memory from the given basic block.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.