LLVM 20.0.0git
Classes | Public Member Functions | List of all members
llvm::DeadLaneDetector Class Reference

#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 VRegInfogetVRegInfo (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.
 

Detailed Description

Definition at line 42 of file DetectDeadLanes.h.

Constructor & Destructor Documentation

◆ DeadLaneDetector()

DeadLaneDetector::DeadLaneDetector ( const MachineRegisterInfo MRI,
const TargetRegisterInfo TRI 
)

Definition at line 41 of file DetectDeadLanes.cpp.

References MRI, and llvm::BitVector::resize().

Member Function Documentation

◆ computeSubRegisterLaneBitInfo()

void DeadLaneDetector::computeSubRegisterLaneBitInfo ( )

◆ getVRegInfo()

const VRegInfo & llvm::DeadLaneDetector::getVRegInfo ( unsigned  RegIdx) const
inline

Definition at line 57 of file DetectDeadLanes.h.

◆ isDefinedByCopy()

bool llvm::DeadLaneDetector::isDefinedByCopy ( unsigned  RegIdx) const
inline

Definition at line 61 of file DetectDeadLanes.h.

References llvm::BitVector::test().

◆ transferDefinedLanes()

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().

◆ transferUsedLanes()

LaneBitmask DeadLaneDetector::transferUsedLanes ( const MachineInstr MI,
LaneBitmask  UsedLanes,
const MachineOperand MO 
) const

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