diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-09 12:02:29 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-09 12:02:29 +0000 |
commit | 40734805198ef874623eb7be9ec3de9251c799b7 (patch) | |
tree | 8dfb059637bc4dfe3718b626a8be035328c2a665 /gcc | |
parent | 1711184ff2dfbbd5aab7679d5e31159cd8d6d76d (diff) | |
download | gcc-40734805198ef874623eb7be9ec3de9251c799b7.tar.gz |
* sbitmap.c: Fix formatting.
* scan.c: Likewise.
* scan-decls.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-rgn.c: Likewise.
* sched-vis.c: Likewise.
* sdbout.c: Likewise.
* sibcall.c: Likewise.
* simplify-rtx.c: Likewise.
* ssa.c: Likewise.
* ssa-ccp.c: Likewise.
* ssa-dce.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* stringpool.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 19 | ||||
-rw-r--r-- | gcc/sbitmap.c | 14 | ||||
-rw-r--r-- | gcc/scan-decls.c | 4 | ||||
-rw-r--r-- | gcc/scan.c | 4 | ||||
-rw-r--r-- | gcc/sched-deps.c | 6 | ||||
-rw-r--r-- | gcc/sched-ebb.c | 4 | ||||
-rw-r--r-- | gcc/sched-rgn.c | 42 | ||||
-rw-r--r-- | gcc/sched-vis.c | 6 | ||||
-rw-r--r-- | gcc/sdbout.c | 8 | ||||
-rw-r--r-- | gcc/sibcall.c | 28 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 46 | ||||
-rw-r--r-- | gcc/ssa-ccp.c | 60 | ||||
-rw-r--r-- | gcc/ssa-dce.c | 6 | ||||
-rw-r--r-- | gcc/ssa.c | 172 | ||||
-rw-r--r-- | gcc/stmt.c | 74 | ||||
-rw-r--r-- | gcc/stor-layout.c | 30 | ||||
-rw-r--r-- | gcc/stringpool.c | 2 |
17 files changed, 272 insertions, 253 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 324e8744a5f..bae7fb00973 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,22 @@ +2002-05-09 Kazu Hirata <kazu@cs.umass.edu> + + * sbitmap.c: Fix formatting. + * scan.c: Likewise. + * scan-decls.c: Likewise. + * sched-deps.c: Likewise. + * sched-ebb.c: Likewise. + * sched-rgn.c: Likewise. + * sched-vis.c: Likewise. + * sdbout.c: Likewise. + * sibcall.c: Likewise. + * simplify-rtx.c: Likewise. + * ssa.c: Likewise. + * ssa-ccp.c: Likewise. + * ssa-dce.c: Likewise. + * stmt.c: Likewise. + * stor-layout.c: Likewise. + * stringpool.c: Likewise. + 2002-05-09 David S. Miller <davem@redhat.com> * config/sparc/sol2.h (ASM_CPU_SPEC): Handle -mcpu=v9. diff --git a/gcc/sbitmap.c b/gcc/sbitmap.c index c101cb07441..e581000e877 100644 --- a/gcc/sbitmap.c +++ b/gcc/sbitmap.c @@ -1,5 +1,5 @@ /* Simple bitmaps. - Copyright (C) 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -222,7 +222,7 @@ sbitmap_difference (dst, a, b) sbitmap_ptr dstp = dst->elms; sbitmap_ptr ap = a->elms; sbitmap_ptr bp = b->elms; - + for (i = 0; i < n; i++) *dstp++ = *ap++ & ~*bp++; } @@ -444,7 +444,7 @@ sbitmap_intersection_of_succs (dst, src, bb) for (e = b->succ; e != 0; e = e->succ_next) { if (e->dest == EXIT_BLOCK_PTR) - continue; + continue; sbitmap_copy (dst, src[e->dest->index]); break; @@ -484,7 +484,7 @@ sbitmap_intersection_of_preds (dst, src, bb) for (e = b->pred; e != 0; e = e->pred_next) { if (e->src == ENTRY_BLOCK_PTR) - continue; + continue; sbitmap_copy (dst, src[e->src->index]); break; @@ -524,7 +524,7 @@ sbitmap_union_of_succs (dst, src, bb) for (e = b->succ; e != 0; e = e->succ_next) { if (e->dest == EXIT_BLOCK_PTR) - continue; + continue; sbitmap_copy (dst, src[e->dest->index]); break; @@ -564,7 +564,7 @@ sbitmap_union_of_preds (dst, src, bb) for (e = b->pred; e != 0; e = e->pred_next) { if (e->src== ENTRY_BLOCK_PTR) - continue; + continue; sbitmap_copy (dst, src[e->src->index]); break; @@ -580,7 +580,7 @@ sbitmap_union_of_preds (dst, src, bb) if (e->src == ENTRY_BLOCK_PTR) continue; - + p = src[e->src->index]->elms; r = dst->elms; for (i = 0; i < set_size; i++) diff --git a/gcc/scan-decls.c b/gcc/scan-decls.c index cbd99004e9c..e56401d066f 100644 --- a/gcc/scan-decls.c +++ b/gcc/scan-decls.c @@ -72,7 +72,7 @@ skip_to_closing_brace (pfile) /* This function scans a C source file (actually, the output of cpp), reading from FP. It looks for function declarations, and - external variable declarations. + external variable declarations. The following grammar (as well as some extra stuff) is recognized: @@ -155,7 +155,7 @@ scan_decls (pfile, argc, argv) /* ... fall through ... */ case CPP_OPEN_BRACE: case CPP_CLOSE_BRACE: goto new_statement; - + case CPP_EOF: return 0; diff --git a/gcc/scan.c b/gcc/scan.c index ee2607c575e..ac6b809799f 100644 --- a/gcc/scan.c +++ b/gcc/scan.c @@ -34,7 +34,7 @@ make_sstring_space (str, count) if (new_size <= cur_size) return; - + str->base = xrealloc (str->base, new_size); str->ptr = str->base + cur_size; str->limit = str->base + new_size; @@ -53,7 +53,7 @@ sstring_append (dst, src) s = src->base; while (--count >= 0) *d++ = *s++; dst->ptr = d; - *d = 0; + *d = 0; } int diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 5fb23b76d9b..88bf2b7f2e2 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -280,7 +280,7 @@ add_dependence (insn, elem, dep_type) else if (TEST_BIT (output_dependency_cache[INSN_LUID (insn)], INSN_LUID (elem))) present_dep_type = REG_DEP_OUTPUT; - else + else present_p = 0; if (present_p && (int) dep_type >= (int) present_dep_type) return; @@ -313,7 +313,7 @@ add_dependence (insn, elem, dep_type) one, then change the existing dependence to this type. */ if ((int) dep_type < (int) REG_NOTE_KIND (link)) PUT_REG_NOTE_KIND (link, dep_type); - + #ifdef INSN_SCHEDULING /* If we are adding a dependency to INSN's LOG_LINKs, then note that in the bitmap caches of dependency information. */ @@ -1032,7 +1032,7 @@ sched_analyze_insn (deps, x, insn, loop_notes) } /* If this instruction can throw an exception, then moving it changes - where block boundaries fall. This is mighty confusing elsewhere. + where block boundaries fall. This is mighty confusing elsewhere. Therefore, prevent such an instruction from being moved. */ if (can_throw_internal (insn)) reg_pending_barrier = true; diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c index 7b07d2cd3f1..5f1464b9c14 100644 --- a/gcc/sched-ebb.c +++ b/gcc/sched-ebb.c @@ -1,6 +1,6 @@ /* Instruction scheduling pass. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by, and currently maintained by, Jim Wilson (wilson@cygnus.com) @@ -297,7 +297,7 @@ schedule_ebbs (dump_file) /* Schedule every region in the subroutine. */ for (i = 0; i < n_basic_blocks; i++) - { + { rtx head = BASIC_BLOCK (i)->head; rtx tail; diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 0d41ec77dc7..acc8477e3ab 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -577,17 +577,17 @@ too_large (block, num_bbs, num_insns) /* Update_loop_relations(blk, hdr): Check if the loop headed by max_hdr[blk] is still an inner loop. Put in max_hdr[blk] the header of the most inner loop containing blk. */ -#define UPDATE_LOOP_RELATIONS(blk, hdr) \ -{ \ - if (max_hdr[blk] == -1) \ - max_hdr[blk] = hdr; \ - else if (dfs_nr[max_hdr[blk]] > dfs_nr[hdr]) \ - RESET_BIT (inner, hdr); \ - else if (dfs_nr[max_hdr[blk]] < dfs_nr[hdr]) \ - { \ - RESET_BIT (inner,max_hdr[blk]); \ - max_hdr[blk] = hdr; \ - } \ +#define UPDATE_LOOP_RELATIONS(blk, hdr) \ +{ \ + if (max_hdr[blk] == -1) \ + max_hdr[blk] = hdr; \ + else if (dfs_nr[max_hdr[blk]] > dfs_nr[hdr]) \ + RESET_BIT (inner, hdr); \ + else if (dfs_nr[max_hdr[blk]] < dfs_nr[hdr]) \ + { \ + RESET_BIT (inner,max_hdr[blk]); \ + max_hdr[blk] = hdr; \ + } \ } /* Find regions for interblock scheduling. @@ -1094,7 +1094,7 @@ compute_dom_prob_ps (bb) if (CONTAINING_RGN (TO_BLOCK (nxt_out_edge)) != CONTAINING_RGN (BB_TO_BLOCK (bb))) ++nr_rgn_out_edges; - SET_BIT (pot_split[bb], EDGE_TO_BIT (nxt_out_edge)); + SET_BIT (pot_split[bb], EDGE_TO_BIT (nxt_out_edge)); nxt_out_edge = NEXT_OUT (nxt_out_edge); } @@ -1562,17 +1562,17 @@ enum INSN_TRAP_CLASS /* Non-zero if block bb_to is equal to, or reachable from block bb_from. */ #define IS_REACHABLE(bb_from, bb_to) \ -(bb_from == bb_to \ + (bb_from == bb_to \ || IS_RGN_ENTRY (bb_from) \ - || (TEST_BIT (ancestor_edges[bb_to], \ - EDGE_TO_BIT (IN_EDGES (BB_TO_BLOCK (bb_from)))))) + || (TEST_BIT (ancestor_edges[bb_to], \ + EDGE_TO_BIT (IN_EDGES (BB_TO_BLOCK (bb_from)))))) /* Non-zero iff the address is comprised from at most 1 register. */ #define CONST_BASED_ADDRESS_P(x) \ (GET_CODE (x) == REG \ - || ((GET_CODE (x) == PLUS || GET_CODE (x) == MINUS \ - || (GET_CODE (x) == LO_SUM)) \ - && (CONSTANT_P (XEXP (x, 0)) \ + || ((GET_CODE (x) == PLUS || GET_CODE (x) == MINUS \ + || (GET_CODE (x) == LO_SUM)) \ + && (CONSTANT_P (XEXP (x, 0)) \ || CONSTANT_P (XEXP (x, 1))))) /* Turns on the fed_by_spec_load flag for insns fed by load_insn. */ @@ -2497,7 +2497,7 @@ propagate_deps (bb, pred_deps) succ_deps->last_pending_memory_flush = concat_INSN_LIST (pred_deps->last_pending_memory_flush, succ_deps->last_pending_memory_flush); - + succ_deps->pending_lists_length += pred_deps->pending_lists_length; succ_deps->pending_flush_length += pred_deps->pending_flush_length; @@ -2657,7 +2657,7 @@ debug_dependencies () INSN_DEP_COUNT (insn), INSN_PRIORITY (insn), insn_cost (insn, 0, 0)); - + if (recog_memoized (insn) < 0) fprintf (sched_dump, "nothing"); else @@ -2996,7 +2996,7 @@ schedule_insns (dump_file) init_regions (); current_sched_info = ®ion_sched_info; - + /* Schedule every region in the subroutine. */ for (rgn = 0; rgn < nr_regions; rgn++) schedule_region (rgn); diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c index e49d4bfeb1b..239ca0a91a1 100644 --- a/gcc/sched-vis.c +++ b/gcc/sched-vis.c @@ -677,13 +677,13 @@ print_pattern (buf, x, verbose) && XEXP (COND_EXEC_TEST (x), 1) == const0_rtx) print_value (t1, XEXP (COND_EXEC_TEST (x), 0), verbose); else if (GET_CODE (COND_EXEC_TEST (x)) == EQ - && XEXP (COND_EXEC_TEST (x), 1) == const0_rtx) - { + && XEXP (COND_EXEC_TEST (x), 1) == const0_rtx) + { t1[0] = '!'; print_value (t1 + 1, XEXP (COND_EXEC_TEST (x), 0), verbose); } else - print_value (t1, COND_EXEC_TEST (x), verbose); + print_value (t1, COND_EXEC_TEST (x), verbose); print_pattern (t2, COND_EXEC_CODE (x), verbose); sprintf (buf, "(%s) %s", t1, t2); break; diff --git a/gcc/sdbout.c b/gcc/sdbout.c index bb21ae7a3b3..08d8abe455c 100644 --- a/gcc/sdbout.c +++ b/gcc/sdbout.c @@ -782,7 +782,7 @@ sdbout_symbol (decl, local) if (!DECL_RTL_SET_P (decl)) return; - SET_DECL_RTL (decl, + SET_DECL_RTL (decl, eliminate_regs (DECL_RTL (decl), 0, NULL_RTX)); #ifdef LEAF_REG_REMAP if (current_function_uses_only_leaf_regs) @@ -858,12 +858,12 @@ sdbout_symbol (decl, local) if (TREE_PUBLIC (decl)) { PUT_SDB_VAL (XEXP (value, 0)); - PUT_SDB_SCL (C_EXT); + PUT_SDB_SCL (C_EXT); } else { PUT_SDB_VAL (XEXP (value, 0)); - PUT_SDB_SCL (C_STAT); + PUT_SDB_SCL (C_STAT); } } else if (regno >= 0) @@ -1759,7 +1759,7 @@ sdbout_init (input_file_name) if (DECL_NAME (t) && IDENTIFIER_POINTER (DECL_NAME (t)) != 0 && !strcmp (IDENTIFIER_POINTER (DECL_NAME (t)), "__vtbl_ptr_type")) sdbout_symbol (t, 0); -#endif +#endif #ifdef SDB_ALLOW_FORWARD_REFERENCES ggc_add_tree_root (&anonymous_types, 1); diff --git a/gcc/sibcall.c b/gcc/sibcall.c index 535c827fa18..c62941f0974 100644 --- a/gcc/sibcall.c +++ b/gcc/sibcall.c @@ -86,7 +86,7 @@ identify_call_return_value (cp, p_hard_return, p_soft_return) /* If we didn't get a single hard register (e.g. a parallel), give up. */ if (GET_CODE (hard) != REG) return 0; - + /* Stack adjustment done after call may appear here. */ insn = skip_stack_adjustment (insn); if (! insn) @@ -101,7 +101,7 @@ identify_call_return_value (cp, p_hard_return, p_soft_return) insn = NEXT_INSN (insn); if (! insn) return 0; - + /* We're looking for a source of the hard return register. */ set = single_set (insn); if (! set || SET_SRC (set) != hard) @@ -168,7 +168,7 @@ skip_copy_to_return_value (orig_insn) /* The destination must be the same as the called function's return value to ensure that any return value is put in the same place by the - current function and the function we're calling. + current function and the function we're calling. Further, the source must be the same as the pseudo into which the called function's return value was copied. Otherwise we're returning @@ -554,7 +554,7 @@ replace_call_placeholder (insn, use) pass above from deleting it as unused. */ if (XEXP (PATTERN (insn), 3)) LABEL_PRESERVE_P (XEXP (PATTERN (insn), 3)) = 0; - + /* "Delete" the placeholder insn. */ remove_insn (insn); } @@ -586,7 +586,7 @@ optimize_sibling_and_tail_recursive_calls () if (n_basic_blocks == 0) return; - /* If we are using sjlj exceptions, we may need to add a call to + /* If we are using sjlj exceptions, we may need to add a call to _Unwind_SjLj_Unregister at exit of the function. Which means that we cannot do any sibcall transformations. */ if (USING_SJLJ_EXCEPTIONS && current_function_has_exception_handlers ()) @@ -676,7 +676,7 @@ optimize_sibling_and_tail_recursive_calls () sibling call optimizations, but not tail recursion. Similarly if we use varargs or stdarg since they implicitly may take the address of an argument. */ - if (current_function_calls_alloca + if (current_function_calls_alloca || current_function_varargs || current_function_stdarg) sibcall = 0; @@ -709,8 +709,8 @@ optimize_sibling_and_tail_recursive_calls () successful_sibling_call = 1; replaced_call_placeholder = 1; - replace_call_placeholder (insn, - tailrecursion != 0 + replace_call_placeholder (insn, + tailrecursion != 0 ? sibcall_use_tail_recursion : sibcall != 0 ? sibcall_use_sibcall @@ -724,11 +724,11 @@ optimize_sibling_and_tail_recursive_calls () tree arg; /* A sibling call sequence invalidates any REG_EQUIV notes made for - this function's incoming arguments. + this function's incoming arguments. At the start of RTL generation we know the only REG_EQUIV notes in the rtl chain are those for incoming arguments, so we can safely - flush any REG_EQUIV note. + flush any REG_EQUIV note. This is (slight) overkill. We could keep track of the highest argument we clobber and be more selective in removing notes, but it @@ -738,7 +738,7 @@ optimize_sibling_and_tail_recursive_calls () /* A sibling call sequence also may invalidate RTX_UNCHANGING_P flag of some incoming arguments MEM RTLs, because it can write into those slots. We clear all those bits now. - + This is (slight) overkill, we could keep track of which arguments we actually write into. */ for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) @@ -749,8 +749,8 @@ optimize_sibling_and_tail_recursive_calls () /* Similarly, invalidate RTX_UNCHANGING_P for any incoming arguments passed in registers. */ - for (arg = DECL_ARGUMENTS (current_function_decl); - arg; + for (arg = DECL_ARGUMENTS (current_function_decl); + arg; arg = TREE_CHAIN (arg)) { if (REG_P (DECL_RTL (arg))) @@ -758,7 +758,7 @@ optimize_sibling_and_tail_recursive_calls () } } - /* There may have been NOTE_INSN_BLOCK_{BEGIN,END} notes in the + /* There may have been NOTE_INSN_BLOCK_{BEGIN,END} notes in the CALL_PLACEHOLDER alternatives that we didn't emit. Rebuild the lexical block tree to correspond to the notes that still exist. */ if (replaced_call_placeholder) diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 8441ea9e985..36bcc1a22dc 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -43,7 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA virtual regs here because the simplify_*_operation routines are called by integrate.c, which is called before virtual register instantiation. - ?!? FIXED_BASE_PLUS_P and NONZERO_BASE_PLUS_P need to move into + ?!? FIXED_BASE_PLUS_P and NONZERO_BASE_PLUS_P need to move into a header file so that their definitions can be shared with the simplification routines in simplify-rtx.c. Until then, do not change these macros without also changing the copy in simplify-rtx.c. */ @@ -113,7 +113,7 @@ neg_const_int (mode, i) } -/* Make a binary operation by properly ordering the operands and +/* Make a binary operation by properly ordering the operands and seeing if the expression folds. */ rtx @@ -300,7 +300,7 @@ simplify_replace_rtx (x, old, new) rtx op0 = simplify_replace_rtx (XEXP (x, 0), old, new); return - simplify_gen_ternary (code, mode, + simplify_gen_ternary (code, mode, (op_mode != VOIDmode ? op_mode : GET_MODE (op0)), @@ -677,7 +677,7 @@ simplify_unary_operation (code, mode, op, op_mode) return convert_memory_address (Pmode, op); break; #endif - + default: break; } @@ -964,7 +964,7 @@ simplify_binary_operation (code, mode, op0, op1) } /* If one of the operands is a PLUS or a MINUS, see if we can - simplify this by the associative law. + simplify this by the associative law. Don't use the associative law for floating point. The inaccuracy makes it nonassociative, and subtle programs can break if operations are associated. */ @@ -1013,7 +1013,7 @@ simplify_binary_operation (code, mode, op0, op1) #endif return xop00; } - break; + break; case MINUS: /* We can't assume x-x is 0 even with non-IEEE floating point, @@ -1102,7 +1102,7 @@ simplify_binary_operation (code, mode, op0, op1) return simplify_gen_binary (PLUS, mode, op0, XEXP (op1, 0)); /* If one of the operands is a PLUS or a MINUS, see if we can - simplify this by the associative law. + simplify this by the associative law. Don't use the associative law for floating point. The inaccuracy makes it nonassociative, and subtle programs can break if operations are associated. */ @@ -1280,7 +1280,7 @@ simplify_binary_operation (code, mode, op0, op1) if (! REAL_VALUES_EQUAL (d, dconst0)) { REAL_ARITHMETIC (d, rtx_to_tree_code (DIV), dconst1, d); - return gen_rtx_MULT (mode, op0, + return gen_rtx_MULT (mode, op0, CONST_DOUBLE_FROM_REAL_VALUE (d, mode)); } } @@ -1320,14 +1320,14 @@ simplify_binary_operation (code, mode, op0, op1) break; case SMIN: - if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (trueop1) == CONST_INT + if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (trueop1) == CONST_INT && INTVAL (trueop1) == (HOST_WIDE_INT) 1 << (width -1) && ! side_effects_p (op0)) return op1; else if (rtx_equal_p (trueop0, trueop1) && ! side_effects_p (op0)) return op0; break; - + case SMAX: if (width <= HOST_BITS_PER_WIDE_INT && GET_CODE (trueop1) == CONST_INT && ((unsigned HOST_WIDE_INT) INTVAL (trueop1) @@ -1344,7 +1344,7 @@ simplify_binary_operation (code, mode, op0, op1) else if (rtx_equal_p (trueop0, trueop1) && ! side_effects_p (op0)) return op0; break; - + case UMAX: if (trueop1 == constm1_rtx && ! side_effects_p (op0)) return op1; @@ -1362,7 +1362,7 @@ simplify_binary_operation (code, mode, op0, op1) default: abort (); } - + return 0; } @@ -1549,9 +1549,9 @@ simplify_binary_operation (code, mode, op0, op1) Rather than test for specific case, we do this by a brute-force method and do all possible simplifications until no more changes occur. Then - we rebuild the operation. + we rebuild the operation. - If FORCE is true, then always generate the rtx. This is used to + If FORCE is true, then always generate the rtx. This is used to canonicalize stuff emitted from simplify_gen_binary. Note that this can still fail if the rtx is too complex. It won't fail just because the result is not 'simpler' than the input, however. */ @@ -1588,7 +1588,7 @@ simplify_plus_minus (code, mode, op0, op1, force) int i, j; memset ((char *) ops, 0, sizeof ops); - + /* Set up the two operands and then expand them until nothing has been changed. If we run out of room in our array, give up; this should almost never happen. */ @@ -1712,7 +1712,7 @@ simplify_plus_minus (code, mode, op0, op1, force) tem = simplify_binary_operation (ncode, mode, lhs, rhs); - /* Reject "simplifications" that just wrap the two + /* Reject "simplifications" that just wrap the two arguments in a CONST. Failure to do so can result in infinite recursion with simplify_binary_operation when it calls us to simplify CONST operations. */ @@ -1784,7 +1784,7 @@ simplify_plus_minus (code, mode, op0, op1, force) is also an improvement, so accept it. */ if (!force && (n_ops + n_consts > input_ops - || (n_ops + n_consts == input_ops && n_consts <= input_consts))) + || (n_ops + n_consts == input_ops && n_consts <= input_consts))) return NULL_RTX; /* Put a non-negated operand first. If there aren't any, make all @@ -1955,7 +1955,7 @@ simplify_relational_operation (code, mode, op0, op1) l0u = l0s = INTVAL (trueop0); h0u = h0s = HWI_SIGN_EXTEND (l0s); } - + if (GET_CODE (trueop1) == CONST_DOUBLE) { l1u = l1s = CONST_DOUBLE_LOW (trueop1); @@ -2044,7 +2044,7 @@ simplify_relational_operation (code, mode, op0, op1) && INTEGRAL_MODE_P (mode)) return const0_rtx; break; - + default: break; } @@ -2188,7 +2188,7 @@ simplify_ternary_operation (code, mode, op0_mode, op0, op1, op2) { HOST_WIDE_INT t = INTVAL (op1); HOST_WIDE_INT f = INTVAL (op2); - + if (t == STORE_FLAG_VALUE && f == 0) code = GET_CODE (op0); else if (t == 0 && f == STORE_FLAG_VALUE) @@ -2288,7 +2288,7 @@ simplify_subreg (outermode, op, innermode, byte) val = part ? CONST_DOUBLE_HIGH (op) : CONST_DOUBLE_LOW (op); offset %= HOST_BITS_PER_WIDE_INT; - /* We've already picked the word we want from a double, so + /* We've already picked the word we want from a double, so pretend this is actually an integer. */ innermode = mode_for_size (HOST_BITS_PER_WIDE_INT, MODE_INT, 0); @@ -2553,7 +2553,7 @@ simplify_gen_subreg (outermode, op, innermode, byte) maintain and improve. It's totally silly that when we add a simplification that it needs to be added to 4 places (3 for RTL simplification and 1 for tree simplification. */ - + rtx simplify_rtx (x) rtx x; @@ -2597,7 +2597,7 @@ simplify_rtx (x) case 'x': /* The only case we try to handle is a SUBREG. */ if (code == SUBREG) - return simplify_gen_subreg (mode, SUBREG_REG (x), + return simplify_gen_subreg (mode, SUBREG_REG (x), GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); return NULL; diff --git a/gcc/ssa-ccp.c b/gcc/ssa-ccp.c index 4dc0aa9cfec..641727655ba 100644 --- a/gcc/ssa-ccp.c +++ b/gcc/ssa-ccp.c @@ -2,19 +2,19 @@ Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. Original framework by Daniel Berlin <dan@cgsoftware.com> Fleshed out and major cleanups by Jeff Law <law@redhat.com> - + This file is part of GCC. - + GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA @@ -44,7 +44,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 5. Another simple SSA DCE pass to remove dead code exposed by CCP. - When we exit, we are still in SSA form. + When we exit, we are still in SSA form. Potential further enhancements: @@ -83,7 +83,7 @@ typedef enum VARYING } latticevalue; -/* Main structure for CCP. +/* Main structure for CCP. Contains the lattice value and, if it's a constant, the constant value. */ @@ -185,7 +185,7 @@ visit_phi_node (phi_node, block) /* If the current value of PHI_NODE is UNDEFINED and one node in PHI_NODE is CONSTANT, then the new value of the PHI is that CONSTANT. Note this can turn into VARYING - if we find another distinct constant later. */ + if we find another distinct constant later. */ if (phi_node_lattice_val == UNDEFINED && phi_node_expr == NULL && current_parm_lattice_val == CONSTANT) @@ -288,7 +288,7 @@ visit_expression (insn, block) } /* Hard registers are not put in SSA form and thus we must consider - them varying. All the more reason to avoid hard registers in + them varying. All the more reason to avoid hard registers in RTL until as late as possible in the compilation. */ if (GET_CODE (dest) == REG && REGNO (dest) < FIRST_PSEUDO_REGISTER) { @@ -451,7 +451,7 @@ visit_expression (insn, block) rtx simplified = NULL; /* We've got some kind of INSN. If it's simple, try to evaluate - it and record the results. + it and record the results. We already know this insn is a single_set and that it sets a pseudo register. So we just need to extract the source @@ -511,7 +511,7 @@ visit_expression (insn, block) defs_to_undefined (insn); break; } - + /* Simplify source operands to whatever known values they may have. */ if (GET_CODE (src0) == REG @@ -542,7 +542,7 @@ visit_expression (insn, block) defs_to_undefined (insn); break; } - + /* Simplify source operands to whatever known values they may have. */ if (GET_CODE (src0) == REG @@ -579,7 +579,7 @@ visit_expression (insn, block) defs_to_undefined (insn); break; } - + /* Simplify source operands to whatever known values they may have. */ if (GET_CODE (src0) == REG @@ -602,7 +602,7 @@ visit_expression (insn, block) src0, src1, src2); break; } - + default: defs_to_varying (insn); } @@ -617,7 +617,7 @@ visit_expression (insn, block) values[REGNO (dest)].const_value = simplified; } else - defs_to_varying (insn); + defs_to_varying (insn); } } @@ -665,11 +665,11 @@ examine_flow_edges () currinsn = NEXT_INSN (currinsn); } - + /* Don't forget the last insn in the block. */ if (INSN_P (currinsn)) visit_expression (currinsn, succ_block); - + /* If we haven't looked at the next block, and it has a single successor, add it onto the worklist. This is because if we only have one successor, we know it gets executed, @@ -702,7 +702,7 @@ follow_def_use_chains () /* Pick an entry off the worklist (it does not matter which entry we pick). */ - member = sbitmap_first_set_bit (ssa_edges); + member = sbitmap_first_set_bit (ssa_edges); RESET_BIT (ssa_edges, member); /* Iterate through all the uses of this entry. */ @@ -716,7 +716,7 @@ follow_def_use_chains () { if (TEST_BIT (executable_blocks, BLOCK_NUM (useinsn))) visit_phi_node (useinsn, BLOCK_FOR_INSN (useinsn)); - } + } else { if (TEST_BIT (executable_blocks, BLOCK_NUM (useinsn))) @@ -727,7 +727,7 @@ follow_def_use_chains () } /* Examine each edge to see if we were able to prove any were - not executable. + not executable. If an edge is not executable, then we can remove its alternative in PHI nodes as the destination of the edge, we can simplify the @@ -761,7 +761,7 @@ optimize_unexecutable_edges (edges, executable_edges) remove_phi_alternative (PATTERN (insn), edge->src); if (rtl_dump_file) fprintf (rtl_dump_file, - "Removing alternative for bb %d of phi %d\n", + "Removing alternative for bb %d of phi %d\n", edge->src->index, SSA_NAME (PATTERN (insn))); insn = NEXT_INSN (insn); } @@ -834,7 +834,7 @@ optimize_unexecutable_edges (edges, executable_edges) } } } - + /* Perform substitution of known values for pseudo registers. ??? Note we do not do simplifications or constant folding here, it @@ -842,7 +842,7 @@ optimize_unexecutable_edges (edges, executable_edges) anyway. Consider that if the simplification would result in an expression that produces a constant value that the value would have been discovered and recorded already. - + We perform two transformations. First, we initialize pseudos to their known constant values at their definition point. Second, we try to replace uses with the known constant value. */ @@ -901,13 +901,13 @@ ssa_ccp_substitute_constants () && (GET_CODE (useinsn) == INSN || GET_CODE (useinsn) == JUMP_INSN)) { - + if (validate_replace_src (regno_reg_rtx [i], values[i].const_value, useinsn)) { if (rtl_dump_file) - fprintf (rtl_dump_file, + fprintf (rtl_dump_file, "Register %d in insn %d replaced with constant\n", i, INSN_UID (useinsn)); INSN_CODE (useinsn) = -1; @@ -915,7 +915,7 @@ ssa_ccp_substitute_constants () BLOCK_FOR_INSN (useinsn), useinsn); } - + } } } @@ -1009,7 +1009,7 @@ ssa_const_prop () for (i = 0; i < VARRAY_SIZE (ssa_definition); i++) { if (i < FIRST_PSEUDO_REGISTER) - values[i].lattice_val = VARYING; + values[i].lattice_val = VARYING; else values[i].lattice_val = UNDEFINED; values[i].const_value = NULL; @@ -1085,7 +1085,7 @@ ssa_const_prop () sbitmap_free (ssa_edges); ssa_edges = NULL; - + free_edge_list (edges); edges = NULL; @@ -1178,7 +1178,7 @@ ssa_fast_dce (df) == NOTE_INSN_DELETED)) || side_effects_p (PATTERN (VARRAY_RTX (ssa_definition, reg)))) continue; - + /* Iterate over the uses of this register. If we can not find any uses that have not been deleted, then the definition of this register is dead. */ @@ -1200,7 +1200,7 @@ ssa_fast_dce (df) /* If we did not find a use of this register, then the definition of this register is dead. */ - + if (! found_use) { rtx def = VARRAY_RTX (ssa_definition, reg); @@ -1221,5 +1221,5 @@ ssa_fast_dce (df) /* Update the use-def chains in the df_analyzer as needed. */ df_analyse (df_analyzer, 0, - DF_RD_CHAIN | DF_RU_CHAIN | DF_REG_INFO | DF_HARD_REGS); + DF_RD_CHAIN | DF_RU_CHAIN | DF_REG_INFO | DF_HARD_REGS); } diff --git a/gcc/ssa-dce.c b/gcc/ssa-dce.c index 83b4e44bf80..45dcd659f00 100644 --- a/gcc/ssa-dce.c +++ b/gcc/ssa-dce.c @@ -370,7 +370,7 @@ find_inherently_necessary (x) return !0; else switch (GET_CODE (x)) - { + { case CALL_INSN: case BARRIER: case PREFETCH: @@ -691,7 +691,7 @@ ssa_eliminate_dead_code () remove_edge (temp); } - /* Create an edge from this block to the post dominator. + /* Create an edge from this block to the post dominator. What about the PHI nodes at the target? */ make_edge (bb, pdom_bb, 0); @@ -711,7 +711,7 @@ ssa_eliminate_dead_code () else if (!JUMP_P (insn)) delete_insn_bb (insn); }); - + /* Remove fake edges from the CFG. */ remove_fake_edges (); diff --git a/gcc/ssa.c b/gcc/ssa.c index c97b35c3588..686339cd156 100644 --- a/gcc/ssa.c +++ b/gcc/ssa.c @@ -49,7 +49,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "output.h" #include "ssa.h" -/* TODO: +/* TODO: Handle subregs better, maybe. For now, if a reg that's set in a subreg expression is duplicated going into SSA form, an extra copy @@ -174,15 +174,15 @@ static void insert_phi_node PARAMS ((int regno, int b)); static void insert_phi_nodes PARAMS ((sbitmap *idfs, sbitmap *evals, int nregs)); -static void create_delayed_rename +static void create_delayed_rename PARAMS ((struct rename_context *, rtx *)); -static void apply_delayed_renames +static void apply_delayed_renames PARAMS ((struct rename_context *)); -static int rename_insn_1 +static int rename_insn_1 PARAMS ((rtx *ptr, void *data)); -static void rename_block +static void rename_block PARAMS ((int b, int *idom)); -static void rename_registers +static void rename_registers PARAMS ((int nregs, int *idom)); static inline int ephi_add_node @@ -195,20 +195,20 @@ static void ephi_create PARAMS ((int t, sbitmap visited, sbitmap *pred, sbitmap *succ, rtx *nodes)); static void eliminate_phi PARAMS ((edge e, partition reg_partition)); -static int make_regs_equivalent_over_bad_edges +static int make_regs_equivalent_over_bad_edges PARAMS ((int bb, partition reg_partition)); /* These are used only in the conservative register partitioning algorithms. */ -static int make_equivalent_phi_alternatives_equivalent +static int make_equivalent_phi_alternatives_equivalent PARAMS ((int bb, partition reg_partition)); -static partition compute_conservative_reg_partition +static partition compute_conservative_reg_partition PARAMS ((void)); static int record_canonical_element_1 PARAMS ((void **srfp, void *data)); static int check_hard_regs_in_partition PARAMS ((partition reg_partition)); -static int rename_equivalent_regs_in_insn +static int rename_equivalent_regs_in_insn PARAMS ((rtx *ptr, void *data)); /* These are used in the register coalescing algorithm. */ @@ -222,14 +222,14 @@ static int coalesce_regs_in_successor_phi_nodes PARAMS ((basic_block bb, partition p, conflict_graph conflicts)); static partition compute_coalesced_reg_partition PARAMS ((void)); -static int mark_reg_in_phi +static int mark_reg_in_phi PARAMS ((rtx *ptr, void *data)); static void mark_phi_and_copy_regs PARAMS ((regset phi_set)); -static int rename_equivalent_regs_in_insn +static int rename_equivalent_regs_in_insn PARAMS ((rtx *ptr, void *data)); -static void rename_equivalent_regs +static void rename_equivalent_regs PARAMS ((partition reg_partition)); /* Deal with hard registers. */ @@ -495,8 +495,8 @@ find_evaluations (evals, nregs) } /* Computing the Dominance Frontier: - - As decribed in Morgan, section 3.5, this may be done simply by + + As decribed in Morgan, section 3.5, this may be done simply by walking the dominator tree bottom-up, computing the frontier for the children before the parent. When considering a block B, there are two cases: @@ -698,7 +698,7 @@ insert_phi_nodes (idfs, evals, nregs) } } -/* Rename the registers to conform to SSA. +/* Rename the registers to conform to SSA. This is essentially the algorithm presented in Figure 7.8 of Morgan, with a few changes to reduce pattern search time in favour of a bit @@ -740,7 +740,7 @@ create_delayed_rename (c, reg_loc) { struct rename_set_data *r; r = (struct rename_set_data *) xmalloc (sizeof(*r)); - + if (GET_CODE (*reg_loc) != REG || !CONVERT_REGISTER_TO_SSA_P (REGNO (*reg_loc))) abort (); @@ -756,7 +756,7 @@ create_delayed_rename (c, reg_loc) /* This is part of a rather ugly hack to allow the pre-ssa regno to be reused. If, during processing, a register has not yet been touched, ssa_rename_to[regno][machno] will be NULL. Now, in the course of pushing - and popping values from ssa_rename_to, when we would ordinarily + and popping values from ssa_rename_to, when we would ordinarily pop NULL back in, we pop RENAME_NO_RTX. We treat this exactly the same as NULL, except that it signals that the original regno has already been reused. */ @@ -775,7 +775,7 @@ apply_delayed_renames (c) for (r = c->new_renames; r != NULL; r = r->next) { int new_regno; - + /* Failure here means that someone has a PARALLEL that sets a register twice (bad!). */ if (ssa_rename_to_lookup (r->old_reg) != r->prev_reg) @@ -812,7 +812,7 @@ apply_delayed_renames (c) } } -/* Part one of the first step of rename_block, called through for_each_rtx. +/* Part one of the first step of rename_block, called through for_each_rtx. Mark pseudos that are set for later update. Transform uses of pseudos. */ static int @@ -855,7 +855,7 @@ rename_insn_1 (ptr, data) (set (subreg (reg foo)) ...) into (sequence [(set (reg foo_1) (reg foo)) - (set (subreg (reg foo_1)) ...)]) + (set (subreg (reg foo_1)) ...)]) FIXME: Much of the time this is too much. For some constructs we know that the output register is strictly an output @@ -870,13 +870,13 @@ rename_insn_1 (ptr, data) { rtx i, reg; reg = dest; - + while (GET_CODE (reg) == STRICT_LOW_PART || GET_CODE (reg) == SUBREG || GET_CODE (reg) == SIGN_EXTRACT || GET_CODE (reg) == ZERO_EXTRACT) reg = XEXP (reg, 0); - + if (GET_CODE (reg) == REG && CONVERT_REGISTER_TO_SSA_P (REGNO (reg))) { @@ -950,7 +950,7 @@ rename_insn_1 (ptr, data) } /* Stop traversing. */ return -1; - } + } else /* Continue traversing. */ return 0; @@ -979,7 +979,7 @@ rename_block (bb, idom) /* Step One: Walk the basic block, adding new names for sets and replacing uses. */ - + next = b->head; last = b->end; do @@ -1004,7 +1004,7 @@ rename_block (bb, idom) { rtx seq; int i; - + emit (PATTERN (insn)); seq = gen_sequence (); /* We really want a SEQUENCE of SETs, not a SEQUENCE @@ -1014,7 +1014,7 @@ rename_block (bb, idom) PATTERN (insn) = seq; } end_sequence (); - + apply_delayed_renames (&context); set_data = context.done_renames; } @@ -1099,7 +1099,7 @@ rename_block (bb, idom) next = set_data->next; free (set_data); set_data = next; - } + } } static void @@ -1112,12 +1112,12 @@ rename_registers (nregs, idom) ssa_rename_to_pseudo = (rtx *) alloca (nregs * sizeof(rtx)); memset ((char *) ssa_rename_to_pseudo, 0, nregs * sizeof(rtx)); - memset ((char *) ssa_rename_to_hard, 0, + memset ((char *) ssa_rename_to_hard, 0, FIRST_PSEUDO_REGISTER * NUM_MACHINE_MODES * sizeof (rtx)); rename_block (0, idom); - /* ??? Update basic_block_live_at_start, and other flow info + /* ??? Update basic_block_live_at_start, and other flow info as needed. */ ssa_rename_to_pseudo = NULL; @@ -1247,7 +1247,7 @@ ephi_forward (t, visited, succ, tstack) EXECUTE_IF_SET_IN_SBITMAP (succ[t], 0, s, { if (! TEST_BIT (visited, s)) - tstack = ephi_forward (s, visited, succ, tstack); + tstack = ephi_forward (s, visited, succ, tstack); }); *tstack++ = t; @@ -1291,7 +1291,7 @@ ephi_create (t, visited, pred, succ, nodes) int p; /* Iterate through the predecessor list looking for unvisited nodes. - If there are any, we have a cycle, and must deal with that. At + If there are any, we have a cycle, and must deal with that. At the same time, look for a visited predecessor. If there is one, we won't need to create a temporary. */ @@ -1322,8 +1322,8 @@ ephi_create (t, visited, pred, succ, nodes) emit_move_insn (nodes[p], reg_u); } }); - } - else + } + else { /* No cycle. Just copy the value from a successor. */ @@ -1366,7 +1366,7 @@ eliminate_phi (e, reg_partition) if (n_nodes == 0) return; - /* Build the auxiliary graph R(B). + /* Build the auxiliary graph R(B). The nodes of the graph are the members of the register partition present in Phi(B). There is an edge from FIND(T0)->FIND(T1) for @@ -1399,7 +1399,7 @@ eliminate_phi (e, reg_partition) reg = regno_reg_rtx[partition_find (reg_partition, REGNO (reg))]; tgt = regno_reg_rtx[partition_find (reg_partition, REGNO (tgt))]; - /* If the two registers are already in the same partition, + /* If the two registers are already in the same partition, nothing will need to be done. */ if (reg != tgt) { @@ -1429,10 +1429,10 @@ eliminate_phi (e, reg_partition) sbitmap_zero (visited); - /* As we find a solution to the tsort, collect the implementation + /* As we find a solution to the tsort, collect the implementation insns in a sequence. */ start_sequence (); - + while (tstack != stack) { i = *--tstack; @@ -1456,14 +1456,14 @@ out: /* For basic block B, consider all phi insns which provide an alternative corresponding to an incoming abnormal critical edge. Place the phi alternative corresponding to that abnormal critical - edge in the same register class as the destination of the set. + edge in the same register class as the destination of the set. From Morgan, p. 178: - For each abnormal critical edge (C, B), - if T0 = phi (T1, ..., Ti, ..., Tm) is a phi node in B, - and C is the ith predecessor of B, - then T0 and Ti must be equivalent. + For each abnormal critical edge (C, B), + if T0 = phi (T1, ..., Ti, ..., Tm) is a phi node in B, + and C is the ith predecessor of B, + then T0 and Ti must be equivalent. Return non-zero iff any such cases were found for which the two regs were not already in the same class. */ @@ -1481,7 +1481,7 @@ make_regs_equivalent_over_bad_edges (bb, reg_partition) phi = first_insn_after_basic_block_note (b); /* Scan all the phi nodes. */ - for (; + for (; PHI_NODE_P (phi); phi = next_nonnote_insn (phi)) { @@ -1491,7 +1491,7 @@ make_regs_equivalent_over_bad_edges (bb, reg_partition) rtx tgt = SET_DEST (set); /* The set target is expected to be an SSA register. */ - if (GET_CODE (tgt) != REG + if (GET_CODE (tgt) != REG || !CONVERT_REGISTER_TO_SSA_P (REGNO (tgt))) abort (); tgt_regno = REGNO (tgt); @@ -1509,14 +1509,14 @@ make_regs_equivalent_over_bad_edges (bb, reg_partition) continue; /* The phi alternative is expected to be an SSA register. */ - if (GET_CODE (*alt) != REG + if (GET_CODE (*alt) != REG || !CONVERT_REGISTER_TO_SSA_P (REGNO (*alt))) abort (); alt_regno = REGNO (*alt); /* If the set destination and the phi alternative aren't already in the same class... */ - if (partition_find (reg_partition, tgt_regno) + if (partition_find (reg_partition, tgt_regno) != partition_find (reg_partition, alt_regno)) { /* ... make them such. */ @@ -1524,8 +1524,8 @@ make_regs_equivalent_over_bad_edges (bb, reg_partition) /* It is illegal to unify a hard register with a different register. */ abort (); - - partition_union (reg_partition, + + partition_union (reg_partition, tgt_regno, alt_regno); ++changed; } @@ -1554,7 +1554,7 @@ make_equivalent_phi_alternatives_equivalent (bb, reg_partition) phi = first_insn_after_basic_block_note (b); /* Scan all the phi nodes. */ - for (; + for (; PHI_NODE_P (phi); phi = next_nonnote_insn (phi)) { @@ -1572,7 +1572,7 @@ make_equivalent_phi_alternatives_equivalent (bb, reg_partition) rtx set2 = PATTERN (phi2); /* The regno of the destination of the set. */ int tgt2_regno = REGNO (SET_DEST (set2)); - + /* Are the set destinations equivalent regs? */ if (partition_find (reg_partition, tgt_regno) == partition_find (reg_partition, tgt2_regno)) @@ -1602,7 +1602,7 @@ make_equivalent_phi_alternatives_equivalent (bb, reg_partition) /* If the alternatives aren't already in the same class ... */ - if (partition_find (reg_partition, REGNO (*alt)) + if (partition_find (reg_partition, REGNO (*alt)) != partition_find (reg_partition, REGNO (*alt2))) { /* ... make them so. */ @@ -1611,7 +1611,7 @@ make_equivalent_phi_alternatives_equivalent (bb, reg_partition) a different register. */ abort (); - partition_union (reg_partition, + partition_union (reg_partition, REGNO (*alt), REGNO (*alt2)); ++changed; } @@ -1635,7 +1635,7 @@ compute_conservative_reg_partition () /* We don't actually work with hard registers, but it's easier to carry them around anyway rather than constantly doing register number arithmetic. */ - partition p = + partition p = partition_new (ssa_definition->num_elements); /* The first priority is to make sure registers that might have to @@ -1644,7 +1644,7 @@ compute_conservative_reg_partition () edges. */ for (bb = n_basic_blocks; --bb >= 0; ) changed += make_regs_equivalent_over_bad_edges (bb, p); - + /* Now we have to insure that corresponding arguments of phi nodes assigning to corresponding regs are equivalent. Iterate until nothing changes. */ @@ -1667,13 +1667,13 @@ compute_conservative_reg_partition () abnormal critical edges (which isn't possible). 2. Figure out which regs are involved (in the LHS or RHS) of - copies and phi nodes. Compute conflicts among these regs. + copies and phi nodes. Compute conflicts among these regs. 3. Walk around the instruction stream, placing two regs in the same class of the partition if one appears on the LHS and the other on the RHS of a copy or phi node and the two regs don't conflict. The conflict information of course needs to be - updated. + updated. 4. If anything has changed, there may be new opportunities to coalesce regs, so go back to 2. @@ -1681,14 +1681,14 @@ compute_conservative_reg_partition () /* If REG1 and REG2 don't conflict in CONFLICTS, place them in the same class of partition P, if they aren't already. Update - CONFLICTS appropriately. + CONFLICTS appropriately. Returns one if REG1 and REG2 were placed in the same class but were - not previously; zero otherwise. + not previously; zero otherwise. See Morgan figure 11.15. */ -static int +static int coalesce_if_unconflicting (p, conflicts, reg1, reg2) partition p; conflict_graph conflicts; @@ -1705,7 +1705,7 @@ coalesce_if_unconflicting (p, conflicts, reg1, reg2) REG2. */ reg1 = partition_find (p, reg1); reg2 = partition_find (p, reg2); - + /* If they're already in the same class, there's nothing to do. */ if (reg1 == reg2) return 0; @@ -1720,7 +1720,7 @@ coalesce_if_unconflicting (p, conflicts, reg1, reg2) /* Find the new canonical reg for the merged class. */ reg = partition_find (p, reg1); - + /* Merge conflicts from the two previous classes. */ conflict_graph_merge_regs (conflicts, reg, reg1); conflict_graph_merge_regs (conflicts, reg, reg2); @@ -1769,7 +1769,7 @@ coalesce_regs_in_copies (bb, p, conflicts) /* Coalesce only if the reg modes are the same. As long as each reg's rtx is unique, it can have only one mode, so two - pseudos of different modes can't be coalesced into one. + pseudos of different modes can't be coalesced into one. FIXME: We can probably get around this by inserting SUBREGs where appropriate, but for now we don't bother. */ @@ -1779,7 +1779,7 @@ coalesce_regs_in_copies (bb, p, conflicts) /* Found a copy; see if we can use the same reg for both the source and destination (and thus eliminate the copy, ultimately). */ - changed += coalesce_if_unconflicting (p, conflicts, + changed += coalesce_if_unconflicting (p, conflicts, REGNO (src), REGNO (dest)); } @@ -1805,12 +1805,12 @@ coalesce_reg_in_phi (insn, dest_regno, src_regno, data) int src_regno; void *data; { - struct phi_coalesce_context *context = + struct phi_coalesce_context *context = (struct phi_coalesce_context *) data; - + /* Attempt to use the same reg, if they don't conflict. */ - context->changed - += coalesce_if_unconflicting (context->p, context->conflicts, + context->changed + += coalesce_if_unconflicting (context->p, context->conflicts, dest_regno, src_regno); return 0; } @@ -1818,10 +1818,10 @@ coalesce_reg_in_phi (insn, dest_regno, src_regno, data) /* For each alternative in a phi function corresponding to basic block BB (in phi nodes in successor block to BB), place the reg in the phi alternative and the reg to which the phi value is set into the - same class in partition P, if allowed by CONFLICTS. + same class in partition P, if allowed by CONFLICTS. Return the number of changes that were made to P. - + See Morgan figure 11.14. */ static int @@ -1841,7 +1841,7 @@ coalesce_regs_in_successor_phi_nodes (bb, p, conflicts) } /* Compute and return a partition of pseudos. Where possible, - non-conflicting pseudos are placed in the same class. + non-conflicting pseudos are placed in the same class. The caller is responsible for deallocating the returned partition. */ @@ -1853,7 +1853,7 @@ compute_coalesced_reg_partition () regset_head phi_set_head; regset phi_set = &phi_set_head; - partition p = + partition p = partition_new (ssa_definition->num_elements); /* The first priority is to make sure registers that might have to @@ -1887,7 +1887,7 @@ compute_coalesced_reg_partition () { basic_block block = BASIC_BLOCK (bb); changed += coalesce_regs_in_copies (block, p, conflicts); - changed += + changed += coalesce_regs_in_successor_phi_nodes (block, p, conflicts); } @@ -1995,7 +1995,7 @@ rename_equivalent_regs_in_insn (ptr, data) unsigned int new_regno = partition_find (reg_partition, regno); rtx canonical_element_rtx = ssa_rename_from_lookup (new_regno); - if (canonical_element_rtx != NULL_RTX && + if (canonical_element_rtx != NULL_RTX && HARD_REGISTER_P (canonical_element_rtx)) { if (REGNO (canonical_element_rtx) != regno) @@ -2036,7 +2036,7 @@ record_canonical_element_1 (srfp, data) ((struct ssa_rename_from_hash_table_data *) data)->canonical_elements; partition reg_partition = ((struct ssa_rename_from_hash_table_data *) data)->reg_partition; - + SET_BIT (canonical_elements, partition_find (reg_partition, reg)); return 1; } @@ -2108,11 +2108,11 @@ rename_equivalent_regs (reg_partition) insn = next; if (INSN_P (insn)) { - for_each_rtx (&PATTERN (insn), - rename_equivalent_regs_in_insn, + for_each_rtx (&PATTERN (insn), + rename_equivalent_regs_in_insn, reg_partition); - for_each_rtx (®_NOTES (insn), - rename_equivalent_regs_in_insn, + for_each_rtx (®_NOTES (insn), + rename_equivalent_regs_in_insn, reg_partition); if (GET_CODE (PATTERN (insn)) == SEQUENCE) @@ -2147,7 +2147,7 @@ convert_from_ssa () /* Need global_live_at_{start,end} up to date. There should not be any significant dead code at this point, except perhaps dead - stores. So do not take the time to perform dead code elimination. + stores. So do not take the time to perform dead code elimination. Register coalescing needs death notes, so generate them. */ life_analysis (insns, NULL, PROP_DEATH_NOTES); @@ -2201,7 +2201,7 @@ convert_from_ssa () /* If we've reached the end of the block, stop. */ else if (insn == BLOCK_END (bb)) break; - else + else insn = NEXT_INSN (insn); } } @@ -2234,7 +2234,7 @@ for_each_successor_phi (bb, fn, data) void *data; { edge e; - + if (bb == EXIT_BLOCK_PTR) return 0; @@ -2244,7 +2244,7 @@ for_each_successor_phi (bb, fn, data) rtx insn; basic_block successor = e->dest; - if (successor == ENTRY_BLOCK_PTR + if (successor == ENTRY_BLOCK_PTR || successor == EXIT_BLOCK_PTR) continue; @@ -2261,7 +2261,7 @@ for_each_successor_phi (bb, fn, data) rtx phi_set = PATTERN (insn); rtx *alternative = phi_alternative (phi_set, bb->index); rtx phi_src; - + /* This phi function may not have an alternative corresponding to the incoming edge, indicating the assigned variable is not defined along the edge. */ @@ -2270,7 +2270,7 @@ for_each_successor_phi (bb, fn, data) phi_src = *alternative; /* Invoke the callback. */ - result = (*fn) (insn, REGNO (SET_DEST (phi_set)), + result = (*fn) (insn, REGNO (SET_DEST (phi_set)), REGNO (phi_src), data); /* Terminate if requested. */ @@ -2301,6 +2301,6 @@ conflicting_hard_regs_p (reg1, reg2) return 1; if (!HARD_REGISTER_NUM_P (orig_reg1) && HARD_REGISTER_NUM_P (orig_reg2)) return 1; - + return 0; } diff --git a/gcc/stmt.c b/gcc/stmt.c index 639587aa45e..cbe2da0b960 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -496,7 +496,7 @@ mark_block_nesting (n) ggc_mark_tree (n->data.block.cleanups); ggc_mark_tree (n->data.block.outer_cleanups); - for (l = n->data.block.label_chain; l != NULL; l = l->next) + for (l = n->data.block.label_chain; l != NULL; l = l->next) { ggc_mark (l); ggc_mark_tree (l->label); @@ -848,7 +848,7 @@ expand_goto (label) emit_indirect_jump (handler_slot); } - /* Search backwards to the jump insn and mark it as a + /* Search backwards to the jump insn and mark it as a non-local goto. */ for (insn = get_last_insn (); insn; insn = PREV_INSN (insn)) { @@ -1047,8 +1047,8 @@ expand_fixup (tree_label, rtl_label, last_insn) as a placeholder. */ { - rtx original_before_jump - = last_insn ? last_insn : get_last_insn (); + rtx original_before_jump + = last_insn ? last_insn : get_last_insn (); rtx start; rtx end; tree block; @@ -1066,17 +1066,17 @@ expand_fixup (tree_label, rtl_label, last_insn) = block; } - start_sequence (); - start = emit_note (NULL, NOTE_INSN_BLOCK_BEG); + start_sequence (); + start = emit_note (NULL, NOTE_INSN_BLOCK_BEG); if (cfun->x_whole_function_mode_p) NOTE_BLOCK (start) = block; fixup->before_jump = emit_note (NULL, NOTE_INSN_DELETED); end = emit_note (NULL, NOTE_INSN_BLOCK_END); if (cfun->x_whole_function_mode_p) NOTE_BLOCK (end) = block; - fixup->context = block; - end_sequence (); - emit_insns_after (start, original_before_jump); + fixup->context = block; + end_sequence (); + emit_insns_after (start, original_before_jump); } fixup->block_start_count = current_block_start_count; @@ -1382,7 +1382,7 @@ parse_output_constraint (constraint_p, operand_num, ninputs, noutputs, case '=': error ("operand constraint contains incorrectly positioned '+' or '='"); return false; - + case '%': if (operand_num + 1 == ninputs + noutputs) { @@ -1419,7 +1419,7 @@ parse_output_constraint (constraint_p, operand_num, ninputs, noutputs, *allows_reg = true; *allows_mem = true; break; - + case 'p': case 'r': *allows_reg = true; break; @@ -1575,7 +1575,7 @@ parse_input_constraint (constraint_p, input_num, ninputs, noutputs, ninout, OUTPUTS is a list of output arguments (lvalues); INPUTS a list of inputs. Each output or input has an expression in the TREE_VALUE and and a tree list in TREE_PURPOSE which in turn contains a constraint - name in TREE_VALUE (or NULL_TREE) and a constraint string + name in TREE_VALUE (or NULL_TREE) and a constraint string in TREE_PURPOSE. CLOBBERS is a list of STRING_CST nodes each naming a hard register that is clobbered by this insn. @@ -1752,7 +1752,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) if ((! allows_mem && GET_CODE (output_rtx[i]) == MEM) || GET_CODE (output_rtx[i]) == CONCAT) { - real_output_rtx[i] = protect_from_queue (output_rtx[i], 1); + real_output_rtx[i] = protect_from_queue (output_rtx[i], 1); output_rtx[i] = gen_reg_rtx (GET_MODE (output_rtx[i])); if (is_inout) emit_move_insn (output_rtx[i], real_output_rtx[i]); @@ -1781,7 +1781,7 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) body = gen_rtx_ASM_OPERANDS ((noutputs == 0 ? VOIDmode : GET_MODE (output_rtx[0])), - TREE_STRING_POINTER (string), + TREE_STRING_POINTER (string), empty_string, 0, argvec, constraintvec, filename, line); @@ -2127,7 +2127,7 @@ resolve_operand_names (string, outputs, inputs, pconstraints) /* A subroutine of resolve_operand_names. P points to the '[' for a potential named operand of the form [<name>]. In place, replace - the name and brackets with a number. Return a pointer to the + the name and brackets with a number. Return a pointer to the balance of the string after substitution. */ static char * @@ -2697,7 +2697,7 @@ expand_end_loop () the end of the entry condtional. Without this, our lexical scan can't tell the difference between an entry conditional and a body conditional that exits the loop. Mistaking the two means - that we can misplace the NOTE_INSN_LOOP_CONT note, which can + that we can misplace the NOTE_INSN_LOOP_CONT note, which can screw up loop unrolling. Things will be oh so much better when loop optimization is done @@ -2738,7 +2738,7 @@ expand_end_loop () /* Likewise for debug scopes. In this case we'll either (1) move all of the notes if they are properly nested or (2) leave the - notes alone and only rotate the loop at high optimization + notes alone and only rotate the loop at high optimization levels when we expect to scrog debug info. */ else if (NOTE_LINE_NUMBER (etc_note) == NOTE_INSN_BLOCK_BEG) debug_blocks++; @@ -2890,7 +2890,7 @@ expand_exit_loop_if_false (whichloop, cond) } /* Like expand_exit_loop_if_false except also emit a note marking - the end of the conditional. Should only be used immediately + the end of the conditional. Should only be used immediately after expand_loop_start. */ int @@ -3114,7 +3114,7 @@ expand_return (retval) /* Treat this like a return of no value from a function that returns a value. */ expand_null_return (); - return; + return; } else if (TREE_CODE (retval) == RESULT_DECL) retval_rhs = retval; @@ -5251,7 +5251,7 @@ check_for_full_enumeration_handling (type) chain && !tree_int_cst_equal (n->low, TREE_VALUE (chain)); chain = TREE_CHAIN (chain)) ; - + if (!chain) { if (TYPE_NAME (type) == 0) @@ -5271,7 +5271,7 @@ check_for_full_enumeration_handling (type) chain && !tree_int_cst_equal (n->high, TREE_VALUE (chain)); chain = TREE_CHAIN (chain)) ; - + if (!chain) { if (TYPE_NAME (type) == 0) @@ -5291,11 +5291,11 @@ check_for_full_enumeration_handling (type) /* Free CN, and its children. */ -static void +static void free_case_nodes (cn) case_node_ptr cn; { - if (cn) + if (cn) { free_case_nodes (cn->left); free_case_nodes (cn->right); @@ -5537,21 +5537,21 @@ expand_end_case_type (orig_index, orig_type) { index_type = thiscase->data.case_stmt.nominal_type; - /* Index jumptables from zero for suitable values of + /* Index jumptables from zero for suitable values of minval to avoid a subtraction. */ - if (! optimize_size - && compare_tree_int (minval, 0) > 0 - && compare_tree_int (minval, 3) < 0) - { - minval = integer_zero_node; - range = maxval; - } + if (! optimize_size + && compare_tree_int (minval, 0) > 0 + && compare_tree_int (minval, 3) < 0) + { + minval = integer_zero_node; + range = maxval; + } if (! try_tablejump (index_type, index_expr, minval, range, table_label, default_label)) abort (); } - + /* Get table of labels to jump to, in order of case index. */ ncases = tree_low_cst (range, 0) + 1; @@ -5564,11 +5564,11 @@ expand_end_case_type (orig_index, orig_type) value since that should fit in a HOST_WIDE_INT while the actual values may not. */ HOST_WIDE_INT i_low - = tree_low_cst (fold (build (MINUS_EXPR, index_type, - n->low, minval)), 1); + = tree_low_cst (fold (build (MINUS_EXPR, index_type, + n->low, minval)), 1); HOST_WIDE_INT i_high - = tree_low_cst (fold (build (MINUS_EXPR, index_type, - n->high, minval)), 1); + = tree_low_cst (fold (build (MINUS_EXPR, index_type, + n->high, minval)), 1); HOST_WIDE_INT i; for (i = i_low; i <= i_high; i ++) @@ -6400,7 +6400,7 @@ emit_case_nodes (index, node, default_label, index_type) new_bound = expand_expr (fold (build (MINUS_EXPR, type, high, low)), NULL_RTX, mode, 0); - + emit_cmp_and_jump_insns (new_index, new_bound, GT, NULL_RTX, mode, 1, default_label); } diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index baf26dddba1..8bbf4fea11f 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -180,7 +180,7 @@ variable_size (size) } if (immediate_size_expand) - /* NULL_RTX is not defined; neither is the rtx type. + /* NULL_RTX is not defined; neither is the rtx type. Also, we would like to pass const0_rtx here, but don't have it. */ expand_expr (size, expand_expr (integer_zero_node, NULL_RTX, VOIDmode, 0), VOIDmode, 0); @@ -283,7 +283,7 @@ int_mode_for_mode (mode) case MODE_RANDOM: if (mode == BLKmode) - break; + break; /* ... fall through ... */ @@ -381,7 +381,7 @@ layout_decl (decl, known_align) && (DECL_ALIGN (decl) == 0 || (! (code == FIELD_DECL && DECL_PACKED (decl)) && TYPE_ALIGN (type) > DECL_ALIGN (decl)))) - { + { DECL_ALIGN (decl) = TYPE_ALIGN (type); DECL_USER_ALIGN (decl) = 0; } @@ -407,7 +407,7 @@ layout_decl (decl, known_align) } } - /* See if we can use an ordinary integer mode for a bit-field. + /* See if we can use an ordinary integer mode for a bit-field. Conditions are: a fixed size that is correct for another mode and occupying a complete byte or bytes on proper boundary. */ if (code == FIELD_DECL && DECL_BIT_FIELD (decl) @@ -478,7 +478,7 @@ set_lang_adjust_rli (f) /* Begin laying out type T, which may be a RECORD_TYPE, UNION_TYPE, or QUAL_UNION_TYPE. Return a pointer to a struct record_layout_info which is to be passed to all other layout functions for this record. It is the - responsibility of the caller to call `free' for the storage returned. + responsibility of the caller to call `free' for the storage returned. Note that garbage collection is not permitted until we finish laying out the record. */ @@ -486,7 +486,7 @@ record_layout_info start_record_layout (t) tree t; { - record_layout_info rli + record_layout_info rli = (record_layout_info) xmalloc (sizeof (struct record_layout_info_s)); rli->t = t; @@ -587,7 +587,7 @@ normalize_offset (poffset, pbitpos, off_align) = size_binop (PLUS_EXPR, *poffset, size_binop (MULT_EXPR, convert (sizetype, extra_aligns), size_int (off_align / BITS_PER_UNIT))); - + *pbitpos = size_binop (FLOOR_MOD_EXPR, *pbitpos, bitsize_int (off_align)); } @@ -654,7 +654,7 @@ place_union_field (rli, field) unsigned int desired_align; layout_decl (field, 0); - + DECL_FIELD_OFFSET (field) = size_zero_node; DECL_FIELD_BIT_OFFSET (field) = bitsize_zero_node; SET_DECL_OFFSET_ALIGN (field, BIGGEST_ALIGNMENT); @@ -685,7 +685,7 @@ place_union_field (rli, field) entire union to have `int' alignment. */ if (PCC_BITFIELD_TYPE_MATTERS && DECL_BIT_FIELD_TYPE (field)) { - rli->record_align = MAX (rli->record_align, + rli->record_align = MAX (rli->record_align, TYPE_ALIGN (TREE_TYPE (field))); rli->unpadded_align = MAX (rli->unpadded_align, TYPE_ALIGN (TREE_TYPE (field))); @@ -697,7 +697,7 @@ place_union_field (rli, field) if (TREE_CODE (rli->t) == UNION_TYPE) rli->offset = size_binop (MAX_EXPR, rli->offset, DECL_SIZE_UNIT (field)); else if (TREE_CODE (rli->t) == QUAL_UNION_TYPE) - rli->offset = fold (build (COND_EXPR, sizetype, + rli->offset = fold (build (COND_EXPR, sizetype, DECL_QUALIFIER (field), DECL_SIZE_UNIT (field), rli->offset)); } @@ -721,7 +721,7 @@ place_field (rli, field) unsigned int user_align; /* The type of this field. */ tree type = TREE_TYPE (field); - + if (TREE_CODE (field) == ERROR_MARK || TREE_CODE (type) == ERROR_MARK) return; @@ -806,7 +806,7 @@ place_field (rli, field) } else desired_align = 1; - } + } else #ifdef PCC_BITFIELD_TYPE_MATTERS if (PCC_BITFIELD_TYPE_MATTERS && type != error_mark_node @@ -1121,7 +1121,7 @@ finalize_record_size (rli) if (warn_padded && TREE_CONSTANT (unpadded_size) && simple_cst_equal (unpadded_size, TYPE_SIZE (rli->t)) == 0) warning ("padding struct size to alignment boundary"); - + if (warn_packed && TREE_CODE (rli->t) == RECORD_TYPE && TYPE_PACKED (rli->t) && ! rli->packed_maybe_necessary && TREE_CONSTANT (unpadded_size)) @@ -1208,7 +1208,7 @@ compute_record_mode (type) return; bitpos = int_bit_position (field); - + /* Must be BLKmode if any field crosses a word boundary, since extract_bit_field can't handle that in registers. */ if (bitpos / BITS_PER_WORD @@ -1680,7 +1680,7 @@ layout_type (type) /* Compute the final TYPE_SIZE, TYPE_ALIGN, etc. for TYPE. For records and unions, finish_record_layout already called this function. */ - if (TREE_CODE (type) != RECORD_TYPE + if (TREE_CODE (type) != RECORD_TYPE && TREE_CODE (type) != UNION_TYPE && TREE_CODE (type) != QUAL_UNION_TYPE) finalize_type_size (type); diff --git a/gcc/stringpool.c b/gcc/stringpool.c index e5b674a8903..13f90ca3b01 100644 --- a/gcc/stringpool.c +++ b/gcc/stringpool.c @@ -110,7 +110,7 @@ get_identifier (text) /* Identical to get_identifier, except that the length is assumed known. */ - + tree get_identifier_with_length (text, length) const char *text; |