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;
159 regIndices(
unsigned Reg)
const;
177 DomainValue *resolve(DomainValue *&);
180 void setLiveReg(
int rx, DomainValue *DV);
186 void force(
int rx,
unsigned domain);
190 void collapse(DomainValue *dv,
unsigned domain);
193 bool merge(DomainValue *
A, DomainValue *
B);
196 void enterBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB);
199 void leaveBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB);
202 void processBasicBlock(
const LoopTraversal::TraversedMBBInfo &TraversedMBB);
205 bool visitInstr(MachineInstr *);
209 void processDefs(MachineInstr *,
bool Kill);
212 void visitSoftInstr(MachineInstr *,
unsigned mask);
216 void visitHardInstr(MachineInstr *,
unsigned domain);
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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...
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.
MachineFunctionProperties & set(Property P)
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?