Lines Matching refs:DomainValue

39 /// A DomainValue is a bit like LiveIntervals' ValNo, but it also keeps track
42 /// An open DomainValue represents a set of instructions that can still switch
44 /// DomainValue - they will eventually be collapsed to the same execution
47 /// A collapsed DomainValue represents a single register that has been forced
49 /// DomainValue for each register, but it may contain multiple execution
55 struct DomainValue {
59 // Bitmask of available domains. For an open DomainValue, it is the still
60 // possible domains for collapsing. For a collapsed DomainValue it is the
64 // Pointer to the next DomainValue in a chain. When two DomainValues are
65 // merged, Victim.Next is set to point to Victor, so old DomainValue
67 DomainValue *Next;
72 // A collapsed DomainValue has no instructions to twiddle - it simply keeps
104 DomainValue() : Refs(0) { clear(); }
106 // Clear this DomainValue and point to next which has all its data.
119 /// This counts as a DomainValue reference.
120 DomainValue *Value;
133 SpecificBumpPtrAllocator<DomainValue> Allocator;
134 SmallVector<DomainValue*,16> Avail;
179 // DomainValue allocation.
180 DomainValue *alloc(int domain = -1);
181 DomainValue *retain(DomainValue *DV) {
185 void release(DomainValue*);
186 DomainValue *resolve(DomainValue*&);
189 void setLiveReg(int rx, DomainValue *DV);
192 void collapse(DomainValue *dv, unsigned domain);
193 bool merge(DomainValue *A, DomainValue *B);
217 DomainValue *ExeDepsFix::alloc(int domain) {
218 DomainValue *dv = Avail.empty() ?
219 new(Allocator.Allocate()) DomainValue :
224 assert(!dv->Next && "Chained DomainValue shouldn't have been recycled");
230 void ExeDepsFix::release(DomainValue *DV) {
232 assert(DV->Refs && "Bad DomainValue");
240 DomainValue *Next = DV->Next;
243 // Also release the next DomainValue in the chain.
248 /// Follow the chain of dead DomainValues until a live DomainValue is reached.
250 DomainValue *ExeDepsFix::resolve(DomainValue *&DVRef) {
251 DomainValue *DV = DVRef;
267 void ExeDepsFix::setLiveReg(int rx, DomainValue *dv) {
278 // Kill register rx, recycle or collapse any DomainValue.
293 if (DomainValue *dv = LiveRegs[rx].Value) {
299 // This is an incompatible open DomainValue. Collapse it to whatever and
306 // Set up basic collapsed DomainValue.
311 /// Collapse open DomainValue into given domain. If there are multiple
312 /// registers using dv, they each get a unique collapsed DomainValue.
313 void ExeDepsFix::collapse(DomainValue *dv, unsigned domain) {
329 bool ExeDepsFix::merge(DomainValue *A, DomainValue *B) {
341 // Clear the old DomainValue so we won't try to swizzle instructions twice.
404 DomainValue *pdv = resolve(fi->second[rx].Value);
412 // We have a live DomainValue from more than one predecessor.
617 DomainValue *dv = LiveRegs[rx].Value;
629 // Open DomainValue is compatible, save it for merging.
632 // Open DomainValue is not compatible with instruction. It is useless
653 // This useless DomainValue could have been missed above.
673 DomainValue *dv = nullptr;
683 DomainValue *Latest = Regs.pop_back_val().Value;
698 // dv is the DomainValue we are going to use for this instruction.