LLVM  8.0.1
Public Member Functions | Public Attributes | List of all members
llvm::DomainValue Struct Reference

A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track of execution domains. More...

#include "llvm/CodeGen/ExecutionDomainFix.h"

Collaboration diagram for llvm::DomainValue:
Collaboration graph
[legend]

Public Member Functions

 DomainValue ()
 
bool isCollapsed () const
 A collapsed DomainValue has no instructions to twiddle - it simply keeps track of the domains where the registers are already available. More...
 
bool hasDomain (unsigned domain) const
 Is domain available? More...
 
void addDomain (unsigned domain)
 Mark domain as available. More...
 
void setSingleDomain (unsigned domain)
 
unsigned getCommonDomains (unsigned mask) const
 Return bitmask of domains that are available and in mask. More...
 
unsigned getFirstDomain () const
 First domain available. More...
 
void clear ()
 Clear this DomainValue and point to next which has all its data. More...
 

Public Attributes

unsigned Refs = 0
 Basic reference counting. More...
 
unsigned AvailableDomains
 Bitmask of available domains. More...
 
DomainValueNext
 Pointer to the next DomainValue in a chain. More...
 
SmallVector< MachineInstr *, 8 > Instrs
 Twiddleable instructions using or defining these registers. More...
 

Detailed Description

A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track of execution domains.

An open DomainValue represents a set of instructions that can still switch execution domain. Multiple registers may refer to the same open DomainValue - they will eventually be collapsed to the same execution domain.

A collapsed DomainValue represents a single register that has been forced into one of more execution domains. There is a separate collapsed DomainValue for each register, but it may contain multiple execution domains. A register value is initially created in a single execution domain, but if we were forced to pay the penalty of a domain crossing, we keep track of the fact that the register is now available in multiple domains.

Definition at line 53 of file ExecutionDomainFix.h.

Constructor & Destructor Documentation

◆ DomainValue()

llvm::DomainValue::DomainValue ( )
inline

Definition at line 70 of file ExecutionDomainFix.h.

References clear().

Member Function Documentation

◆ addDomain()

void llvm::DomainValue::addDomain ( unsigned  domain)
inline

Mark domain as available.

Definition at line 85 of file ExecutionDomainFix.h.

◆ clear()

void llvm::DomainValue::clear ( )
inline

Clear this DomainValue and point to next which has all its data.

Definition at line 101 of file ExecutionDomainFix.h.

References llvm::SmallVectorImpl< T >::clear().

Referenced by DomainValue().

◆ getCommonDomains()

unsigned llvm::DomainValue::getCommonDomains ( unsigned  mask) const
inline

Return bitmask of domains that are available and in mask.

Definition at line 91 of file ExecutionDomainFix.h.

◆ getFirstDomain()

unsigned llvm::DomainValue::getFirstDomain ( ) const
inline

First domain available.

Definition at line 96 of file ExecutionDomainFix.h.

References llvm::countTrailingZeros().

◆ hasDomain()

bool llvm::DomainValue::hasDomain ( unsigned  domain) const
inline

Is domain available?

Definition at line 77 of file ExecutionDomainFix.h.

References assert().

◆ isCollapsed()

bool llvm::DomainValue::isCollapsed ( ) const
inline

A collapsed DomainValue has no instructions to twiddle - it simply keeps track of the domains where the registers are already available.

Definition at line 74 of file ExecutionDomainFix.h.

References llvm::SmallVectorBase::empty().

◆ setSingleDomain()

void llvm::DomainValue::setSingleDomain ( unsigned  domain)
inline

Definition at line 88 of file ExecutionDomainFix.h.

Member Data Documentation

◆ AvailableDomains

unsigned llvm::DomainValue::AvailableDomains

Bitmask of available domains.

For an open DomainValue, it is the still possible domains for collapsing. For a collapsed DomainValue it is the domains where the register is available for free.

Definition at line 60 of file ExecutionDomainFix.h.

◆ Instrs

SmallVector<MachineInstr *, 8> llvm::DomainValue::Instrs

Twiddleable instructions using or defining these registers.

Definition at line 68 of file ExecutionDomainFix.h.

◆ Next

DomainValue* llvm::DomainValue::Next

Pointer to the next DomainValue in a chain.

When two DomainValues are merged, Victim.Next is set to point to Victor, so old DomainValue references can be updated by following the chain.

Definition at line 65 of file ExecutionDomainFix.h.

◆ Refs

unsigned llvm::DomainValue::Refs = 0

Basic reference counting.

Definition at line 55 of file ExecutionDomainFix.h.

Referenced by llvm::ExecutionDomainFix::getRequiredProperties().


The documentation for this struct was generated from the following file: