|
LLVM 24.0.0git
|
List of registers defined and used by a machine instruction. More...
#include "llvm/CodeGen/RegisterPressure.h"
Public Member Functions | |
| LLVM_ABI void | collect (const MachineInstr &MI, const TargetRegisterInfo &TRI, const MachineRegisterInfo &MRI, bool TrackLaneMasks, bool IgnoreDead) |
Analyze the given instruction MI and fill in the Uses, Defs and DeadDefs list based on the MachineOperand flags. | |
| LLVM_ABI void | detectDeadDefs (const MachineInstr &MI, const LiveIntervals &LIS, const MachineRegisterInfo &MRI) |
Use liveness information to find dead defs at MI's dead slot not marked with a dead flag and move them to the DeadDefs vector. | |
| LLVM_ABI void | adjustLaneLiveness (const LiveIntervals &LIS, const MachineRegisterInfo &MRI, SlotIndex Pos) |
Use liveness information to find out which uses/defs are partially undefined/dead at Pos and adjust the VRegMaskOrUnits accordingly. | |
| LLVM_ABI void | adjustLaneLiveness (const LiveIntervals &LIS, const MachineRegisterInfo &MRI, MachineInstr &MI) |
Use liveness information to find out which uses/defs are partially undefined/dead at the MI's position and adjust the VRegMaskOrUnits accordingly. | |
Public Attributes | |
| SmallVector< VRegMaskOrUnit, 8 > | Uses |
| List of virtual registers and register units read by the instruction. | |
| SmallVector< VRegMaskOrUnit, 8 > | Defs |
| List of virtual registers and register units defined by the instruction which are not dead. | |
| SmallVector< VRegMaskOrUnit, 8 > | DeadDefs |
| List of virtual registers and register units defined by the instruction but dead. | |
List of registers defined and used by a machine instruction.
Definition at line 167 of file RegisterPressure.h.
| void RegisterOperands::adjustLaneLiveness | ( | const LiveIntervals & | LIS, |
| const MachineRegisterInfo & | MRI, | ||
| MachineInstr & | MI ) |
Use liveness information to find out which uses/defs are partially undefined/dead at the MI's position and adjust the VRegMaskOrUnits accordingly.
Missing read-undef and dead flags are added to MI.
Definition at line 594 of file RegisterPressure.cpp.
References llvm::VirtRegOrUnit::asVirtualReg(), llvm::SmallVectorTemplateCommon< T, typename >::back(), DeadDefs, Defs, llvm::SlotIndex::getDeadSlot(), llvm::LiveIntervals::getInstructionIndex(), llvm::LiveIntervals::getInterval(), getLiveLanesAt(), llvm::MachineRegisterInfo::getTargetRegisterInfo(), I, llvm::VirtRegOrUnit::isVirtualReg(), MI, llvm::LaneBitmask::none(), P, llvm::LiveRange::segments, and TRI.
| void RegisterOperands::adjustLaneLiveness | ( | const LiveIntervals & | LIS, |
| const MachineRegisterInfo & | MRI, | ||
| SlotIndex | Pos ) |
Use liveness information to find out which uses/defs are partially undefined/dead at Pos and adjust the VRegMaskOrUnits accordingly.
Definition at line 583 of file RegisterPressure.cpp.
References Defs, llvm::SlotIndex::getBaseIndex(), llvm::SlotIndex::getDeadSlot(), getLiveLanesAt(), and I.
Referenced by llvm::RegPressureTracker::advance(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::GCNDownwardRPTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), llvm::GCNSchedStage::modifyRegionSchedule(), llvm::RegPressureTracker::recede(), llvm::GCNIterativeScheduler::restoreLivenessFlags(), and llvm::ScheduleDAGMILive::scheduleMI().
| void RegisterOperands::collect | ( | const MachineInstr & | MI, |
| const TargetRegisterInfo & | TRI, | ||
| const MachineRegisterInfo & | MRI, | ||
| bool | TrackLaneMasks, | ||
| bool | IgnoreDead ) |
Analyze the given instruction MI and fill in the Uses, Defs and DeadDefs list based on the MachineOperand flags.
Definition at line 561 of file RegisterPressure.cpp.
References Collector, MI, and TRI.
Referenced by llvm::RegPressureTracker::advance(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::GCNDownwardRPTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), llvm::GCNSchedStage::modifyRegionSchedule(), llvm::RegPressureTracker::recede(), llvm::GCNIterativeScheduler::restoreLivenessFlags(), llvm::ScheduleDAGMILive::scheduleMI(), and llvm::PPCInstrInfo::shouldReduceRegisterPressure().
| void RegisterOperands::detectDeadDefs | ( | const MachineInstr & | MI, |
| const LiveIntervals & | LIS, | ||
| const MachineRegisterInfo & | MRI ) |
Use liveness information to find dead defs at MI's dead slot not marked with a dead flag and move them to the DeadDefs vector.
This only considers the merged live interval for defs, not the per-lane sub-ranges.
Definition at line 572 of file RegisterPressure.cpp.
References Defs, llvm::SlotIndex::getDeadSlot(), llvm::LiveIntervals::getInstructionIndex(), getLiveLanesAt(), I, and MI.
Referenced by llvm::RegPressureTracker::bumpUpwardPressure(), llvm::GCNSchedStage::modifyRegionSchedule(), llvm::RegPressureTracker::recede(), and llvm::ScheduleDAGMILive::scheduleMI().
| SmallVector<VRegMaskOrUnit, 8> llvm::RegisterOperands::DeadDefs |
List of virtual registers and register units defined by the instruction but dead.
Dead definitions should not necessarily be marked with a dead flag. In this context a dead definition is just a definition which doesn't define any register lane that remains live after the defining instruction.
Definition at line 179 of file RegisterPressure.h.
Referenced by adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), and llvm::RegPressureTracker::recede().
| SmallVector<VRegMaskOrUnit, 8> llvm::RegisterOperands::Defs |
List of virtual registers and register units defined by the instruction which are not dead.
Definition at line 173 of file RegisterPressure.h.
Referenced by llvm::PressureDiffs::addInstruction(), adjustLaneLiveness(), adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::GCNDownwardRPTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), detectDeadDefs(), and llvm::RegPressureTracker::recede().
| SmallVector<VRegMaskOrUnit, 8> llvm::RegisterOperands::Uses |
List of virtual registers and register units read by the instruction.
Definition at line 170 of file RegisterPressure.h.
Referenced by llvm::PressureDiffs::addInstruction(), llvm::RegPressureTracker::advance(), llvm::GCNDownwardRPTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), and llvm::RegPressureTracker::recede().