Home | History | Annotate | Download | only in priv

Lines Matching refs:vreg

107          vreg.  Is safely left at False, and becomes True after a
113 Bound /* in use (holding value of some vreg) */
116 /* If .disp == Bound, what vreg is it bound to? */
117 HReg vreg;
123 (vreg_state) from vreg numbers back to entries in rreg_state. It
125 hregNumber(rreg_state[j].vreg) == i -- that is, the two entries
127 which involve looking for a particular vreg: there is no need to
129 vreg_state. The FAQ "does this vreg already have an associated
132 To indicate, in vreg_state[i], that a given vreg is not currently
165 finding the vreg which is mentioned as far ahead as possible, in
195 instrs_in->arr[m], state[k].vreg, mode64))
207 /* Check that this vreg has been assigned a sane spill offset. */
208 static inline void sanity_check_spill_offset ( VRegLR* vreg )
210 if (vreg->reg_class == HRcVec128 || vreg->reg_class == HRcFlt64) {
211 vassert(0 == ((UShort)vreg->spill_offset % 16));
213 vassert(0 == ((UShort)vreg->spill_offset % 8));
300 vreg numbers 0, 1 .. n_vregs-1. Appearance of a vreg outside
352 HReg rreg, vreg, vregS, vregD;
390 /* The vreg -> rreg map constructed and then applied to each
434 (*ppReg)(rreg_state[z].vreg); \
472 rreg_state[j].vreg = INVALID_HREG;
481 /* --------- Stage 1: compute vreg live ranges. --------- */
484 /* ------ start of SET UP TO COMPUTE VREG LIVE RANGES ------ */
487 vreg, and are not interested in
504 /* ------ end of SET UP TO COMPUTE VREG LIVE RANGES ------ */
543 /* ------ start of DEAL WITH VREG LIVE RANGES ------ */
548 vreg = reg_usage.hreg[j];
550 if (!hregIsVirtual(vreg))
552 k = hregNumber(vreg);
557 vex_printf("vreg %d, n_vregs %d\n", k, n_vregs);
558 vpanic("doRegisterAllocation: out-of-range vreg");
564 /* First mention of this vreg. */
565 vreg_lrs[k].reg_class = hregClass(vreg);
568 vassert(vreg_lrs[k].reg_class == hregClass(vreg));
575 vex_printf("\n\nOFFENDING VREG = %d\n", k);
577 "first event for vreg is Read");
588 vex_printf("\n\nOFFENDING VREG = %d\n", k);
590 "first event for vreg is Modify");
600 /* ------ end of DEAL WITH VREG LIVE RANGES ------ */
767 vex_printf("vreg %d: la = %d, db = %d\n",
816 /* True iff this vreg is unused. In which case we also expect
825 spill a vreg of class Flt64 or Vec128, we'll need to find two
833 up to 128 bits in which to spill the vreg. Since we are
881 vex_printf("vreg %d --> spill offset %d\n",
889 establish which, if any, rreg each vreg would prefer to be in.
981 /* Sanity check 3: all vreg-rreg bindings must bind registers
989 == hregClass(rreg_state[j].vreg));
990 vassert( hregIsVirtual(rreg_state[j].vreg));
996 rreg_state[j].vreg points at some vreg_state entry then
1002 k = hregNumber(rreg_state[j].vreg);
1012 vassert(hregNumber(rreg_state[k].vreg) == j);
1047 if (rreg_state[m].disp == Bound && rreg_state[m].vreg == vregS)
1057 rreg_state[m].vreg = vregD;
1063 /* This rreg has become associated with a different vreg and
1082 vreg = hregNumber(rreg_state[j].vreg);
1083 vassert(IS_VALID_VREGNO(vreg));
1084 if (vreg_lrs[vreg].dead_before <= ii) {
1087 m = hregNumber(rreg_state[j].vreg);
1102 one of their live ranges. If any such rreg holds a vreg, we
1142 m = hregNumber(rreg_state[k].vreg);
1144 /* Yes, there is an associated vreg. Spill it if it's
1165 rreg_state[k].vreg = INVALID_HREG;
1186 We also build up the final vreg->rreg mapping to be applied
1195 /* If the instruction reads exactly one vreg which is currently
1196 in a spill slot, and this is last use of that vreg, see if we
1212 vreg = reg_usage.hreg[j];
1214 if (!hregIsVirtual(vreg))
1219 m = hregNumber(vreg);
1228 cand = vreg;
1266 vreg = reg_usage.hreg[j];
1269 if (!hregIsVirtual(vreg))
1273 vex_printf("considering "); (*ppReg)(vreg); vex_printf("\n");
1276 /* Now we're trying to find a rreg for "vreg". First of all,
1279 m = hregNumber(vreg);
1284 addToHRegRemap(&remap, vreg, rreg_state[k].rreg);
1302 || hregClass(rreg_state[k].rreg) != hregClass(vreg))
1319 rreg_state[k].vreg = vreg;
1320 m = hregNumber(vreg);
1323 addToHRegRemap(&remap, vreg, rreg_state[k].rreg);
1326 guarantee that the first event for a vreg is a write.
1328 the first reference for this vreg, and so a reload is
1357 /* Well, now we have no option but to spill a vreg. It's
1358 important to make a good choice of vreg to spill, and of
1359 course we need to be careful not to spill a vreg which is
1363 candidates, due to holding a vreg mentioned by this
1369 if (hregClass(rreg_state[k].rreg) != hregClass(vreg))
1373 if (rreg_state[k].vreg == reg_usage.hreg[m]) {
1382 the next use of its associated vreg is as far ahead as
1393 ppHRegClass(hregClass(vreg));
1402 vassert(hregClass(rreg_state[spillee].rreg) == hregClass(vreg));
1403 /* check we're not ejecting the vreg for which we are trying
1405 vassert(rreg_state[spillee].vreg != vreg);
1407 m = hregNumber(rreg_state[spillee].vreg);
1411 live vreg. */
1428 rreg_state[spillee].vreg = vreg;
1433 m = hregNumber(vreg);
1437 /* Now, if this vreg is being read or modified (as opposed to
1461 /* So after much twisting and turning, we have vreg mapped to
1463 addToHRegRemap(&remap, vreg, rreg_state[spillee].rreg);
1470 - a suitable vreg->rreg mapping for this instruction has been
1510 rreg_state[k].vreg = INVALID_HREG;