LLVM
8.0.1
|
Abstract class used to represent an insertion point in a CFG. More...
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
Public Member Functions | |
virtual | ~InsertPoint ()=default |
MachineBasicBlock::iterator | getPoint () |
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. More... | |
MachineBasicBlock & | getInsertMBB () |
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. More... | |
MachineBasicBlock::iterator | insert (MachineInstr &MI) |
Insert MI in the just before ::getPoint() More... | |
virtual bool | isSplit () const |
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. More... | |
virtual uint64_t | frequency (const Pass &P) const |
Frequency of the insertion point. More... | |
virtual bool | canMaterialize () const |
Check whether this insertion point can be materialized. More... | |
Protected Member Functions | |
virtual void | materialize ()=0 |
Materialize the insertion point. More... | |
virtual MachineBasicBlock & | getInsertMBBImpl ()=0 |
Return the materialized insertion basic block. More... | |
virtual MachineBasicBlock::iterator | getPointImpl ()=0 |
Return the materialized insertion point. More... | |
Protected Attributes | |
bool | WasMaterialized = false |
Tell if the insert point has already been materialized. More... | |
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.
Definition at line 111 of file RegBankSelect.h.
|
virtualdefault |
|
inlinevirtual |
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.
Reimplemented in llvm::RegBankSelect::EdgeInsertPoint, llvm::RegBankSelect::MBBInsertPoint, and llvm::RegBankSelect::InstrInsertPoint.
Definition at line 200 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::RepairingPlacement::addInsertPoint(), getInsertMBB(), getPoint(), and llvm::RegBankSelect::EdgeInsertPoint::isSplit().
Frequency of the insertion point.
P
is used to access the various analysis that will help to get that information, like MachineBlockFrequencyInfo. If P
does not contain enough enough to return the actual frequency, this returns 1.
Reimplemented in llvm::RegBankSelect::EdgeInsertPoint, llvm::RegBankSelect::MBBInsertPoint, and llvm::RegBankSelect::InstrInsertPoint.
Definition at line 195 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::MBBInsertPoint::isSplit(), and llvm::RegBankSelect::EdgeInsertPoint::isSplit().
|
inline |
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.
Definition at line 168 of file RegBankSelect.h.
References assert(), canMaterialize(), getInsertMBBImpl(), isSplit(), and materialize().
Referenced by insert().
|
protectedpure virtual |
Return the materialized insertion basic block.
Code will be inserted into that basic block.
Referenced by getInsertMBB().
|
inline |
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.
Definition at line 149 of file RegBankSelect.h.
References assert(), canMaterialize(), getPointImpl(), isSplit(), and materialize().
Referenced by insert().
|
protectedpure virtual |
Return the materialized insertion point.
Code will be inserted before that point.
Referenced by getPoint().
|
inline |
Insert MI
in the just before ::getPoint()
Definition at line 180 of file RegBankSelect.h.
References getInsertMBB(), getPoint(), and llvm::MachineBasicBlock::insert().
|
inlinevirtual |
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.
Reimplemented in llvm::RegBankSelect::EdgeInsertPoint, llvm::RegBankSelect::MBBInsertPoint, and llvm::RegBankSelect::InstrInsertPoint.
Definition at line 188 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::RepairingPlacement::addInsertPoint(), getInsertMBB(), and getPoint().
|
protectedpure virtual |
Materialize the insertion point.
If isSplit() is true, this involves actually splitting the block or edge.
Referenced by getInsertMBB(), and getPoint().
Tell if the insert point has already been materialized.
Definition at line 114 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::EdgeInsertPoint::frequency().