LLVM 20.0.0git
|
List of registers defined and used by a machine instruction. More...
#include "llvm/CodeGen/RegisterPressure.h"
Public Member Functions | |
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. | |
void | detectDeadDefs (const MachineInstr &MI, const LiveIntervals &LIS) |
Use liveness information to find dead defs not marked with a dead flag and move them to the DeadDefs vector. | |
void | adjustLaneLiveness (const LiveIntervals &LIS, const MachineRegisterInfo &MRI, SlotIndex Pos, MachineInstr *AddFlagsMI=nullptr) |
Use liveness information to find out which uses/defs are partially undefined/dead and adjust the RegisterMaskPairs accordingly. | |
Public Attributes | |
SmallVector< RegisterMaskPair, 8 > | Uses |
List of virtual registers and register units read by the instruction. | |
SmallVector< RegisterMaskPair, 8 > | Defs |
List of virtual registers and register units defined by the instruction which are not dead. | |
SmallVector< RegisterMaskPair, 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 166 of file RegisterPressure.h.
void RegisterOperands::adjustLaneLiveness | ( | const LiveIntervals & | LIS, |
const MachineRegisterInfo & | MRI, | ||
SlotIndex | Pos, | ||
MachineInstr * | AddFlagsMI = nullptr |
||
) |
Use liveness information to find out which uses/defs are partially undefined/dead and adjust the RegisterMaskPairs accordingly.
If AddFlagsMI
is given then missing read-undef and dead flags will be added to the instruction.
Definition at line 598 of file RegisterPressure.cpp.
References DeadDefs, Defs, llvm::SlotIndex::getBaseIndex(), llvm::SlotIndex::getDeadSlot(), getLiveLanesAt(), I, llvm::Register::isVirtual(), MRI, llvm::LaneBitmask::none(), P, llvm::MachineInstr::setRegisterDefReadUndef(), and Uses.
Referenced by llvm::RegPressureTracker::advance(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), llvm::RegPressureTracker::recede(), llvm::GCNSchedStage::revertScheduling(), llvm::ScheduleDAGMILive::scheduleMI(), and llvm::GCNIterativeScheduler::scheduleRegion().
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 567 of file RegisterPressure.cpp.
References Collector, MI, MRI, and TRI.
Referenced by llvm::RegPressureTracker::advance(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), llvm::RegPressureTracker::recede(), llvm::GCNSchedStage::revertScheduling(), llvm::ScheduleDAGMILive::scheduleMI(), llvm::GCNIterativeScheduler::scheduleRegion(), and llvm::PPCInstrInfo::shouldReduceRegisterPressure().
void RegisterOperands::detectDeadDefs | ( | const MachineInstr & | MI, |
const LiveIntervals & | LIS | ||
) |
Use liveness information to find dead defs not marked with a dead flag and move them to the DeadDefs vector.
Definition at line 578 of file RegisterPressure.cpp.
References DeadDefs, Defs, llvm::LiveIntervals::getInstructionIndex(), getLiveRange(), llvm::LiveQueryResult::isDeadDef(), MI, llvm::LiveRange::Query(), and Reg.
Referenced by llvm::RegPressureTracker::bumpUpwardPressure(), llvm::RegPressureTracker::recede(), llvm::GCNSchedStage::revertScheduling(), and llvm::ScheduleDAGMILive::scheduleMI().
SmallVector<RegisterMaskPair, 8> llvm::RegisterOperands::DeadDefs |
List of virtual registers and register units defined by the instruction but dead.
Definition at line 175 of file RegisterPressure.h.
Referenced by adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), detectDeadDefs(), and llvm::RegPressureTracker::recede().
SmallVector<RegisterMaskPair, 8> llvm::RegisterOperands::Defs |
List of virtual registers and register units defined by the instruction which are not dead.
Definition at line 172 of file RegisterPressure.h.
Referenced by llvm::PressureDiffs::addInstruction(), adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), detectDeadDefs(), and llvm::RegPressureTracker::recede().
SmallVector<RegisterMaskPair, 8> llvm::RegisterOperands::Uses |
List of virtual registers and register units read by the instruction.
Definition at line 169 of file RegisterPressure.h.
Referenced by llvm::PressureDiffs::addInstruction(), adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), and llvm::RegPressureTracker::recede().