Commit 786de7eb by Kazu Hirata Committed by Kazu Hirata

sbitmap.c: Fix formatting.

	* 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.

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