Annotation of gcc/regs.h, revision 1.1.1.4

1.1       root        1: /* Define per-register tables for data flow info and register allocation.
1.1.1.4 ! root        2:    Copyright (C) 1987, 1993, 1994 Free Software Foundation, Inc.
1.1       root        3: 
                      4: This file is part of GNU CC.
                      5: 
                      6: GNU CC is free software; you can redistribute it and/or modify
                      7: it under the terms of the GNU General Public License as published by
                      8: the Free Software Foundation; either version 2, or (at your option)
                      9: any later version.
                     10: 
                     11: GNU CC is distributed in the hope that it will be useful,
                     12: but WITHOUT ANY WARRANTY; without even the implied warranty of
                     13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     14: GNU General Public License for more details.
                     15: 
                     16: You should have received a copy of the GNU General Public License
                     17: along with GNU CC; see the file COPYING.  If not, write to
                     18: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
                     19: 
                     20: 
                     21: 
                     22: #define REG_BYTES(R) mode_size[(int) GET_MODE (R)]
                     23: 
                     24: /* Get the number of consecutive hard regs required to hold the REG rtx R.
                     25:    When something may be an explicit hard reg, REG_SIZE is the only
                     26:    valid way to get this value.  You cannot get it from the regno.  */
                     27: 
                     28: #define REG_SIZE(R) \
                     29:   ((mode_size[(int) GET_MODE (R)] + UNITS_PER_WORD - 1) / UNITS_PER_WORD)
                     30: 
                     31: /* Maximum register number used in this function, plus one.  */
                     32: 
                     33: extern int max_regno;
                     34: 
                     35: /* Maximum number of SCRATCH rtx's in each block of this function.  */
                     36: 
                     37: extern int max_scratch;
                     38: 
                     39: /* Indexed by n, gives number of times (REG n) is used or set.
                     40:    References within loops may be counted more times.  */
                     41: 
                     42: extern int *reg_n_refs;
                     43: 
                     44: /* Indexed by n, gives number of times (REG n) is set.  */
                     45: 
                     46: extern short *reg_n_sets;
                     47: 
                     48: /* Indexed by N, gives number of insns in which register N dies.
                     49:    Note that if register N is live around loops, it can die
                     50:    in transitions between basic blocks, and that is not counted here.
                     51:    So this is only a reliable indicator of how many regions of life there are
                     52:    for registers that are contained in one basic block.  */
                     53: 
                     54: extern short *reg_n_deaths;
                     55: 
1.1.1.4 ! root       56: /* Indexed by N; says whether a psuedo register N was ever used
        !            57:    within a SUBREG that changes the size of the reg.  Some machines prohibit
        !            58:    such objects to be in certain (usually floating-point) registers.  */
        !            59: 
        !            60: extern char *reg_changes_size;
        !            61: 
1.1       root       62: /* Get the number of consecutive words required to hold pseudo-reg N.  */
                     63: 
                     64: #define PSEUDO_REGNO_SIZE(N) \
                     65:   ((GET_MODE_SIZE (PSEUDO_REGNO_MODE (N)) + UNITS_PER_WORD - 1)                \
                     66:    / UNITS_PER_WORD)
                     67: 
                     68: /* Get the number of bytes required to hold pseudo-reg N.  */
                     69: 
                     70: #define PSEUDO_REGNO_BYTES(N) \
                     71:   GET_MODE_SIZE (PSEUDO_REGNO_MODE (N))
                     72: 
                     73: /* Get the machine mode of pseudo-reg N.  */
                     74: 
                     75: #define PSEUDO_REGNO_MODE(N) GET_MODE (regno_reg_rtx[N])
                     76: 
                     77: /* Indexed by N, gives number of CALL_INSNS across which (REG n) is live.  */
                     78: 
                     79: extern int *reg_n_calls_crossed;
                     80: 
                     81: /* Total number of instructions at which (REG n) is live.
                     82:    The larger this is, the less priority (REG n) gets for
                     83:    allocation in a hard register (in global-alloc).
                     84:    This is set in flow.c and remains valid for the rest of the compilation
                     85:    of the function; it is used to control register allocation.
                     86: 
                     87:    local-alloc.c may alter this number to change the priority.
                     88: 
                     89:    Negative values are special.
                     90:    -1 is used to mark a pseudo reg which has a constant or memory equivalent
                     91:    and is used infrequently enough that it should not get a hard register.
                     92:    -2 is used to mark a pseudo reg for a parameter, when a frame pointer
1.1.1.2   root       93:    is not required.  global.c makes an allocno for this but does
1.1       root       94:    not try to assign a hard register to it.  */
                     95: 
                     96: extern int *reg_live_length;
                     97: 
                     98: /* Vector of substitutions of register numbers,
                     99:    used to map pseudo regs into hardware regs.  */
                    100: 
                    101: extern short *reg_renumber;
                    102: 
                    103: /* Vector indexed by hardware reg
                    104:    saying whether that reg is ever used.  */
                    105: 
                    106: extern char regs_ever_live[FIRST_PSEUDO_REGISTER];
                    107: 
                    108: /* Vector indexed by hardware reg giving its name.  */
                    109: 
                    110: extern char *reg_names[FIRST_PSEUDO_REGISTER];
                    111: 
1.1.1.4 ! root      112: /* For each hard register, the widest mode object that it can contain.
        !           113:    This will be a MODE_INT mode if the register can hold integers.  Otherwise
        !           114:    it will be a MODE_FLOAT or a MODE_CC mode, whichever is valid for the
        !           115:    register.  */
        !           116: 
        !           117: extern enum machine_mode reg_raw_mode[FIRST_PSEUDO_REGISTER];
        !           118: 
1.1       root      119: /* Vector indexed by regno; gives uid of first insn using that reg.
                    120:    This is computed by reg_scan for use by cse and loop.
                    121:    It is sometimes adjusted for subsequent changes during loop,
                    122:    but not adjusted by cse even if cse invalidates it.  */
                    123: 
1.1.1.2   root      124: extern int *regno_first_uid;
1.1       root      125: 
                    126: /* Vector indexed by regno; gives uid of last insn using that reg.
                    127:    This is computed by reg_scan for use by cse and loop.
                    128:    It is sometimes adjusted for subsequent changes during loop,
                    129:    but not adjusted by cse even if cse invalidates it.
                    130:    This is harmless since cse won't scan through a loop end.  */
                    131: 
1.1.1.2   root      132: extern int *regno_last_uid;
1.1       root      133: 
1.1.1.3   root      134: /* Similar, but includes insns that mention the reg in their notes.  */
                    135: 
                    136: extern int *regno_last_note_uid;
                    137: 
1.1       root      138: /* Vector indexed by regno; contains 1 for a register is considered a pointer.
                    139:    Reloading, etc. will use a pointer register rather than a non-pointer
                    140:    as the base register in an address, when there is a choice of two regs.  */
                    141: 
                    142: extern char *regno_pointer_flag;
                    143: #define REGNO_POINTER_FLAG(REGNO) regno_pointer_flag[REGNO]
                    144: 
                    145: /* List made of EXPR_LIST rtx's which gives pairs of pseudo registers
                    146:    that have to go in the same hard reg.  */
                    147: extern rtx regs_may_share;
                    148: 
                    149: /* Vector mapping pseudo regno into the REG rtx for that register.
                    150:    This is computed by reg_scan.  */
                    151: 
                    152: extern rtx *regno_reg_rtx;
                    153: 
                    154: /* Flag set by local-alloc or global-alloc if they decide to allocate
                    155:    something in a call-clobbered register.  */
                    156: 
                    157: extern int caller_save_needed;
                    158: 
                    159: /* Predicate to decide whether to give a hard reg to a pseudo which
                    160:    is referenced REFS times and would need to be saved and restored
                    161:    around a call CALLS times.  */
                    162: 
                    163: #ifndef CALLER_SAVE_PROFITABLE
                    164: #define CALLER_SAVE_PROFITABLE(REFS, CALLS)  (4 * (CALLS) < (REFS))
                    165: #endif
1.1.1.3   root      166: 
                    167: /* Allocated in local_alloc.  */
                    168: 
                    169: /* A list of SCRATCH rtl allocated by local-alloc.  */
                    170: extern rtx *scratch_list;
                    171: /* The basic block in which each SCRATCH is used.  */
                    172: extern int *scratch_block;
                    173: /* The length of the arrays pointed to by scratch_block and scratch_list.  */
                    174: extern int scratch_list_length;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.