Go to the documentation of this file.
22 #ifndef LLVM_CODEGEN_EXECUTIONDOMAINFIX_H
23 #define LLVM_CODEGEN_EXECUTIONDOMAINFIX_H
34 class TargetInstrInfo;
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;
173 void release(DomainValue *);
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);
221 #endif // LLVM_CODEGEN_EXECUTIONDOMAINFIX_H
This is an optimization pass for GlobalISel generic memory operations.
This class provides the reaching def analysis.
void addDomain(unsigned domain)
Mark domain as available.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
unsigned Refs
Basic reference counting.
void clear()
Clear this DomainValue and point to next which has all its data.
Reg
All possible values of the reg field in the ModR/M byte.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
unsigned getCommonDomains(unsigned mask) const
Return bitmask of domains that are available and in mask.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
A BumpPtrAllocator that allows only elements of a specific type to be allocated.
Properties which a MachineFunction may have at a given point in time.
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
unsigned AvailableDomains
Bitmask of available domains.
ExecutionDomainFix(char &PassID, const TargetRegisterClass &RC)
TargetInstrInfo - Interface to description of machine instruction set.
Represent the analysis usage information of a pass.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
MachineFunctionProperties & set(Property P)
DomainValue * Next
Pointer to the next DomainValue in a chain.
bool hasDomain(unsigned domain) const
Is domain available?
A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track of execution domains.
MachineFunctionProperties getRequiredProperties() const override
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void setSingleDomain(unsigned domain)
unsigned countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1.
SmallVector< MachineInstr *, 8 > Instrs
Twiddleable instructions using or defining these registers.
void setPreservesAll()
Set by analyses that do not transform their input at all.
A range adaptor for a pair of iterators.
unsigned getFirstDomain() const
First domain available.
AnalysisUsage & addRequired()
bool isCollapsed() const
A collapsed DomainValue has no instructions to twiddle - it simply keeps track of the domains where t...
@ Kill
The last use of a register.