LLVM
8.0.1
|
Struct used to represent the placement of a repairing point for a given operand. More...
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h"
Public Types | |
enum | RepairingKind { None, Insert, Reassign, Impossible } |
Define the kind of action this repairing needs. More... | |
Convenient types for a list of insertion points. | |
using | InsertionPoints = SmallVector< std::unique_ptr< InsertPoint >, 2 > |
using | insertpt_iterator = InsertionPoints::iterator |
using | const_insertpt_iterator = InsertionPoints::const_iterator |
Public Member Functions | |
RepairingPlacement (MachineInstr &MI, unsigned OpIdx, const TargetRegisterInfo &TRI, Pass &P, RepairingKind Kind=RepairingKind::Insert) | |
Create a repairing placement for the OpIdx-th operand of MI . More... | |
void | switchTo (RepairingKind NewKind) |
Change the type of this repairing placement to NewKind . More... | |
Getters. | |
RepairingKind | getKind () const |
unsigned | getOpIdx () const |
bool | canMaterialize () const |
bool | hasSplit () |
Overloaded methods to add an insertion point. | |
Add a MBBInsertionPoint to the list of InsertPoints. | |
void | addInsertPoint (MachineBasicBlock &MBB, bool Beginning) |
void | addInsertPoint (MachineInstr &MI, bool Before) |
Add a InstrInsertionPoint to the list of InsertPoints. More... | |
void | addInsertPoint (MachineBasicBlock &Src, MachineBasicBlock &Dst) |
Add an EdgeInsertionPoint (Src , Dst ) to the list of InsertPoints. More... | |
void | addInsertPoint (InsertPoint &Point) |
Add an InsertPoint to the list of insert points. More... | |
Accessors related to the insertion points. | |
insertpt_iterator | begin () |
insertpt_iterator | end () |
const_insertpt_iterator | begin () const |
const_insertpt_iterator | end () const |
unsigned | getNumInsertPoints () const |
Struct used to represent the placement of a repairing point for a given operand.
Definition at line 314 of file RegBankSelect.h.
using llvm::RegBankSelect::RepairingPlacement::const_insertpt_iterator = InsertionPoints::const_iterator |
Definition at line 332 of file RegBankSelect.h.
using llvm::RegBankSelect::RepairingPlacement::InsertionPoints = SmallVector<std::unique_ptr<InsertPoint>, 2> |
Definition at line 330 of file RegBankSelect.h.
Definition at line 331 of file RegBankSelect.h.
Define the kind of action this repairing needs.
Definition at line 317 of file RegBankSelect.h.
RegBankSelect::RepairingPlacement::RepairingPlacement | ( | MachineInstr & | MI, |
unsigned | OpIdx, | ||
const TargetRegisterInfo & | TRI, | ||
Pass & | P, | ||
RepairingPlacement::RepairingKind | Kind = RepairingKind::Insert |
||
) |
Create a repairing placement for the OpIdx-th
operand of MI
.
TRI
is used to make some checks on the register aliases if the machine operand is a physical register. P
is used to to update liveness information and such when materializing the points.
Definition at line 656 of file RegBankSelect.cpp.
References addInsertPoint(), assert(), llvm::MachineBasicBlock::begin(), llvm::MachineBasicBlock::end(), llvm::MachineBasicBlock::getFirstNonPHI(), llvm::MachineBasicBlock::getLastNonDebugInstr(), llvm::MachineOperand::getMBB(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineOperand::isDef(), llvm::MachineInstr::isPHI(), llvm::MachineOperand::isReg(), llvm::MachineInstr::isTerminator(), MI, and llvm::MachineBasicBlock::rend().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | MachineBasicBlock & | MBB, |
bool | Beginning | ||
) |
Definition at line 755 of file RegBankSelect.cpp.
Referenced by addInsertPoint(), and RepairingPlacement().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | MachineInstr & | MI, |
bool | Before | ||
) |
Add a InstrInsertionPoint to the list of InsertPoints.
Definition at line 750 of file RegBankSelect.cpp.
References addInsertPoint().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | MachineBasicBlock & | Src, |
MachineBasicBlock & | Dst | ||
) |
Add an EdgeInsertionPoint (Src
, Dst
) to the list of InsertPoints.
Definition at line 760 of file RegBankSelect.cpp.
References addInsertPoint().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | RegBankSelect::InsertPoint & | Point | ) |
Add an InsertPoint to the list of insert points.
This method takes the ownership of &Point
.
Definition at line 765 of file RegBankSelect.cpp.
References llvm::RegBankSelect::InsertPoint::canMaterialize(), llvm::SmallVectorImpl< T >::emplace_back(), and llvm::RegBankSelect::InsertPoint::isSplit().
|
inline |
Definition at line 383 of file RegBankSelect.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
|
inline |
Definition at line 386 of file RegBankSelect.h.
References llvm::SmallVectorTemplateCommon< T, typename >::begin().
|
inline |
Definition at line 364 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::getAnalysisUsage().
|
inline |
Definition at line 384 of file RegBankSelect.h.
References llvm::SmallVectorTemplateCommon< T, typename >::end().
|
inline |
Definition at line 387 of file RegBankSelect.h.
References llvm::SmallVectorTemplateCommon< T, typename >::end().
|
inline |
Definition at line 362 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::getAnalysisUsage().
|
inline |
Definition at line 389 of file RegBankSelect.h.
References llvm::SmallVectorBase::size().
Referenced by llvm::RegBankSelect::getAnalysisUsage().
|
inline |
Definition at line 363 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::getAnalysisUsage().
|
inline |
Definition at line 365 of file RegBankSelect.h.
References MI.
Referenced by llvm::RegBankSelect::getAnalysisUsage().
|
inline |
Change the type of this repairing placement to NewKind
.
It is not possible to switch a repairing placement to the RepairingKind::Insert. There is no fundamental problem with that, but no uses as well, so do not support it for now.
Definition at line 399 of file RegBankSelect.h.
References llvm::applyMapping(), assert(), llvm::SmallVectorImpl< T >::clear(), llvm::Pass::dump(), llvm::RegBankSelect::Fast, MI, MORE, MRI, llvm::operator!=(), llvm::operator<(), llvm::operator<<(), llvm::operator==(), llvm::operator>(), llvm::Pass::print(), Reg, llvm::RegBankSelect::RegBankSelect(), and TRI.
Referenced by llvm::RegBankSelect::getAnalysisUsage().