Lines Matching defs:Domain
19 // This pass changes the variant instructions to minimize domain crossings.
41 /// execution domain. Multiple registers may refer to the same open
43 /// domain.
49 /// domain, but if we were forced to pay the penalty of a domain crossing, we
74 // Is domain available?
75 bool hasDomain(unsigned domain) const {
76 return AvailableDomains & (1u << domain);
79 // Mark domain as available.
80 void addDomain(unsigned domain) {
81 AvailableDomains |= 1u << domain;
84 // Restrict to a single domain available.
85 void setSingleDomain(unsigned domain) {
86 AvailableDomains = 1u << domain;
94 // First domain available.
175 DomainValue *alloc(int domain = -1);
186 void force(int rx, unsigned domain);
187 void collapse(DomainValue *dv, unsigned domain);
195 void visitHardInstr(MachineInstr*, unsigned domain);
210 DomainValue *ExeDepsFix::alloc(int domain) {
214 if (domain >= 0)
215 dv->addDomain(domain);
282 /// Force register rx into domain.
283 void ExeDepsFix::force(int rx, unsigned domain) {
288 dv->addDomain(domain);
289 else if (dv->hasDomain(domain))
290 collapse(dv, domain);
293 // force the new value into domain. This costs a domain crossing.
296 LiveRegs[rx].Value->addDomain(domain);
300 setLiveReg(rx, alloc(domain));
304 /// Collapse open DomainValue into given domain. If there are multiple
306 void ExeDepsFix::collapse(DomainValue *dv, unsigned domain) {
307 assert(dv->hasDomain(domain) && "Cannot collapse");
311 TII->setExecutionDomain(dv->Instrs.pop_back_val(), domain);
312 dv->setSingleDomain(domain);
318 setLiveReg(rx, alloc(domain));
409 unsigned Domain = LiveRegs[rx].Value->getFirstDomain();
410 if (!pdv->isCollapsed() && pdv->hasDomain(Domain))
411 collapse(pdv, Domain);
576 // A hard instruction only works in one domain. All input registers will be
577 // forced into that domain.
578 void ExeDepsFix::visitHardInstr(MachineInstr *mi, unsigned domain) {
586 force(rx, domain);
596 force(rx, domain);
621 // If there are no common domains, we must pay the cross-domain
634 // If the collapsed operands force a single domain, propagate the collapse.
636 unsigned domain = countTrailingZeros(available);
637 TII->setExecutionDomain(mi, domain);
638 visitHardInstr(mi, domain);
674 assert(dv->AvailableDomains && "Domain should have been filtered");