|
LLVM
3.7.0
|
#include "llvm/CodeGen/RegisterPressure.h"#include "llvm/CodeGen/LiveInterval.h"#include "llvm/CodeGen/LiveIntervalAnalysis.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/RegisterClassInfo.h"#include "llvm/Support/Debug.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Functions | |
| static void | increaseSetPressure (std::vector< unsigned > &CurrSetPressure, PSetIterator PSetI) |
| Increase pressure for each pressure set provided by TargetRegisterInfo. More... | |
| static void | decreaseSetPressure (std::vector< unsigned > &CurrSetPressure, PSetIterator PSetI) |
| Decrease pressure for each pressure set provided by TargetRegisterInfo. More... | |
| static bool | containsReg (ArrayRef< unsigned > RegUnits, unsigned RegUnit) |
| Convenient wrapper for checking membership in RegisterOperands. More... | |
| static void | collectOperands (const MachineInstr *MI, RegisterOperands &RegOpers) |
| Collect physical and virtual register operands. More... | |
| static void | collectPDiff (PressureDiff &PDiff, RegisterOperands &RegOpers, const MachineRegisterInfo *MRI) |
| Record the pressure difference induced by the given operand list. More... | |
| static void | computeExcessPressureDelta (ArrayRef< unsigned > OldPressureVec, ArrayRef< unsigned > NewPressureVec, RegPressureDelta &Delta, const RegisterClassInfo *RCI, ArrayRef< unsigned > LiveThruPressureVec) |
| Find the max change in excess pressure across all sets. More... | |
| static void | computeMaxPressureDelta (ArrayRef< unsigned > OldMaxPressureVec, ArrayRef< unsigned > NewMaxPressureVec, ArrayRef< PressureChange > CriticalPSets, ArrayRef< unsigned > MaxPressureLimit, RegPressureDelta &Delta) |
| Find the max change in max pressure that either surpasses a critical PSet limit or exceeds the current MaxPressureLimit. More... | |
| static bool | findUseBetween (unsigned Reg, SlotIndex PriorUseIdx, SlotIndex NextUseIdx, const MachineRegisterInfo *MRI, const LiveIntervals *LIS) |
| Helper to find a vreg use between two indices [PriorUseIdx, NextUseIdx). More... | |
|
static |
Collect physical and virtual register operands.
Definition at line 371 of file RegisterPressure.cpp.
References containsReg(), I, and llvm::MachineOperandIteratorBase::isValid().
Referenced by llvm::RegPressureTracker::advance(), llvm::RegPressureTracker::bumpDownwardPressure(), llvm::RegPressureTracker::bumpUpwardPressure(), and llvm::RegPressureTracker::recede().
|
static |
Record the pressure difference induced by the given operand list.
Definition at line 422 of file RegisterPressure.cpp.
References llvm::PressureDiff::addPressureChange(), llvm::PressureDiff::begin(), and llvm::PressureChange::isValid().
Referenced by llvm::RegPressureTracker::recede().
|
static |
Find the max change in excess pressure across all sets.
Definition at line 634 of file RegisterPressure.cpp.
References llvm::ArrayRef< T >::empty(), llvm::RegPressureDelta::Excess, llvm::RegisterClassInfo::getRegPressureSetLimit(), llvm::PressureChange::setUnitInc(), and llvm::ArrayRef< T >::size().
Referenced by llvm::RegPressureTracker::getMaxDownwardPressureDelta(), and llvm::RegPressureTracker::getMaxUpwardPressureDelta().
|
static |
Find the max change in max pressure that either surpasses a critical PSet limit or exceeds the current MaxPressureLimit.
FIXME: comparing each element of the old and new MaxPressure vectors here is silly. It's done now to demonstrate the concept but will go away with a RegPressureTracker API change to work with pressure differences.
Definition at line 674 of file RegisterPressure.cpp.
References llvm::RegPressureDelta::CriticalMax, llvm::RegPressureDelta::CurrentMax, llvm::PressureChange::isValid(), llvm::PressureChange::setUnitInc(), and llvm::ArrayRef< T >::size().
Referenced by llvm::RegPressureTracker::getMaxDownwardPressureDelta(), and llvm::RegPressureTracker::getMaxUpwardPressureDelta().
Convenient wrapper for checking membership in RegisterOperands.
(std::count() doesn't have an early exit).
Definition at line 313 of file RegisterPressure.cpp.
References llvm::ArrayRef< T >::begin(), and llvm::ArrayRef< T >::end().
Referenced by llvm::RegPressureTracker::bumpUpwardPressure(), collectOperands(), llvm::RegPressureTracker::discoverLiveIn(), llvm::RegPressureTracker::discoverLiveOut(), and llvm::RegPressureTracker::recede().
|
static |
Decrease pressure for each pressure set provided by TargetRegisterInfo.
Definition at line 34 of file RegisterPressure.cpp.
References llvm::PSetIterator::getWeight(), and llvm::PSetIterator::isValid().
Referenced by llvm::RegPressureTracker::decreaseRegPressure().
|
static |
Helper to find a vreg use between two indices [PriorUseIdx, NextUseIdx).
Definition at line 895 of file RegisterPressure.cpp.
References llvm::LiveIntervals::getInstructionIndex(), llvm::SlotIndex::getRegSlot(), llvm::MachineInstr::isDebugValue(), llvm::AArch64CC::MI, llvm::MachineRegisterInfo::use_instr_nodbg_begin(), and llvm::MachineRegisterInfo::use_instr_nodbg_end().
Referenced by llvm::RegPressureTracker::bumpDownwardPressure().
|
static |
Increase pressure for each pressure set provided by TargetRegisterInfo.
Definition at line 26 of file RegisterPressure.cpp.
References llvm::PSetIterator::getWeight(), and llvm::PSetIterator::isValid().
Referenced by llvm::RegPressureTracker::discoverLiveIn(), llvm::RegPressureTracker::discoverLiveOut(), and llvm::RegPressureTracker::initLiveThru().
1.8.6