LLVM 20.0.0git
Public Member Functions | List of all members
llvm::PressureChange Class Reference

Capture a change in pressure for a single pressure set. More...

#include "llvm/CodeGen/RegisterPressure.h"

Public Member Functions

 PressureChange ()=default
 
 PressureChange (unsigned id)
 
bool isValid () const
 
unsigned getPSet () const
 
unsigned getPSetOrMax () const
 
int getUnitInc () const
 
void setUnitInc (int Inc)
 
bool operator== (const PressureChange &RHS) const
 
void dump () const
 

Detailed Description

Capture a change in pressure for a single pressure set.

UnitInc may be expressed in terms of upward or downward pressure depending on the client and will be dynamically adjusted for current liveness.

Pressure increments are tiny, typically 1-2 units, and this is only for heuristics, so we don't check UnitInc overflow. Instead, we may have a higher level assert that pressure is consistent within a region. We also effectively ignore dead defs which don't affect heuristics much.

Definition at line 102 of file RegisterPressure.h.

Constructor & Destructor Documentation

◆ PressureChange() [1/2]

llvm::PressureChange::PressureChange ( )
default

◆ PressureChange() [2/2]

llvm::PressureChange::PressureChange ( unsigned  id)
inline

Definition at line 108 of file RegisterPressure.h.

References assert().

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void PressureChange::dump ( ) const

Definition at line 139 of file RegisterPressure.cpp.

References llvm::dbgs(), getPSetOrMax(), and getUnitInc().

Referenced by llvm::RegPressureDelta::dump().

◆ getPSet()

unsigned llvm::PressureChange::getPSet ( ) const
inline

◆ getPSetOrMax()

unsigned llvm::PressureChange::getPSetOrMax ( ) const
inline

Definition at line 120 of file RegisterPressure.h.

Referenced by dump(), and llvm::tryPressure().

◆ getUnitInc()

int llvm::PressureChange::getUnitInc ( ) const
inline

◆ isValid()

bool llvm::PressureChange::isValid ( ) const
inline

◆ operator==()

bool llvm::PressureChange::operator== ( const PressureChange RHS) const
inline

Definition at line 128 of file RegisterPressure.h.

References RHS.

◆ setUnitInc()

void llvm::PressureChange::setUnitInc ( int  Inc)
inline

The documentation for this class was generated from the following files: