llvm::DomainValue

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

Synopsis

Declared in <llvm/CodeGen/ExecutionDomainFix.h>

struct DomainValue;

Description

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.

Member Functions

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

Data Members

NameDescription
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.
Instrs Twiddleable instructions using or defining these registers.
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.
Refs Basic reference counting.