LLVM
8.0.1
|
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. More... | |
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. More... | |
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. More... | |
Public Attributes | |
SmallVector< RegisterMaskPair, 8 > | Uses |
List of virtual registers and register units read by the instruction. More... | |
SmallVector< RegisterMaskPair, 8 > | Defs |
List of virtual registers and register units defined by the instruction which are not dead. More... | |
SmallVector< RegisterMaskPair, 8 > | DeadDefs |
List of virtual registers and register units defined by the instruction but dead. More... | |
List of registers defined and used by a machine instruction.
Definition at line 170 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 584 of file RegisterPressure.cpp.
References DeadDefs, Defs, llvm::SlotIndex::getBaseIndex(), llvm::SlotIndex::getDeadSlot(), getLiveLanesAt(), I, llvm::TargetRegisterInfo::isVirtualRegister(), 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::GCNScheduleDAGMILive::schedule(), 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 553 of file RegisterPressure.cpp.
References Collector.
Referenced by llvm::RegPressureTracker::advance(), llvm::ScheduleDAGInstrs::buildSchedGraph(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), llvm::RegPressureTracker::recede(), llvm::GCNScheduleDAGMILive::schedule(), llvm::ScheduleDAGMILive::scheduleMI(), and llvm::GCNIterativeScheduler::scheduleRegion().
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 564 of file RegisterPressure.cpp.
References DeadDefs, Defs, llvm::LiveIntervals::getInstructionIndex(), getLiveRange(), llvm::LiveQueryResult::isDeadDef(), llvm::LiveRange::Query(), and Reg.
Referenced by llvm::RegPressureTracker::bumpUpwardPressure(), llvm::RegPressureTracker::recede(), llvm::GCNScheduleDAGMILive::schedule(), 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 179 of file RegisterPressure.h.
Referenced by adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), detectDeadDefs(), getLiveLanesAt(), 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 176 of file RegisterPressure.h.
Referenced by llvm::PressureDiffs::addInstruction(), adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), detectDeadDefs(), getLiveLanesAt(), and llvm::RegPressureTracker::recede().
SmallVector<RegisterMaskPair, 8> llvm::RegisterOperands::Uses |
List of virtual registers and register units read by the instruction.
Definition at line 173 of file RegisterPressure.h.
Referenced by llvm::PressureDiffs::addInstruction(), adjustLaneLiveness(), llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), getLiveLanesAt(), and llvm::RegPressureTracker::recede().