Пример #1
0
 PhysReg lookup(Vreg vreg, VregKind kind) {
   auto ivl = xls.intervals[vreg];
   if (!ivl || vreg.isPhys()) return vreg;
   PhysReg reg = ivl->childAt(pos)->reg;
   assert((kind == VregKind::Gpr && reg.isGP()) ||
          (kind == VregKind::Simd && reg.isSIMD()) ||
          (kind == VregKind::Any && reg != InvalidReg));
   return reg;
 }
Пример #2
0
std::string show(Vreg r) {
  if (!r.isValid()) return "%?";
  std::ostringstream str;
  if (r.isPhys()) {
    mcg->backEnd().streamPhysReg(str, r);
  } else {
    str << "%" << size_t(r);
  }
  return str.str();
}