LLVM  4.0.0
Functions
RegisterPressure.cpp File Reference
#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"
Include dependency graph for RegisterPressure.cpp:

Go to the source code of this file.

Functions

static void increaseSetPressure (std::vector< unsigned > &CurrSetPressure, const MachineRegisterInfo &MRI, unsigned Reg, LaneBitmask PrevMask, LaneBitmask NewMask)
 Increase pressure for each pressure set provided by TargetRegisterInfo. More...
 
static void decreaseSetPressure (std::vector< unsigned > &CurrSetPressure, const MachineRegisterInfo &MRI, unsigned Reg, LaneBitmask PrevMask, LaneBitmask NewMask)
 Decrease pressure for each pressure set provided by TargetRegisterInfo. More...
 
static const LiveRangegetLiveRange (const LiveIntervals &LIS, unsigned Reg)
 
static LaneBitmask getRegLanes (ArrayRef< RegisterMaskPair > RegUnits, unsigned RegUnit)
 
static void addRegLanes (SmallVectorImpl< RegisterMaskPair > &RegUnits, RegisterMaskPair Pair)
 
static void setRegZero (SmallVectorImpl< RegisterMaskPair > &RegUnits, unsigned RegUnit)
 
static void removeRegLanes (SmallVectorImpl< RegisterMaskPair > &RegUnits, RegisterMaskPair Pair)
 
static LaneBitmask getLanesWithProperty (const LiveIntervals &LIS, const MachineRegisterInfo &MRI, bool TrackLaneMasks, unsigned RegUnit, SlotIndex Pos, LaneBitmask SafeDefault, bool(*Property)(const LiveRange &LR, SlotIndex Pos))
 
static LaneBitmask getLiveLanesAt (const LiveIntervals &LIS, const MachineRegisterInfo &MRI, bool TrackLaneMasks, unsigned RegUnit, SlotIndex Pos)
 
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 LaneBitmask findUseBetween (unsigned Reg, LaneBitmask LastUseMask, SlotIndex PriorUseIdx, SlotIndex NextUseIdx, const MachineRegisterInfo &MRI, const LiveIntervals *LIS)
 Helper to find a vreg use between two indices [PriorUseIdx, NextUseIdx). More...
 

Function Documentation

static void addRegLanes ( SmallVectorImpl< RegisterMaskPair > &  RegUnits,
RegisterMaskPair  Pair 
)
static
static void computeExcessPressureDelta ( ArrayRef< unsigned OldPressureVec,
ArrayRef< unsigned NewPressureVec,
RegPressureDelta Delta,
const RegisterClassInfo RCI,
ArrayRef< unsigned LiveThruPressureVec 
)
static
static void computeMaxPressureDelta ( ArrayRef< unsigned OldMaxPressureVec,
ArrayRef< unsigned NewMaxPressureVec,
ArrayRef< PressureChange CriticalPSets,
ArrayRef< unsigned MaxPressureLimit,
RegPressureDelta Delta 
)
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 949 of file RegisterPressure.cpp.

References llvm::RegPressureDelta::CriticalMax, llvm::RegPressureDelta::CurrentMax, i, llvm::PressureChange::isValid(), llvm::PressureChange::setUnitInc(), and llvm::ArrayRef< T >::size().

Referenced by llvm::RegPressureTracker::getMaxDownwardPressureDelta(), and llvm::RegPressureTracker::getMaxUpwardPressureDelta().

static void decreaseSetPressure ( std::vector< unsigned > &  CurrSetPressure,
const MachineRegisterInfo MRI,
unsigned  Reg,
LaneBitmask  PrevMask,
LaneBitmask  NewMask 
)
static
static LaneBitmask findUseBetween ( unsigned  Reg,
LaneBitmask  LastUseMask,
SlotIndex  PriorUseIdx,
SlotIndex  NextUseIdx,
const MachineRegisterInfo MRI,
const LiveIntervals LIS 
)
static
static LaneBitmask getLanesWithProperty ( const LiveIntervals LIS,
const MachineRegisterInfo MRI,
bool  TrackLaneMasks,
unsigned  RegUnit,
SlotIndex  Pos,
LaneBitmask  SafeDefault,
bool(*)(const LiveRange &LR, SlotIndex Pos)  Property 
)
static
static LaneBitmask getLiveLanesAt ( const LiveIntervals LIS,
const MachineRegisterInfo MRI,
bool  TrackLaneMasks,
unsigned  RegUnit,
SlotIndex  Pos 
)
static
static const LiveRange* getLiveRange ( const LiveIntervals LIS,
unsigned  Reg 
)
static
static LaneBitmask getRegLanes ( ArrayRef< RegisterMaskPair RegUnits,
unsigned  RegUnit 
)
static
static void increaseSetPressure ( std::vector< unsigned > &  CurrSetPressure,
const MachineRegisterInfo MRI,
unsigned  Reg,
LaneBitmask  PrevMask,
LaneBitmask  NewMask 
)
static
static void removeRegLanes ( SmallVectorImpl< RegisterMaskPair > &  RegUnits,
RegisterMaskPair  Pair 
)
static
static void setRegZero ( SmallVectorImpl< RegisterMaskPair > &  RegUnits,
unsigned  RegUnit 
)
static