LLVM 20.0.0git
|
#include "llvm/CodeGen/DetectDeadLanes.h"
Classes | |
struct | VRegInfo |
Contains a bitmask of which lanes of a given virtual register are defined and which ones are actually used. More... | |
Public Member Functions | |
DeadLaneDetector (const MachineRegisterInfo *MRI, const TargetRegisterInfo *TRI) | |
void | computeSubRegisterLaneBitInfo () |
Update the DefinedLanes and the UsedLanes for all virtual registers. | |
const VRegInfo & | getVRegInfo (unsigned RegIdx) const |
bool | isDefinedByCopy (unsigned RegIdx) const |
LaneBitmask | transferDefinedLanes (const MachineOperand &Def, unsigned OpNum, LaneBitmask DefinedLanes) const |
Given a mask DefinedLanes of lanes defined at operand OpNum of COPY-like instruction, determine which lanes are defined at the output operand Def . | |
LaneBitmask | transferUsedLanes (const MachineInstr &MI, LaneBitmask UsedLanes, const MachineOperand &MO) const |
Given a mask UsedLanes used from the output of instruction MI determine which lanes are used from operand MO of this instruction. | |
Definition at line 42 of file DetectDeadLanes.h.
DeadLaneDetector::DeadLaneDetector | ( | const MachineRegisterInfo * | MRI, |
const TargetRegisterInfo * | TRI | ||
) |
Definition at line 41 of file DetectDeadLanes.cpp.
References MRI, and llvm::BitVector::resize().
void DeadLaneDetector::computeSubRegisterLaneBitInfo | ( | ) |
Update the DefinedLanes
and the UsedLanes
for all virtual registers.
Definition at line 453 of file DetectDeadLanes.cpp.
References llvm::dbgs(), llvm::MachineRegisterInfo::def_begin(), llvm::MachineRegisterInfo::getNumVirtRegs(), llvm::Register::index2VirtReg(), Info, LLVM_DEBUG, MI, llvm::PrintLaneMask(), llvm::printReg(), llvm::BitVector::reset(), and llvm::MachineRegisterInfo::use_nodbg_operands().
Definition at line 57 of file DetectDeadLanes.h.
Definition at line 61 of file DetectDeadLanes.h.
References llvm::BitVector::test().
LaneBitmask DeadLaneDetector::transferDefinedLanes | ( | const MachineOperand & | Def, |
unsigned | OpNum, | ||
LaneBitmask | DefinedLanes | ||
) | const |
Given a mask DefinedLanes
of lanes defined at operand OpNum
of COPY-like instruction, determine which lanes are defined at the output operand Def
.
Definition at line 226 of file DetectDeadLanes.cpp.
References assert(), llvm::TargetRegisterInfo::composeSubRegIndexLaneMask(), llvm::MachineRegisterInfo::getMaxLaneMaskForVReg(), llvm::TargetRegisterInfo::getSubRegIndexLaneMask(), llvm_unreachable, MI, and llvm::TargetRegisterInfo::reverseComposeSubRegIndexLaneMask().
LaneBitmask DeadLaneDetector::transferUsedLanes | ( | const MachineInstr & | MI, |
LaneBitmask | UsedLanes, | ||
const MachineOperand & | MO | ||
) | const |
Given a mask UsedLanes
used from the output of instruction MI
determine which lanes are used from operand MO
of this instruction.
Definition at line 145 of file DetectDeadLanes.cpp.
References assert(), llvm::TargetRegisterInfo::composeSubRegIndexLaneMask(), llvm::TargetRegisterClass::CoveredBySubRegs, llvm::MachineOperand::getOperandNo(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetRegisterClass::LaneMask, llvm_unreachable, lowersToCopies(), MI, llvm::TargetRegisterInfo::reverseComposeSubRegIndexLaneMask(), and llvm::Register::virtReg2Index().