From 709c2f34f557a88757bd37196f67a9044e3ed140 Mon Sep 17 00:00:00 2001 From: kazu Date: Fri, 3 May 2002 12:07:30 +0000 Subject: [PATCH] * regrename.c: Fix formatting. * tree.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53088 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/regrename.c | 54 ++++++++++++++++++++++----------------------- gcc/tree.c | 68 ++++++++++++++++++++++++++++----------------------------- 3 files changed, 66 insertions(+), 61 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79ba61c39b8..827bd7a017f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-05-03 Kazu Hirata + + * regrename.c: Fix formatting. + * tree.c: Likewise. + Fri May 3 13:34:43 CEST 2002 Jan Hubicka * i386.md (attribute memory): Handle compares properly. diff --git a/gcc/regrename.c b/gcc/regrename.c index 6463879fd86..4297da7f327 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -177,7 +177,7 @@ merge_overlapping_regs (b, pset, chain) reg's live range. */ if (t != chain) IOR_HARD_REG_SET (*pset, live); - clear_dead_regs (&live, REG_UNUSED, REG_NOTES (insn)); + clear_dead_regs (&live, REG_UNUSED, REG_NOTES (insn)); } insn = NEXT_INSN (insn); } @@ -231,10 +231,10 @@ regrename_optimize () if (frame_pointer_needed) { int i; - + for (i = HARD_REGNO_NREGS (FRAME_POINTER_REGNUM, Pmode); i--;) SET_HARD_REG_BIT (unavailable, FRAME_POINTER_REGNUM + i); - + #if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM for (i = HARD_REGNO_NREGS (HARD_FRAME_POINTER_REGNUM, Pmode); i--;) SET_HARD_REG_BIT (unavailable, HARD_FRAME_POINTER_REGNUM + i); @@ -253,7 +253,7 @@ regrename_optimize () int i; all_chains = this->next_chain; - + #if 0 /* This just disables optimization opportunities. */ /* Only rename once we've seen the reg more than once. */ if (! TEST_HARD_REG_BIT (regs_seen, reg)) @@ -309,9 +309,9 @@ regrename_optimize () || (! regs_ever_live[new_reg + i] && ! call_used_regs[new_reg + i]) #ifdef LEAF_REGISTERS - /* We can't use a non-leaf register if we're in a + /* We can't use a non-leaf register if we're in a leaf function. */ - || (current_function_is_leaf + || (current_function_is_leaf && !LEAF_REGISTERS[new_reg + i]) #endif #ifdef HARD_REGNO_RENAME_OK @@ -346,7 +346,7 @@ regrename_optimize () reg_names[reg], INSN_UID (last->insn)); if (last->need_caller_save_reg) fprintf (rtl_dump_file, " crosses a call"); - } + } if (best_new_reg == -1) { @@ -445,7 +445,7 @@ scan_rtx_reg (insn, loc, class, action, type, earlyclobber) if (*this->loc == cc0_rtx) p = &this->next_chain; else - { + { int regno = REGNO (*this->loc); int nregs = HARD_REGNO_NREGS (regno, GET_MODE (*this->loc)); int exact_match = (regno == this_regno && nregs == this_nregs); @@ -462,7 +462,7 @@ scan_rtx_reg (insn, loc, class, action, type, earlyclobber) if (! exact_match) abort (); - /* ??? Class NO_REGS can happen if the md file makes use of + /* ??? Class NO_REGS can happen if the md file makes use of EXTRA_CONSTRAINTS to match registers. Which is arguably wrong, but there we are. Since we know not what this may be replaced with, terminate the chain. */ @@ -705,7 +705,7 @@ scan_rtx (insn, loc, class, action, type, earlyclobber) return; case ZERO_EXTRACT: - case SIGN_EXTRACT: + case SIGN_EXTRACT: scan_rtx (insn, &XEXP (x, 0), class, action, type == OP_IN ? OP_IN : OP_INOUT, earlyclobber); scan_rtx (insn, &XEXP (x, 1), class, action, OP_IN, 0); @@ -787,7 +787,7 @@ build_def_use (bb) icode = recog_memoized (insn); extract_insn (insn); if (! constrain_operands (1)) - fatal_insn_not_found (insn); + fatal_insn_not_found (insn); preprocess_constraints (); alt = which_alternative; n_ops = recog_data.n_operands; @@ -814,14 +814,14 @@ build_def_use (bb) recog_data.operand_type[i], 0); /* Step 2: Close chains for which we have reads outside operands. - We do this by munging all operands into CC0, and closing + We do this by munging all operands into CC0, and closing everything remaining. */ for (i = 0; i < n_ops; i++) { old_operands[i] = recog_data.operand[i]; /* Don't squash match_operator or match_parallel here, since - we don't know that all of the contained registers are + we don't know that all of the contained registers are reachable by proper operands. */ if (recog_data.constraints[i][0] == '\0') continue; @@ -953,7 +953,7 @@ build_def_use (bb) enum reg_class class = recog_op_alt[i][alt].class; if (GET_CODE (op) == REG - && REGNO (op) == ORIGINAL_REGNO (op)) + && REGNO (op) == ORIGINAL_REGNO (op)) continue; scan_rtx (insn, loc, class, mark_write, OP_OUT, @@ -1017,11 +1017,11 @@ dump_def_use_chain (chains) /* The following code does forward propagation of hard register copies. The object is to eliminate as many dependencies as possible, so that we have the most scheduling freedom. As a side effect, we also clean - up some silly register allocation decisions made by reload. This + up some silly register allocation decisions made by reload. This code may be obsoleted by a new register allocator. */ /* For each register, we have a list of registers that contain the same - value. The OLDEST_REGNO field points to the head of the list, and + value. The OLDEST_REGNO field points to the head of the list, and the NEXT_REGNO field runs through the list. The MODE field indicates what mode the data is known to be in; this field is VOIDmode when the register is not known to contain valid data. */ @@ -1059,7 +1059,7 @@ static bool replace_oldest_value_addr PARAMS ((rtx *, enum reg_class, struct value_data *)); static bool replace_oldest_value_mem PARAMS ((rtx, rtx, struct value_data *)); static bool copyprop_hardreg_forward_1 PARAMS ((basic_block, - struct value_data *)); + struct value_data *)); extern void debug_value_data PARAMS ((struct value_data *)); #ifdef ENABLE_CHECKING static void validate_value_data PARAMS ((struct value_data *)); @@ -1086,7 +1086,7 @@ kill_value_regno (regno, vd) else if ((next = vd->e[regno].next_regno) != INVALID_REGNUM) { for (i = next; i != INVALID_REGNUM; i = vd->e[i].next_regno) - vd->e[i].oldest_regno = next; + vd->e[i].oldest_regno = next; } vd->e[regno].mode = VOIDmode; @@ -1187,7 +1187,7 @@ kill_clobbered_value (x, set, data) kill_value (x, vd); } -/* Called through note_stores. If X is set, not clobbered, kill its +/* Called through note_stores. If X is set, not clobbered, kill its current value and install it as the root of its own value list. */ static void @@ -1201,7 +1201,7 @@ kill_set_value (x, set, data) { kill_value (x, vd); if (REG_P (x)) - set_value_regno (REGNO (x), GET_MODE (x), vd); + set_value_regno (REGNO (x), GET_MODE (x), vd); } } @@ -1467,7 +1467,7 @@ replace_oldest_value_addr (loc, class, mode, insn, vd) if (locI) changed |= replace_oldest_value_addr (locI, INDEX_REG_CLASS, mode, - insn, vd); + insn, vd); if (locB) changed |= replace_oldest_value_addr (locB, MODE_BASE_REG_CLASS (mode), @@ -1502,7 +1502,7 @@ replace_oldest_value_addr (loc, class, mode, insn, vd) else if (fmt[i] == 'E') for (j = XVECLEN (x, i) - 1; j >= 0; j--) changed |= replace_oldest_value_addr (&XVECEXP (x, i, j), class, - mode, insn, vd); + mode, insn, vd); } return changed; @@ -1548,7 +1548,7 @@ copyprop_hardreg_forward_1 (bb, vd) set = single_set (insn); extract_insn (insn); if (! constrain_operands (1)) - fatal_insn_not_found (insn); + fatal_insn_not_found (insn); preprocess_constraints (); alt = which_alternative; n_ops = recog_data.n_operands; @@ -1618,7 +1618,7 @@ copyprop_hardreg_forward_1 (bb, vd) fprintf (rtl_dump_file, "insn %u: replaced reg %u with %u\n", INSN_UID (insn), regno, REGNO (new)); - changed = true; + changed = true; goto did_replacement; } } @@ -1680,7 +1680,7 @@ copyprop_hardreg_forward_1 (bb, vd) } else if (GET_CODE (recog_data.operand[i]) == MEM) replaced = replace_oldest_value_mem (recog_data.operand[i], - insn, vd); + insn, vd); /* If we performed any replacement, update match_dups. */ if (replaced) @@ -1741,13 +1741,13 @@ copyprop_hardreg_forward () the end of the predecessor block. */ /* ??? Ought to use more intelligent queueing of blocks. */ if (bb->pred - && ! bb->pred->pred_next + && ! bb->pred->pred_next && ! (bb->pred->flags & (EDGE_ABNORMAL_CALL | EDGE_EH)) && bb->pred->src->index != ENTRY_BLOCK && bb->pred->src->index < b) all_vd[b] = all_vd[bb->pred->src->index]; else - init_value_data (all_vd + b); + init_value_data (all_vd + b); if (copyprop_hardreg_forward_1 (bb, all_vd + b)) need_refresh = true; diff --git a/gcc/tree.c b/gcc/tree.c index 6f59026ab40..945f3a15eca 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -124,8 +124,8 @@ htab_t type_hash_table; static void set_type_quals PARAMS ((tree, int)); static void append_random_chars PARAMS ((char *)); -static int type_hash_eq PARAMS ((const void*, const void*)); -static unsigned int type_hash_hash PARAMS ((const void*)); +static int type_hash_eq PARAMS ((const void *, const void *)); +static unsigned int type_hash_hash PARAMS ((const void *)); static void print_type_hash_statistics PARAMS((void)); static void finish_vector_type PARAMS((tree)); static tree make_vector PARAMS ((enum machine_mode, tree, int)); @@ -233,12 +233,12 @@ tree_size (node) case 'x': /* something random, like an identifier. */ { - size_t length; - length = (sizeof (struct tree_common) - + TREE_CODE_LENGTH (code) * sizeof (char *)); - if (code == TREE_VEC) - length += (TREE_VEC_LENGTH (node) - 1) * sizeof (char *); - return length; + size_t length; + length = (sizeof (struct tree_common) + + TREE_CODE_LENGTH (code) * sizeof (char *)); + if (code == TREE_VEC) + length += (TREE_VEC_LENGTH (node) - 1) * sizeof (char *); + return length; } default: @@ -263,12 +263,12 @@ make_node (code) tree_node_kind kind; #endif struct tree_common ttmp; - + /* We can't allocate a TREE_VEC without knowing how many elements it will have. */ if (code == TREE_VEC) abort (); - + TREE_SET_CODE ((tree)&ttmp, code); length = tree_size ((tree)&ttmp); @@ -494,7 +494,7 @@ build_vector (type, vals) over1 |= TREE_OVERFLOW (value); over2 |= TREE_CONSTANT_OVERFLOW (value); } - + TREE_OVERFLOW (v) = over1; TREE_CONSTANT_OVERFLOW (v) = over2; @@ -618,11 +618,11 @@ make_tree_vec (len) int len; { tree t; - int length = (len-1) * sizeof (tree) + sizeof (struct tree_vec); + int length = (len - 1) * sizeof (tree) + sizeof (struct tree_vec); #ifdef GATHER_STATISTICS - tree_node_counts[(int)vec_kind]++; - tree_node_sizes[(int)vec_kind] += length; + tree_node_counts[(int) vec_kind]++; + tree_node_sizes[(int) vec_kind] += length; #endif t = ggc_alloc_tree (length); @@ -1063,8 +1063,8 @@ chainon (op1, op2) TREE_CHAIN (t1) = op2; #ifdef ENABLE_TREE_CHECKING for (t2 = op2; t2; t2 = TREE_CHAIN (t2)) - if (t2 == t1) - abort (); /* Circularity created. */ + if (t2 == t1) + abort (); /* Circularity created. */ #endif return op1; } @@ -2313,7 +2313,7 @@ build1 (code, type, node) #endif #ifdef ENABLE_CHECKING - if (TREE_CODE_CLASS (code) == '2' + if (TREE_CODE_CLASS (code) == '2' || TREE_CODE_CLASS (code) == '<' || TREE_CODE_LENGTH (code) != 1) abort (); @@ -2498,7 +2498,7 @@ tree build_type_attribute_variant (ttype, attribute) tree ttype, attribute; { - if ( ! attribute_list_equal (TYPE_ATTRIBUTES (ttype), attribute)) + if (! attribute_list_equal (TYPE_ATTRIBUTES (ttype), attribute)) { unsigned int hashcode; tree ntype; @@ -3055,7 +3055,7 @@ mark_tree_hashtable_entry (entry, data) return 1; } -/* Mark ARG (which is really a htab_t whose slots are trees) for +/* Mark ARG (which is really a htab_t whose slots are trees) for GC. */ void @@ -3099,8 +3099,8 @@ int attribute_list_equal (l1, l2) tree l1, l2; { - return attribute_list_contained (l1, l2) - && attribute_list_contained (l2, l1); + return attribute_list_contained (l1, l2) + && attribute_list_contained (l2, l1); } /* Given two lists of attributes, return true if list L2 is @@ -3260,7 +3260,7 @@ tree_int_cst_compare (t1, t2) return -1; else if (tree_int_cst_lt (t2, t1)) return 1; - else + else return 0; } @@ -4407,7 +4407,7 @@ clean_symbol_name (p) )) *p = '_'; } - + /* Generate a name for a function unique to this translation unit. TYPE is some string to identify the purpose of this function to the linker or collect2. */ @@ -4832,17 +4832,17 @@ initializer_zerop (init) case CONSTRUCTOR: { if (AGGREGATE_TYPE_P (TREE_TYPE (init))) - { - tree aggr_init = TREE_OPERAND (init, 1); - - while (aggr_init) - { - if (! initializer_zerop (TREE_VALUE (aggr_init))) - return false; - aggr_init = TREE_CHAIN (aggr_init); - } - return true; - } + { + tree aggr_init = TREE_OPERAND (init, 1); + + while (aggr_init) + { + if (! initializer_zerop (TREE_VALUE (aggr_init))) + return false; + aggr_init = TREE_CHAIN (aggr_init); + } + return true; + } return false; } default: -- 2.11.4.GIT