LLVM  6.0.0svn
Public Member Functions | List of all members
llvm::RegBankSelect::InstrInsertPoint Class Reference

Insertion point before or after an instruction. More...

#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"

Inheritance diagram for llvm::RegBankSelect::InstrInsertPoint:
Inheritance graph
[legend]
Collaboration diagram for llvm::RegBankSelect::InstrInsertPoint:
Collaboration graph
[legend]

Public Member Functions

 InstrInsertPoint (MachineInstr &Instr, bool Before=true)
 Create an insertion point before (Before=true) or after Instr. More...
 
bool isSplit () const override
 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...
 
uint64_t frequency (const Pass &P) const override
 Frequency of the insertion point. More...
 
bool canMaterialize () const override
 Check whether this insertion point can be materialized. More...
 
- Public Member Functions inherited from llvm::RegBankSelect::InsertPoint
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...
 
MachineBasicBlockgetInsertMBB ()
 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...
 

Additional Inherited Members

- Protected Attributes inherited from llvm::RegBankSelect::InsertPoint
bool WasMaterialized = false
 Tell if the insert point has already been materialized. More...
 

Detailed Description

Insertion point before or after an instruction.

Definition at line 204 of file RegBankSelect.h.

Constructor & Destructor Documentation

◆ InstrInsertPoint()

RegBankSelect::InstrInsertPoint::InstrInsertPoint ( MachineInstr Instr,
bool  Before = true 
)

Create an insertion point before (Before=true) or after Instr.

Definition at line 771 of file RegBankSelect.cpp.

References assert(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getNextNode(), llvm::MachineInstr::isPHI(), isSplit(), and llvm_unreachable.

Member Function Documentation

◆ canMaterialize()

bool llvm::RegBankSelect::InstrInsertPoint::canMaterialize ( ) const
inlineoverridevirtual

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 from llvm::RegBankSelect::InsertPoint.

Definition at line 233 of file RegBankSelect.h.

◆ frequency()

uint64_t RegBankSelect::InstrInsertPoint::frequency ( const Pass P) const
overridevirtual

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 from llvm::RegBankSelect::InsertPoint.

Definition at line 813 of file RegBankSelect.cpp.

References llvm::Pass::getAnalysisIfAvailable(), llvm::MachineBlockFrequencyInfo::getBlockFreq(), and llvm::MachineInstr::getParent().

◆ isSplit()

bool RegBankSelect::InstrInsertPoint::isSplit ( ) const
overridevirtual

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 from llvm::RegBankSelect::InsertPoint.

Definition at line 804 of file RegBankSelect.cpp.

References llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode(), and llvm::MachineInstr::isTerminator().

Referenced by InstrInsertPoint().


The documentation for this class was generated from the following files: