Beispiel #1
0
void AliasPass2(void)
{
    AllocateProcessed();
    MakeAliasLists();
    ScanUIVs();
    ScanMem();
//    if (icdFile)
//        DumpAliases();
    complementmap(uivBytes);
}
Beispiel #2
0
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);
}