LLVM 19.0.0git
Public Member Functions | List of all members
llvm::RegBankSelect::MBBInsertPoint Class Reference

Insertion point at the beginning or end of a basic block. More...

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

Inheritance diagram for llvm::RegBankSelect::MBBInsertPoint:
Inheritance graph
[legend]

Public Member Functions

 MBBInsertPoint (MachineBasicBlock &MBB, bool Beginning=true)
 
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.
 
uint64_t frequency (const Pass &P) const override
 Frequency of the insertion point.
 
bool canMaterialize () const override
 Check whether this insertion point can be materialized.
 
- 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.
 
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.
 
MachineBasicBlock::iterator insert (MachineInstr &MI)
 Insert MI in the just before getPoint()
 
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.
 
virtual uint64_t frequency (const Pass &P) const
 Frequency of the insertion point.
 
virtual bool canMaterialize () const
 Check whether this insertion point can be materialized.
 

Additional Inherited Members

virtual void materialize ()=0
 Materialize the insertion point.
 
virtual MachineBasicBlockgetInsertMBBImpl ()=0
 Return the materialized insertion basic block.
 
virtual MachineBasicBlock::iterator getPointImpl ()=0
 Return the materialized insertion point.
 
- Protected Attributes inherited from llvm::RegBankSelect::InsertPoint
bool WasMaterialized = false
 Tell if the insert point has already been materialized.
 

Detailed Description

Insertion point at the beginning or end of a basic block.

Definition at line 237 of file RegBankSelect.h.

Constructor & Destructor Documentation

◆ MBBInsertPoint()

llvm::RegBankSelect::MBBInsertPoint::MBBInsertPoint ( MachineBasicBlock MBB,
bool  Beginning = true 
)
inline

Definition at line 255 of file RegBankSelect.h.

References assert(), and MBB.

Member Function Documentation

◆ canMaterialize()

bool llvm::RegBankSelect::MBBInsertPoint::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 269 of file RegBankSelect.h.

◆ frequency()

uint64_t RegBankSelect::MBBInsertPoint::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 to return the actual frequency, this returns 1.

Reimplemented from llvm::RegBankSelect::InsertPoint.

Definition at line 928 of file RegBankSelect.cpp.

References llvm::MachineBlockFrequencyInfo::getBlockFreq(), llvm::BlockFrequency::getFrequency(), MBB, llvm::RegBankSelect::MBFI, and P.

◆ isSplit()

bool llvm::RegBankSelect::MBBInsertPoint::isSplit ( ) const
inlineoverridevirtual

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 267 of file RegBankSelect.h.


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