22#ifndef LLVM_CODEGEN_EXECUTIONDOMAINFIX_H
23#define LLVM_CODEGEN_EXECUTIONDOMAINFIX_H
77 static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
78 "undefined behavior");
85 static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
86 "undefined behavior");
93 static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
94 "undefined behavior");
124 std::vector<SmallVector<int, 1>> AliasMap;
125 const unsigned NumRegs;
128 using LiveRegsDVInfo = std::vector<DomainValue *>;
129 LiveRegsDVInfo LiveRegs;
176 DomainValue *resolve(DomainValue *&);
179 void setLiveReg(
int rx, DomainValue *DV);
185 void force(
int rx,
unsigned domain);
189 void collapse(DomainValue *dv,
unsigned domain);
192 bool merge(DomainValue *
A, DomainValue *
B);
195 void enterBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB);
198 void leaveBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB);
201 void processBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB);
204 bool visitInstr(MachineInstr *);
208 void processDefs(MachineInstr *,
bool Kill);
211 void visitSoftInstr(MachineInstr *,
unsigned mask);
215 void visitHardInstr(MachineInstr *,
unsigned domain);
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the SmallVector class.
Represent the analysis usage information of a pass.
AnalysisUsage & addRequired()
void setPreservesAll()
Set by analyses that do not transform their input at all.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
ExecutionDomainFix(char &PassID, const TargetRegisterClass &RC)
MachineFunctionProperties getRequiredProperties() const override
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
Wrapper class representing physical registers. Should be passed by value.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Properties which a MachineFunction may have at a given point in time.
This class provides the reaching def analysis.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A BumpPtrAllocator that allows only elements of a specific type to be allocated.
TargetInstrInfo - Interface to description of machine instruction set.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
A range adaptor for a pair of iterators.
This is an optimization pass for GlobalISel generic memory operations.
int countr_zero(T Val)
Count number of 0's from the least significant bit to the most stopping at the first 1.
A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track of execution domains.
unsigned getCommonDomains(unsigned mask) const
Return bitmask of domains that are available and in mask.
void clear()
Clear this DomainValue and point to next which has all its data.
SmallVector< MachineInstr *, 8 > Instrs
Twiddleable instructions using or defining these registers.
void setSingleDomain(unsigned domain)
bool isCollapsed() const
A collapsed DomainValue has no instructions to twiddle - it simply keeps track of the domains where t...
DomainValue * Next
Pointer to the next DomainValue in a chain.
void addDomain(unsigned domain)
Mark domain as available.
unsigned AvailableDomains
Bitmask of available domains.
unsigned Refs
Basic reference counting.
unsigned getFirstDomain() const
First domain available.
bool hasDomain(unsigned domain) const
Is domain available?