void AliasUses(BITINT *bits, IMODE *im, BOOLEAN rhs) { if (im) { if (rhs) { if (im->offset->type == en_tempref) { ormap(bits, tempInfo[im->offset->v.sp->value.i]->modifiedBy); if (im->mode == i_direct) { im = LookupLoadTemp(im, im); } setbit(bits, termMap[im->offset->v.sp->value.i]); } else if (im->mode == i_direct) { ALIASNAME *an = LookupMem(im); ALIASADDRESS *aa ; an = LookupAliasName(an, 0); aa = LookupAddress(an, 0); while (aa->merge) aa = aa->merge; if (aa->modifiedBy) ormap(bits, aa->modifiedBy); im = GetLoadTemp(im); if (im) { setbit(bits, termMap[im->offset->v.sp->value.i]); } } else if (im->mode == i_immed && !isintconst(im->offset) && !iscomplexconst(im->offset) && !isfloatconst(im->offset) && im->offset->type != en_labcon) { ALIASNAME *an = LookupMem(im); ALIASADDRESS *aa ; aa = LookupAddress(an, 0); while (aa->merge) aa = aa->merge; if (aa->modifiedBy) ormap(bits, aa->modifiedBy); im = im->offset->v.sp->imvalue; if (im) { im = GetLoadTemp(im); if (im) { setbit(bits, termMap[im->offset->v.sp->value.i]); } } } } else { setbit(bits, termMap[im->offset->v.sp->value.i]); } } }
static void ScanUIVs(void) { int n = (tempCount + BITINTBITS-1)/BITINTBITS; BOOL done = FALSE; ALIASLIST *al = parmList; int i; ResetProcessed(); uivBytes = aallocbit(tempCount); /* while (al) { scanDepends(uivBytes, al->address->pointsto, n); al = al->next; } */ for (i=0; i < DAGSIZE; i++) { ALIASADDRESS *aa = addresses[i]; while (aa) { ALIASADDRESS *aa1 = aa; IMODE *im; while (aa1->merge) aa1 = aa1->merge; if (aa1->name->byUIV) { im = aa1->name->v.uiv->im; } else { im = aa1->name->v.name; } switch (im->offset->type) { case en_auto: if (im->offset->v.sp->storage_class != sc_parameter) break; case en_global: case en_label: case en_pc: case en_threadlocal: im = GetLoadTemp(im); if (im) setbit(uivBytes, im->offset->v.sp->value.i); break; } aa = aa->next; } } complementmap(uivBytes); }
static void ScanUIVs(void) { BOOLEAN done = FALSE; ALIASLIST *al = parmList; int i; ResetProcessed(); uivBytes = aallocbit(termCount); for (i=0; i < DAGSIZE; i++) { ALIASADDRESS *aa = addresses[i]; while (aa) { ALIASADDRESS *aa1 = aa; IMODE *im; while (aa1->merge) aa1 = aa1->merge; if (aa1->name->byUIV) { im = aa1->name->v.uiv->im; } else { im = aa1->name->v.name; } switch (im->offset->type) { case en_auto: case en_global: case en_label: case en_pc: case en_threadlocal: im = GetLoadTemp(im); if (im) setbit(uivBytes, termMap[im->offset->v.sp->value.i]); break; default: break; } aa = aa->next; } } }