亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? regalloc.c

?? 開放源碼的編譯器open watcom 1.6.0版的源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
/****************************************************************************
*
*                            Open Watcom Project
*
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
*  ========================================================================
*
*    This file contains Original Code and/or Modifications of Original
*    Code as defined in and that are subject to the Sybase Open Watcom
*    Public License version 1.0 (the 'License'). You may not use this file
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
*    provided with the Original Code and Modifications, and is also
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  Register allocator.
*
****************************************************************************/


#include "standard.h"
#include "coderep.h"
#include "opcodes.h"
#include "conflict.h"
#include "regset.h"
#include "pattern.h"
#include "procdef.h"
#include "hostsys.h"
#include "zoiks.h"
#include "model.h"

enum allocation_state {
    ALLOC_DONE,
    ALLOC_BITS,
    ALLOC_CONST_TEMP
};

extern  bool            SideEffect(instruction*);
extern  void            NowDead(name*,conflict_node*,name_set*,block*);
extern  void            PrefixIns(instruction*,instruction*);
extern  void            BurnRegTree(reg_tree*);
extern  void            IMBlip(void);
extern  conflict_node   *NameConflict(instruction*,name*);
extern  void            BuildNameTree(conflict_node*);
extern  void            AxeDeadCode(void);
extern  void            BurnNameTree(reg_tree*);
extern  bool            WorthProlog(conflict_node*,hw_reg_set);
extern  instruction     *MakeMove(name*,name*,type_class_def);
extern  void            DoNothing(instruction*);
extern  int             ExpandOps(bool);
extern  void            FindReferences(void);
extern  void            NowAlive(name*,conflict_node*,name_set*,block*);
extern  name            *DeAlias(name*);
extern  void            BuildRegTree(conflict_node*);
extern  void            FreeAConflict(conflict_node*);
extern  bool            IsIndexReg(hw_reg_set,type_class_def,bool);
extern  void            LiveInfoUpdate(void);
extern  void            MakeLiveInfo(void);
extern  void            FreeConflicts(void);
extern  reg_set_index   SegIndex(void);
extern  void            DelSegOp(instruction*,int);
extern  void            FixChoices(void);
extern  void            DelSegRes(instruction*);
extern  void            MakeConflicts(void);
extern  void            AddSegment(instruction*);
extern  void            SuffixIns(instruction*,instruction*);
extern  name            *ScaleIndex(name*,name*,type_length,type_class_def,type_length,int,i_flags);
extern  void            FixGenEntry(instruction*);
extern  int             NumOperands(instruction*);
extern  void            CalcSavings(conflict_node*);
extern  hw_reg_set      LowOffsetReg(hw_reg_set);
extern  name            *AllocRegName(hw_reg_set);
extern  bool            PropagateMoves(void);
extern  bool            PropRegsOne(void);
extern  conflict_node   *FindConflictNode(name*,block*,instruction*);
extern  hw_reg_set      HighOffsetReg(hw_reg_set);
extern  void            DeadInstructions(void);
extern  void            GRBlip(void);
extern  bool            IsSegReg(hw_reg_set);
extern  void            *SortList(void *,unsigned,bool (*)(void*,void*) );
extern  bool            MoreConflicts(void);
extern  void            DBAllocReg(name*,name*);
extern  void            MemConstTemp(conflict_node*);
extern  void            ConstSavings(void);
extern  void            RegInsDead(void);
extern  instruction     *FoldIns( instruction * );
extern  bool            IsUncacheableMemory( name * );
extern  hw_reg_set      MustSaveRegs(void);

extern  proc_def         *CurrProc;
extern  conflict_node    *ConfList;
extern  op_regs          RegList[];
extern  hw_reg_set       *RegSets[];
extern  hw_reg_set       GivenRegisters;
extern  name             *Names[];
extern  bool             BlockByBlock;
extern  bool             HaveLiveInfo;
extern  block           *HeadBlock;




static  bool    ContainedIn( name *name1, name *name2 ) {
/********************************************************
    Returns true if name1 is completely contained within the location
    occupied by name2
*/

    if( name1->n.class != name2->n.class ) return( FALSE );
    if( name1->n.class == N_TEMP ) {
        if( DeAlias( name1 ) != DeAlias( name2 ) ) return( FALSE );
    } else if( name1->n.class == N_MEMORY ) {
        if( name1 != name2 ) return( FALSE );
    } else {
        return( FALSE );
    }
    if( name1->v.offset < name2->v.offset ) return( FALSE );
    if( name1->v.offset + name1->n.size > name2->v.offset + name2->n.size )
        return( FALSE );
    return( TRUE );
}


static  hw_reg_set      SearchTree( reg_tree *tree,
                                    name *opnd, hw_reg_set reg ) {
/*****************************************************************
    Given a register "reg", and a reg_tree "tree", return the
    appropriate piece of "reg" to be associated with name "opnd".
*/

    if( tree->offset == opnd->v.offset && tree->size == opnd->n.size ) {
        return( reg );
    }
    if( opnd->v.offset < tree->offset + ( tree->size / 2 ) ) {
        return( SearchTree( tree->lo, opnd, LowOffsetReg( reg ) ) );
    } else {
        return( SearchTree( tree->hi, opnd, HighOffsetReg( reg ) ) );
    }
}


static  name    *FindReg( reg_tree *tree, name *opnd, name *reg ) {
/******************************************************************
    see SearchTree
*/

    return( AllocRegName( SearchTree( tree, opnd, reg->r.reg ) ) );
}


static  name    *ReplIndex( instruction *ins,
                            reg_tree *tree, name *x, name *reg ) {
/*****************************************************************
    Replace the index field of "x" with register "reg" in instruction "ins".
*/

    name        *new_x;

    ins->t.index_needs = RL_;
    reg = FindReg( tree, x->i.index, reg );
    new_x = ScaleIndex(reg, x->i.base, x->i.constant,
                        x->n.name_class, x->n.size, x->i.scale,
                        x->i.index_flags );
    return( new_x );
}


static  void    AssignMoreBits( void )
/*************************************
    Run through the list of conflicts and turn off the CONFLICT_ON_HOLD
    bit.  This is on for conflicts that needed an id bit but didn't get
    one.  MoreConflicts will assign a bit to any of these that weren't
    allocated the first time around.
*/
{
    conflict_node       *conf;

    conf = ConfList;
    while( conf != NULL ) {
        conf->state &= ~CONFLICT_ON_HOLD;
        conf = conf->next_conflict;
    }
    if( MoreConflicts() ) {
        MakeLiveInfo();
        AxeDeadCode();
    } else {
        LiveInfoUpdate();
    }
}


static  void    InitAChoice( name *temp ) {
/*****************************************/

    name        *alias;

    if( temp->n.class != N_TEMP ) return;
    if( temp->t.temp_flags & ALIAS ) return;
    alias = temp;
    do {
        alias->t.possible = RL_NUMBER_OF_SETS;
        alias = alias->t.alias;
    } while( alias != temp );
}


static  void    InitChoices( void )
/**********************************
    Set the possible register choices of all conflicts/temps to be
    RL_NUMBER_OF_SETS meaning there are no restrictions as yet.  This
    choice gets more restricted as each instruction involving the
    conflict is expanded.
*/
{
    conflict_node       *conf;
    name                *opnd;
    block               *blk;
    instruction         *ins;
    int                 i;

    conf = ConfList;
    while( conf != NULL ) {
        conf->possible = RL_NUMBER_OF_SETS;
        conf = conf->next_conflict;
    }
    if( BlockByBlock ) {
        /* this is WAY faster for BlockByBlock */
        blk = HeadBlock;
        while( blk != NULL ) {
            ins = blk->ins.hd.next;
            while( ins->head.opcode != OP_BLOCK ) {
                i = ins->num_operands;
                while( --i >= 0 ) {
                    InitAChoice( ins->operands[i] );
                }
                if( ins->result != NULL ) {
                    InitAChoice( ins->result );
                }
                ins = ins->head.next;
            }
            blk = blk->next_block;
        }
    } else {
        opnd = Names[ N_TEMP ];
        while( opnd != NULL ) {
            opnd->t.possible = RL_NUMBER_OF_SETS;
            opnd = opnd->n.next_name;
        }
    }
}


static  void    ReAlias( reg_tree *tree ) {
/******************************************
    Given a name tree, turn all temporaries into MASTER (not ALIAS)
    temporaries if their ancestor in the tree has no restrictions on
    which register it can have.  This effectively detaches the hi and lo
    part of a temporary so they may be treated separately during
    register allocation.
*/

    name        *curr;
    name        *new_ring;
    name        **owner;
    type_length endpoint;
    type_length begpoint;

    if( tree != NULL ) {
        if( tree->idx == RL_NUMBER_OF_SETS ) {
            ReAlias( tree->lo );
            ReAlias( tree->hi );
        } else {
            begpoint = tree->offset;
            endpoint = tree->size + begpoint;
            owner = &tree->temp->t.alias;
            new_ring = NULL;
            for(;;) {
                curr = *owner;
                if( curr->v.offset < begpoint
                 || curr->v.offset + curr->n.size > endpoint ) {
                    owner = &curr->t.alias;
                } else {
                    *owner = curr->t.alias;
                    if( new_ring == NULL ) {
                        new_ring = curr;
                        new_ring->t.alias = new_ring;
                    } else {
                        curr->t.alias = new_ring->t.alias;
                        new_ring->t.alias = curr;
                    }
                }
                if( curr == tree->temp ) break;
            }
            curr->t.temp_flags &= ~ALIAS;
        }
    }
}


static  bool    SplitConflicts( void )
/*************************************
    Build a name tree for each conflict, and then if the top of the tree
    has no restrictions on which registers it can have, its name mustn't
    be referenced by any instructions, so we call ReAlias to split make
    the high and low part their own "MASTER" rather than aliases of the
    temporary for the top of the tree.  See REGTREE.C for info re: name
    trees.

*/
{
    conflict_node       *conf;
    bool                change;

    change = FALSE;
    conf = ConfList;
    while( conf != NULL ) {
        BuildNameTree( conf );
        if( conf->tree != NULL
         && conf->tree->idx == RL_NUMBER_OF_SETS ) {
            change = TRUE;
            ReAlias( conf->tree );
            if( conf->tree->temp != NULL ) {
                conf->tree->temp->v.usage |= USE_MEMORY;
            }
            if( conf->tree->alt != NULL ) {
                conf->tree->alt->v.usage |= USE_MEMORY;
            }
        }
        BurnNameTree( conf->tree );
        conf->tree = NULL;
        conf = conf->next_conflict;
    }
    return( change );
}


extern  void    NullConflicts( var_usage off ) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
麻豆精品久久久| 亚洲午夜久久久久中文字幕久| 欧美日韩精品一区二区在线播放| k8久久久一区二区三区| 国产成a人亚洲精品| 国产成人精品亚洲日本在线桃色| 九九视频精品免费| 国内国产精品久久| 国产91精品一区二区麻豆网站| 国产一区二区看久久| 国产福利一区二区| 91农村精品一区二区在线| 99久久伊人网影院| 欧美影院精品一区| 制服丝袜中文字幕亚洲| 精品国产电影一区二区| 国产亚洲一二三区| 一区二区视频免费在线观看| 亚洲电影第三页| 蜜桃视频一区二区| 粉嫩一区二区三区性色av| 色94色欧美sute亚洲线路一久| 欧美日韩在线电影| 2021久久国产精品不只是精品| 欧美激情一区二区三区全黄 | 欧美三级日韩三级国产三级| 欧美日韩免费观看一区二区三区| 欧美一区二区三区的| 久久精品人人做| 亚洲国产乱码最新视频| 精品制服美女久久| 91在线观看成人| 欧美一级专区免费大片| 亚洲国产精品v| 午夜av区久久| 99精品国产视频| 91精品国产综合久久久久久| 国产欧美一区二区三区在线老狼| 一区二区免费看| 国产精品自拍av| 欧美乱熟臀69xxxxxx| 中文字幕电影一区| 免费成人av资源网| 色呦呦网站一区| 久久久久青草大香线综合精品| 一个色在线综合| 国产美女在线精品| 欧美电影一区二区| 亚洲美女免费视频| 国产精品一区二区久久不卡| 欧美日韩免费在线视频| 久久久久久久久久久99999| 亚洲一区二区三区小说| 懂色一区二区三区免费观看| 日韩免费视频线观看| 一区二区三区视频在线看| 国产成人精品亚洲午夜麻豆| 精品少妇一区二区三区视频免付费| 亚洲美女少妇撒尿| 99视频精品全部免费在线| 精品处破学生在线二十三| 亚洲成a人在线观看| 91免费国产在线| 中文字幕一区二区三区在线播放| 国产一区二区三区美女| 日韩一区二区在线看片| 日韩和欧美一区二区三区| 欧美日韩视频第一区| 亚洲四区在线观看| 91在线国产福利| 国产精品女上位| 成人av先锋影音| 国产精品久久影院| 成人精品在线视频观看| 国产精品久久久久久久久免费丝袜| 国产精品一区在线观看你懂的| 欧美一区二区三区男人的天堂| 日韩专区欧美专区| 欧美一区二区精品久久911| 日韩电影一二三区| 日韩精品一区二区三区在线播放 | 亚洲国产精品ⅴa在线观看| 麻豆国产精品一区二区三区| 91精品国产综合久久福利软件 | 国产一区二区三区av电影| 欧美成人乱码一区二区三区| 精品一区二区三区av| 精品少妇一区二区三区免费观看| 久久国产日韩欧美精品| 337p粉嫩大胆噜噜噜噜噜91av | 亚洲精品中文字幕在线观看| 色综合久久久久久久| 亚洲国产日产av| 日韩免费视频一区二区| 懂色av一区二区三区免费看| 一级特黄大欧美久久久| 8v天堂国产在线一区二区| 狠狠色丁香婷综合久久| 国产精品视频九色porn| 91国模大尺度私拍在线视频| 日韩中文欧美在线| 国产午夜亚洲精品不卡| 99久久精品免费看国产 | 欧美一区二区三区视频在线观看| 国产一区二区91| 亚洲欧美日韩在线不卡| 日韩一区二区免费高清| 国产91精品免费| 视频在线观看国产精品| 2024国产精品视频| 91电影在线观看| 国产在线播放一区二区三区| 亚洲裸体在线观看| 精品久久久久久久久久久久久久久| 成+人+亚洲+综合天堂| 日本在线播放一区二区三区| 国产精品你懂的在线| 91精品国产综合久久精品| 成人av第一页| 精一区二区三区| 亚洲伊人伊色伊影伊综合网| 国产日韩精品一区二区浪潮av| 欧美三级韩国三级日本一级| 国产成人精品www牛牛影视| 五月天一区二区| 亚洲天天做日日做天天谢日日欢| 精品国产123| 欧美精品精品一区| 色综合久久久久综合99| 国产激情视频一区二区在线观看 | 国产农村妇女精品| 91精品啪在线观看国产60岁| 色美美综合视频| 国产.欧美.日韩| 久久狠狠亚洲综合| 亚洲大片精品永久免费| 亚洲色图色小说| 国产欧美日韩视频在线观看| 欧美一级片在线观看| 在线一区二区视频| 91在线porny国产在线看| 成人精品一区二区三区四区| 国产呦精品一区二区三区网站 | 精品成人a区在线观看| 3d动漫精品啪啪一区二区竹菊| 日本精品一级二级| 一本久道中文字幕精品亚洲嫩| 成人一级视频在线观看| 国产精品1024久久| 大胆亚洲人体视频| 处破女av一区二区| 成人激情午夜影院| 不卡高清视频专区| jizz一区二区| 91麻豆福利精品推荐| av在线不卡网| 在线视频中文字幕一区二区| 91成人在线免费观看| 欧美片在线播放| 欧美女孩性生活视频| 91精品国产欧美日韩| 欧美一级精品在线| 欧美zozozo| 国产日韩欧美亚洲| 国产精品美女视频| 一区二区三区久久| 天天操天天干天天综合网| 蜜臀av国产精品久久久久| 激情综合色综合久久| 成人美女视频在线看| 一本大道久久精品懂色aⅴ| 欧美三日本三级三级在线播放| 在线播放中文一区| 欧美精品一区二区三区很污很色的| 久久久久久久久久久黄色| 成人免费在线视频观看| 亚洲国产成人tv| 国产一区二区三区日韩| 不卡视频免费播放| 欧美男男青年gay1069videost| 精品国产91亚洲一区二区三区婷婷 | 成人av电影在线网| 欧美性猛片aaaaaaa做受| 91麻豆精品91久久久久久清纯| 久久夜色精品国产噜噜av| 国产精品久久久久影院| 亚洲国产va精品久久久不卡综合| 国产在线精品免费| 91国产视频在线观看| 精品国产91亚洲一区二区三区婷婷| 综合色天天鬼久久鬼色| 日韩成人一区二区三区在线观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 日韩黄色免费网站| 成人app软件下载大全免费| 91精品国模一区二区三区| 国产精品久久午夜| 麻豆精品久久精品色综合| 在线看日本不卡| 亚洲国产精品成人综合|