📄 999-cvs-updates.patch
字号:
if (! optimize)@@ -3851,11 +3850,7 @@ case SUBREG: #ifdef CANNOT_CHANGE_MODE_CLASS- if (GET_CODE (SUBREG_REG (x)) == REG- && REGNO (SUBREG_REG (x)) >= FIRST_PSEUDO_REGISTER)- bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (x))- * MAX_MACHINE_MODE- + GET_MODE (x));+ record_subregs_of_mode (x); #endif /* While we're here, optimize this case. */@@ -3900,12 +3895,8 @@ || GET_CODE (testreg) == SUBREG) { #ifdef CANNOT_CHANGE_MODE_CLASS- if (GET_CODE (testreg) == SUBREG- && GET_CODE (SUBREG_REG (testreg)) == REG- && REGNO (SUBREG_REG (testreg)) >= FIRST_PSEUDO_REGISTER)- bitmap_set_bit (&subregs_of_mode, REGNO (SUBREG_REG (testreg))- * MAX_MACHINE_MODE- + GET_MODE (testreg));+ if (GET_CODE (testreg) == SUBREG)+ record_subregs_of_mode (testreg); #endif /* Modifying a single register in an alternate modeIndex: gcc/function.c===================================================================RCS file: /cvs/gcc/gcc/gcc/function.c,vretrieving revision 1.389.2.16retrieving revision 1.389.2.18diff -u -r1.389.2.16 -r1.389.2.18--- gcc/gcc/function.c 16 May 2004 20:27:16 -0000 1.389.2.16+++ gcc/gcc/function.c 16 Dec 2004 14:04:34 -0000 1.389.2.18@@ -226,9 +226,8 @@ int, struct function *)); static struct temp_slot *find_temp_slot_from_address PARAMS ((rtx)); static void put_reg_into_stack PARAMS ((struct function *, rtx, tree,- enum machine_mode, enum machine_mode,- int, unsigned int, int,- htab_t));+ enum machine_mode, unsigned int,+ int, int, int, htab_t)); static void schedule_fixup_var_refs PARAMS ((struct function *, rtx, tree, enum machine_mode, htab_t));@@ -508,6 +507,7 @@ ALIGN controls the amount of alignment for the address of the slot: 0 means according to MODE, -1 means use BIGGEST_ALIGNMENT and round size to multiple of that,+ -2 means use BITS_PER_UNIT, positive specifies alignment boundary in bits. We do not round to stack_boundary here.@@ -548,6 +548,8 @@ alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT; size = CEIL_ROUND (size, alignment); }+ else if (align == -2)+ alignment = 1; /* BITS_PER_UNIT / BITS_PER_UNIT */ else alignment = align / BITS_PER_UNIT; @@ -1342,9 +1344,9 @@ enum machine_mode promoted_mode, decl_mode; struct function *function = 0; tree context;- int can_use_addressof;- int volatilep = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);- int usedp = (TREE_USED (decl)+ int can_use_addressof_p;+ int volatile_p = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl);+ int used_p = (TREE_USED (decl) || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0)); context = decl_function_context (decl);@@ -1391,7 +1393,7 @@ /* If this variable lives in the current function and we don't need to put it in the stack for the sake of setjmp or the non-locality, try to keep it in a register until we know we actually need the address. */- can_use_addressof+ can_use_addressof_p = (function == 0 && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl)) && optimize > 0@@ -1404,7 +1406,8 @@ /* If we can't use ADDRESSOF, make sure we see through one we already generated. */- if (! can_use_addressof && GET_CODE (reg) == MEM+ if (! can_use_addressof_p+ && GET_CODE (reg) == MEM && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) reg = XEXP (XEXP (reg, 0), 0); @@ -1412,11 +1415,11 @@ if (GET_CODE (reg) == REG) {- if (can_use_addressof)+ if (can_use_addressof_p) gen_mem_addressof (reg, decl, rescan); else- put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode,- decl_mode, volatilep, 0, usedp, 0);+ put_reg_into_stack (function, reg, TREE_TYPE (decl), decl_mode,+ 0, volatile_p, used_p, 0, 0); } else if (GET_CODE (reg) == CONCAT) {@@ -1432,14 +1435,14 @@ #ifdef FRAME_GROWS_DOWNWARD /* Since part 0 should have a lower address, do it second. */ put_reg_into_stack (function, hipart, part_type, part_mode,- part_mode, volatilep, 0, 0, 0);+ 0, volatile_p, 0, 0, 0); put_reg_into_stack (function, lopart, part_type, part_mode,- part_mode, volatilep, 0, 0, 0);+ 0, volatile_p, 0, 1, 0); #else put_reg_into_stack (function, lopart, part_type, part_mode,- part_mode, volatilep, 0, 0, 0);+ 0, volatile_p, 0, 0, 0); put_reg_into_stack (function, hipart, part_type, part_mode,- part_mode, volatilep, 0, 0, 0);+ 0, volatile_p, 0, 1, 0); #endif /* Change the CONCAT into a combined MEM for both parts. */@@ -1460,7 +1463,7 @@ /* Prevent sharing of rtl that might lose. */ if (GET_CODE (XEXP (reg, 0)) == PLUS) XEXP (reg, 0) = copy_rtx (XEXP (reg, 0));- if (usedp && rescan)+ if (used_p && rescan) { schedule_fixup_var_refs (function, reg, TREE_TYPE (decl), promoted_mode, 0);@@ -1474,26 +1477,29 @@ /* Subroutine of put_var_into_stack. This puts a single pseudo reg REG into the stack frame of FUNCTION (0 means the current function).+ TYPE is the user-level data type of the value hold in the register. DECL_MODE is the machine mode of the user-level data type.- PROMOTED_MODE is the machine mode of the register.- VOLATILE_P is nonzero if this is for a "volatile" decl.- USED_P is nonzero if this reg might have already been used in an insn. */+ ORIGINAL_REGNO must be set if the real regno is not visible in REG.+ VOLATILE_P is true if this is for a "volatile" decl.+ USED_P is true if this reg might have already been used in an insn.+ CONSECUTIVE_P is true if the stack slot assigned to reg must be+ consecutive with the previous stack slot. */ static void-put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p,- original_regno, used_p, ht)+put_reg_into_stack (function, reg, type, decl_mode, original_regno,+ volatile_p, used_p, consecutive_p, ht) struct function *function; rtx reg; tree type;- enum machine_mode promoted_mode, decl_mode;- int volatile_p;+ enum machine_mode decl_mode; unsigned int original_regno;- int used_p;+ int volatile_p, used_p, consecutive_p; htab_t ht; { struct function *func = function ? function : cfun;- rtx new = 0;+ enum machine_mode mode = GET_MODE (reg); unsigned int regno = original_regno;+ rtx new = 0; if (regno == 0) regno = REGNO (reg);@@ -1506,7 +1512,8 @@ } if (new == 0)- new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func);+ new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode),+ consecutive_p ? -2 : 0, func); PUT_CODE (reg, MEM); PUT_MODE (reg, decl_mode);@@ -1528,7 +1535,7 @@ } if (used_p)- schedule_fixup_var_refs (function, reg, type, promoted_mode, ht);+ schedule_fixup_var_refs (function, reg, type, mode, ht); } /* Make sure that all refs to the variable, previously made@@ -1716,7 +1723,7 @@ tmp.key = var; ime = (struct insns_for_mem_entry *) htab_find (ht, &tmp); for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1))- if (INSN_P (XEXP (insn_list, 0)))+ if (INSN_P (XEXP (insn_list, 0)) && !INSN_DELETED_P (XEXP (insn_list, 0))) fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode, unsignedp, 1, may_share); }@@ -3025,8 +3032,8 @@ used_p = 1; } - put_reg_into_stack (0, reg, type, GET_MODE (reg), GET_MODE (reg),- volatile_p, ADDRESSOF_REGNO (r), used_p, ht);+ put_reg_into_stack (0, reg, type, GET_MODE (reg), ADDRESSOF_REGNO (r),+ volatile_p, used_p, 0, ht); } /* List of replacements made below in purge_addressof_1 when creatingIndex: gcc/gccbug.in===================================================================RCS file: /cvs/gcc/gcc/gcc/gccbug.in,vretrieving revision 1.15.34.1retrieving revision 1.15.34.2diff -u -r1.15.34.1 -r1.15.34.2--- gcc/gcc/gccbug.in 2 Jan 2003 05:22:37 -0000 1.15.34.1+++ gcc/gcc/gccbug.in 21 Jan 2005 10:08:47 -0000 1.15.34.2@@ -198,7 +198,7 @@ done # spam does not need to be listed here-CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc optimization other preprocessor target web"+CATEGORIES="ada bootstrap c++ c debug driver fortran inline-asm java libf2c libgcj libobjc libstdc++ middle-end objc other preprocessor rtl-optimization target tree-optimization web" case "$FORMAT" in lisp) echo "$CATEGORIES" | \Index: gcc/regclass.c===================================================================RCS file: /cvs/gcc/gcc/gcc/regclass.c,vretrieving revision 1.160.4.5retrieving revision 1.160.4.8diff -u -r1.160.4.5 -r1.160.4.8--- gcc/gcc/regclass.c 3 Mar 2003 11:00:15 -0000 1.160.4.5+++ gcc/gcc/regclass.c 4 Dec 2004 00:36:37 -0000 1.160.4.8@@ -41,6 +41,7 @@ #include "toplev.h" #include "output.h" #include "ggc.h"+#include "hashtab.h" #ifndef REGISTER_MOVE_COST #define REGISTER_MOVE_COST(m, x, y) 2@@ -105,6 +106,13 @@ char call_really_used_regs[] = CALL_REALLY_USED_REGISTERS; #endif +#ifdef CALL_REALLY_USED_REGISTERS+#define CALL_REALLY_USED_REGNO_P(X) call_really_used_regs[X]+#else+#define CALL_REALLY_USED_REGNO_P(X) call_used_regs[X]+#endif++ /* Indexed by hard register number, contains 1 for registers that are fixed use or call used registers that cannot hold quantities across calls even if we are willing to save and restore them. call fixed@@ -228,12 +236,6 @@ #endif /* FORBIDDEN_INC_DEC_CLASSES */ -#ifdef CANNOT_CHANGE_MODE_CLASS-/* All registers that have been subreged. Indexed by regno * MAX_MACHINE_MODE- + mode. */-bitmap_head subregs_of_mode;-#endif- /* Sample MEM values for use by memory_move_secondary_cost. */ static GTY(()) rtx top_of_stack[MAX_MACHINE_MODE];@@ -447,7 +449,11 @@ If we are generating PIC code, the PIC offset table register is preserved across calls, though the target can override that. */ - if (i == STACK_POINTER_REGNUM || i == FRAME_POINTER_REGNUM)+ if (i == STACK_POINTER_REGNUM)+ ;+ else if (global_regs[i])+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);+ else if (i == FRAME_POINTER_REGNUM) ; #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM else if (i == HARD_FRAME_POINTER_REGNUM)@@ -461,13 +467,7 @@ else if (i == PIC_OFFSET_TABLE_REGNUM && fixed_regs[i]) ; #endif- else if (0-#ifdef CALL_REALLY_USED_REGISTERS- || call_really_used_regs[i]-#else- || call_used_regs[i]-#endif- || global_regs[i])+ else if (CALL_REALLY_USED_REGNO_P (i)) SET_HARD_REG_BIT (regs_invalidated_by_call, i); } @@ -792,6 +792,12 @@ global_regs[i] = 1; + /* If we're globalizing the frame pointer, we need to set the+ appropriate regs_invalidated_by_call bit, even if it's already+ set in fixed_regs. */+ if (i != STACK_POINTER_REGNUM)+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);+ /* If already fixed, nothing else to do. */ if (fixed_regs[i]) return;@@ -802,7 +808,6 @@ SET_HARD_REG_BIT (fixed_reg_set, i); SET_HARD_REG_BIT (call_used_reg_set, i); SET_HARD_REG_BIT (call_fixed_reg_set, i);- SET_HARD_REG_BIT (regs_invalidated_by_call, i); } /* Now the data and code for the `regclass' pass, which happens@@ -2415,9 +2420,15 @@ if (regno >= min_regno) {+ /* While the following 3 lines means that the inequality+ REGNO_LAST_UID (regno) <= REGNO_LAST_NOTE_UID (regno)+ is true at the end of the scanning, it may be subsequently+ invalidated (e.g. in load_mems) so it should not be relied+ upon. */ REGNO_LAST_NOTE_UID (regno) = INSN_UID (insn); if (!note_flag) REGNO_LAST_UID (regno) = INSN_UID (insn);+ if (REGNO_FIRST_UID (regno) == 0) REGNO_FIRST_UID (regno) = INSN_UID (insn); /* If we are called by reg_scan_update() (indicated by min_regno@@ -2614,6 +2625,77 @@ } #ifdef CANNOT_CHANGE_MODE_CLASS++struct subregs_of_mode_node+{+ unsigned int block;+ unsigned char modes[MAX_MACHINE_MODE];+};++static htab_t subregs_of_mode;++static hashval_t som_hash PARAMS ((const void *));+static int som_eq PARAMS ((const void *, const void *));++static hashval_t+som_hash (x)+ const void *x;+{+ const struct subregs_of_mode_node *a = x;+ return a->block;+}++static int+som_eq (x, y)+ const void *x;+ const void *y;+{+ const struct subregs_of_mode_node *a = x;+ const struct subregs_of_mode_node *b = y;+ return a->block == b->block;+}++void+init_subregs_of_mode ()+{+ if (subregs_of_mode)+ htab_empty (subregs_of_mode);+ else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -