LLVM 22.0.0git
|
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 . | |
void | switchTo (RepairingKind NewKind) |
Change the type of this repairing placement to NewKind . | |
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. | |
void | addInsertPoint (MachineBasicBlock &Src, MachineBasicBlock &Dst) |
Add an EdgeInsertionPoint (Src , Dst ) to the list of InsertPoints. | |
void | addInsertPoint (InsertPoint &Point) |
Add an InsertPoint to the list of insert points. | |
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 760 of file RegBankSelect.cpp.
References addInsertPoint(), assert(), llvm::MachineOperand::getReg(), Impossible, Insert, llvm::MachineOperand::isDef(), llvm::MachineOperand::isReg(), MI, and llvm::RegBankSelect::TRI.
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 869 of file RegBankSelect.cpp.
References llvm::RegBankSelect::InsertPoint::canMaterialize(), and llvm::RegBankSelect::InsertPoint::isSplit().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | MachineBasicBlock & | MBB, |
bool | Beginning ) |
Definition at line 859 of file RegBankSelect.cpp.
References addInsertPoint(), and MBB.
Referenced by addInsertPoint(), addInsertPoint(), addInsertPoint(), and RepairingPlacement().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | MachineBasicBlock & | Src, |
MachineBasicBlock & | Dst ) |
Add an EdgeInsertionPoint (Src
, Dst
) to the list of InsertPoints.
Definition at line 864 of file RegBankSelect.cpp.
References addInsertPoint().
void RegBankSelect::RepairingPlacement::addInsertPoint | ( | MachineInstr & | MI, |
bool | Before ) |
Add a InstrInsertionPoint to the list of InsertPoints.
Definition at line 854 of file RegBankSelect.cpp.
References addInsertPoint(), and MI.
|
inline |
Definition at line 383 of file RegBankSelect.h.
|
inline |
Definition at line 386 of file RegBankSelect.h.
|
inline |
Definition at line 364 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::computeMapping().
|
inline |
Definition at line 384 of file RegBankSelect.h.
|
inline |
Definition at line 387 of file RegBankSelect.h.
|
inline |
Definition at line 362 of file RegBankSelect.h.
|
inline |
Definition at line 389 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::repairReg().
|
inline |
Definition at line 363 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::tryAvoidingSplit().
|
inline |
Definition at line 365 of file RegBankSelect.h.
Referenced by llvm::RegBankSelect::computeMapping(), and llvm::RegBankSelect::tryAvoidingSplit().
|
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 assert(), Impossible, and Insert.
Referenced by llvm::RegBankSelect::tryAvoidingSplit().