Go to the documentation of this file.
20 #ifndef LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H
21 #define LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H
48 void validateAll()
const;
146 #endif // LLVM_ANALYSIS_INSTRUCTIONPRECEDENCETRACKING_H
This class allows to keep track on instructions with implicit control flow.
This is an optimization pass for GlobalISel generic memory operations.
const Instruction * getFirstICFI(const BasicBlock *BB)
Returns the topmost instruction with implicit control flow from the given basic block.
const Instruction * getFirstMemoryWrite(const BasicBlock *BB)
Returns the topmost instruction that may write memory from the given basic block.
const Instruction * getFirstSpecialInstruction(const BasicBlock *BB)
Returns the topmost special instruction from the block BB.
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.
virtual ~InstructionPrecedenceTracking()=default
LLVM Basic Block Representation.
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...
bool mayWriteToMemory(const BasicBlock *BB)
Returns true if at least one instruction from the given basic block may write memory.
bool isPreceededBySpecialInstruction(const Instruction *Insn)
Returns true iff the first special instruction of Insn's block exists and dominates Insn.
bool isSpecialInstruction(const Instruction *Insn) const override
A predicate that defines whether or not the instruction Insn is considered special and needs to be tr...
bool isSpecialInstruction(const Instruction *Insn) const override
A predicate that defines whether or not the instruction Insn is considered special and needs to be tr...
bool isDominatedByMemoryWriteFromSameBlock(const Instruction *Insn)
Returns true if the first memory writing instruction of Insn's block exists and dominates Insn.
void removeUsersOf(const Instruction *Inst)
Notifies this tracking that we are going to replace all uses of Inst.
void removeInstruction(const Instruction *Inst)
Notifies this tracking that we are going to remove the instruction Inst It makes all necessary update...
@ BasicBlock
Various leaf nodes.
bool hasSpecialInstructions(const BasicBlock *BB)
Returns true iff at least one instruction from the basic block BB is special.
bool isDominatedByICFIFromSameBlock(const Instruction *Insn)
Returns true if the first ICFI of Insn's block exists and dominates Insn.
void clear()
Invalidates all information from this tracking.
SmallVector< AArch64_IMM::ImmInsnModel, 4 > Insn
bool hasICF(const BasicBlock *BB)
Returns true if at least one instruction from the given basic block has implicit control flow.
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB