class RegBankSelect::InsertPoint
Declaration
class RegBankSelect::InsertPoint { /* full declaration omitted */ };
Description
Abstract class used to represent an insertion point in a CFG. This class records an insertion point and materializes it on demand. It allows to reason about the frequency of this insertion point, without having to logically materialize it (e.g., on an edge), before we actually need to insert something.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:110
Member Variables
- protected bool WasMaterialized = false
- Tell if the insert point has already been materialized.
Method Overview
- public virtual bool canMaterialize() const
- public virtual uint64_t frequency(const llvm::Pass & P) const
- public llvm::MachineBasicBlock & getInsertMBB()
- protected virtual llvm::MachineBasicBlock & getInsertMBBImpl()
- public MachineBasicBlock::iterator getPoint()
- protected virtual MachineBasicBlock::iterator getPointImpl()
- public MachineBasicBlock::iterator insert(llvm::MachineInstr & MI)
- public virtual bool isSplit() const
- protected virtual void materialize()
- public virtual ~InsertPoint()
Methods
¶virtual bool canMaterialize() const
virtual bool canMaterialize() const
Description
Check whether this insertion point can be materialized. As soon as ::getPoint is called and thus, the point materialized calling this method does not make sense.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:199
¶virtual uint64_t frequency(
const llvm::Pass& P) const
virtual uint64_t frequency(
const llvm::Pass& P) const
Description
Frequency of the insertion point.\p P is used to access the various analysis that will help to get that information, like MachineBlockFrequencyInfo. If \p P does not contain enough enough to return the actual frequency, this returns 1.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:194
Parameters
- const llvm::Pass& P
¶llvm::MachineBasicBlock& getInsertMBB()
llvm::MachineBasicBlock& getInsertMBB()
Description
The first call to this method will cause the splitting to happen if need be, then sub sequent calls just return the basic block that contains the insertion point. I.e., no more splitting will occur.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:167
Returns
The basic block should be used with MachineBasicBlock::insert and ::getPoint. The new code should happen before that point.
¶virtual llvm::MachineBasicBlock&
getInsertMBBImpl()
virtual llvm::MachineBasicBlock&
getInsertMBBImpl()
Description
Return the materialized insertion basic block. Code will be inserted into that basic block.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:129
¶MachineBasicBlock::iterator getPoint()
MachineBasicBlock::iterator getPoint()
Description
The first call to this method will cause the splitting to happen if need be, then sub sequent calls just return the iterator to that point. I.e., no more splitting will occur.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:148
Returns
The iterator that should be used with MachineBasicBlock::insert. I.e., additional code happens before that point.
¶virtual MachineBasicBlock::iterator getPointImpl()
virtual MachineBasicBlock::iterator getPointImpl()
Description
Return the materialized insertion point. Code will be inserted before that point.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:135
¶MachineBasicBlock::iterator insert(
llvm::MachineInstr& MI)
MachineBasicBlock::iterator insert(
llvm::MachineInstr& MI)
Description
Insert \p MI in the just before ::getPoint()
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:179
Parameters
¶virtual bool isSplit() const
virtual bool isSplit() const
Description
Does this point involve splitting an edge or block? As soon as ::getPoint is called and thus, the point materialized, the point will not require splitting anymore, i.e., this will return false.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:187
¶virtual void materialize()
virtual void materialize()
Description
Materialize the insertion point. If isSplit() is true, this involves actually splitting the block or edge.
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:123
¶virtual ~InsertPoint()
virtual ~InsertPoint()
Declared at: llvm/include/llvm/CodeGen/GlobalISel/RegBankSelect.h:138