23 #ifndef LLVM_CODEGEN_EXECUTIONDEPSFIX_H
24 #define LLVM_CODEGEN_EXECUTIONDEPSFIX_H
43 class MachineBasicBlock;
45 class TargetInstrInfo;
88 static_cast<unsigned>(std::numeric_limits<unsigned>::digits) &&
89 "undefined behavior");
143 std::vector<SmallVector<int, 1>> AliasMap;
144 const unsigned NumRegs;
153 bool PrimaryCompleted =
false;
156 unsigned IncomingProcessed = 0;
159 unsigned PrimaryIncoming = 0;
162 unsigned IncomingCompleted = 0;
170 std::vector<std::pair<MachineInstr *, unsigned>> UndefReads;
197 regIndices(
unsigned Reg)
const;
204 void release(DomainValue*);
205 DomainValue *resolve(DomainValue*&);
208 void setLiveReg(
int rx, DomainValue *DV);
210 void force(
int rx,
unsigned domain);
211 void collapse(DomainValue *dv,
unsigned domain);
212 bool merge(DomainValue *
A, DomainValue *
B);
214 void enterBasicBlock(MachineBasicBlock*);
215 void leaveBasicBlock(MachineBasicBlock*);
216 bool isBlockDone(MachineBasicBlock *);
217 void processBasicBlock(MachineBasicBlock *MBB,
bool PrimaryPass);
218 bool visitInstr(MachineInstr *);
219 void processDefs(MachineInstr *,
bool breakDependency,
bool Kill);
220 void visitSoftInstr(MachineInstr*,
unsigned mask);
221 void visitHardInstr(MachineInstr*,
unsigned domain);
222 bool pickBestRegisterForUndef(MachineInstr *
MI,
unsigned OpIdx,
224 bool shouldBreakDependence(MachineInstr*,
unsigned OpIdx,
unsigned Pref);
225 void processUndefReads(MachineBasicBlock*);
230 #endif // LLVM_CODEGEN_EXECUTIONDEPSFIX_H
bool hasDomain(unsigned domain) const
void addDomain(unsigned domain)
bool runOnMachineFunction(MachineFunction &MF) override
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformat...
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - This function should be overriden by passes that need analysis information to do t...
unsigned AvailableDomains
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
Reg
All possible values of the reg field in the ModR/M byte.
DomainValue * Value
Value currently in this register, or NULL when no value is being tracked.
unsigned getCommonDomains(unsigned mask) const
ExecutionDepsFix(char &PassID, const TargetRegisterClass &RC)
TargetInstrInfo - Interface to description of machine instruction set.
int Def
Instruction that defined this register, relative to the beginning of the current basic block...
std::size_t 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...
unsigned getFirstDomain() const
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
SmallVector< MachineInstr *, 8 > Instrs
A set of live virtual registers and physical register units.
Information about a live register.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This file implements the LivePhysRegs utility for tracking liveness of physical registers.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
void setSingleDomain(unsigned domain)
A BumpPtrAllocator that allows only elements of a specific type to be allocated.
A range adaptor for a pair of iterators.
void setPreservesAll()
Set by analyses that do not transform their input at all.
A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track of execution domains...
MachineFunctionProperties & set(Property P)
A set of physical registers with utility functions to track liveness when walking backward/forward th...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Properties which a MachineFunction may have at a given point in time.
MachineFunctionProperties getRequiredProperties() const override