Commit 3a538a66 by Kazu Hirata Committed by Kazu Hirata

dbxout.c: Fix formatting.

	* dbxout.c: Fix formatting.
	* dependence.c: Likewise.
	* df.c: Likewise.
	* diagnostic.c: Likewise.
	* doloop.c: Likewise.
	* dominance.c: Likewise.
	* doschk.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.

From-SVN: r53380
parent c9c2cb7c
2002-05-11 Kazu Hirata <kazu@cs.umass.edu>
* dbxout.c: Fix formatting.
* dependence.c: Likewise.
* df.c: Likewise.
* diagnostic.c: Likewise.
* doloop.c: Likewise.
* dominance.c: Likewise.
* doschk.c: Likewise.
* dwarf2asm.c: Likewise.
* dwarf2out.c: Likewise.
* dwarfout.c: Likewise.
2002-05-10 Richard Henderson <rth@redhat.com> 2002-05-10 Richard Henderson <rth@redhat.com>
* final.c (end_final): Tidy whitespace. Don't honor flag_pack_struct. * final.c (end_final): Tidy whitespace. Don't honor flag_pack_struct.
......
...@@ -669,7 +669,7 @@ dbxout_global_decl (decl) ...@@ -669,7 +669,7 @@ dbxout_global_decl (decl)
&& ! DECL_EXTERNAL (decl) && ! DECL_EXTERNAL (decl)
&& DECL_RTL_SET_P (decl)) /* Not necessary? */ && DECL_RTL_SET_P (decl)) /* Not necessary? */
dbxout_symbol (decl, 0); dbxout_symbol (decl, 0);
} }
/* At the end of compilation, finish writing the symbol table. /* At the end of compilation, finish writing the symbol table.
Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is Unless you define DBX_OUTPUT_MAIN_SOURCE_FILE_END, the default is
...@@ -959,7 +959,7 @@ dbxout_type_methods (type) ...@@ -959,7 +959,7 @@ dbxout_type_methods (type)
} }
if (!need_prefix) if (!need_prefix)
{ {
putc (';', asmfile); putc (';', asmfile);
CHARS (1); CHARS (1);
} }
} }
...@@ -1219,7 +1219,7 @@ dbxout_type (type, full) ...@@ -1219,7 +1219,7 @@ dbxout_type (type, full)
write it as a subtype. */ write it as a subtype. */
else if (TREE_TYPE (type) != 0 else if (TREE_TYPE (type) != 0
&& TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE) && TREE_CODE (TREE_TYPE (type)) == INTEGER_TYPE)
{ {
/* If the size is non-standard, say what it is if we can use /* If the size is non-standard, say what it is if we can use
GDB extensions. */ GDB extensions. */
...@@ -1232,10 +1232,10 @@ dbxout_type (type, full) ...@@ -1232,10 +1232,10 @@ dbxout_type (type, full)
} }
dbxout_range_type (type); dbxout_range_type (type);
} }
else else
{ {
/* If the size is non-standard, say what it is if we can use /* If the size is non-standard, say what it is if we can use
GDB extensions. */ GDB extensions. */
...@@ -1259,7 +1259,7 @@ dbxout_type (type, full) ...@@ -1259,7 +1259,7 @@ dbxout_type (type, full)
larger. This is because we print the bounds as signed decimal, larger. This is because we print the bounds as signed decimal,
and hence they can't span same size unsigned types. */ and hence they can't span same size unsigned types. */
if (use_gnu_debug_info_extensions if (use_gnu_debug_info_extensions
&& TYPE_MIN_VALUE (type) != 0 && TYPE_MIN_VALUE (type) != 0
&& TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST && TREE_CODE (TYPE_MIN_VALUE (type)) == INTEGER_CST
&& TYPE_MAX_VALUE (type) != 0 && TYPE_MAX_VALUE (type) != 0
...@@ -1288,7 +1288,7 @@ dbxout_type (type, full) ...@@ -1288,7 +1288,7 @@ dbxout_type (type, full)
else else
/* Output other integer types as subranges of `int'. */ /* Output other integer types as subranges of `int'. */
dbxout_range_type (type); dbxout_range_type (type);
} }
break; break;
...@@ -1801,7 +1801,7 @@ print_wide_int (c) ...@@ -1801,7 +1801,7 @@ print_wide_int (c)
CHARS (digs); CHARS (digs);
} }
/* Output the name of type TYPE, with no punctuation. /* Output the name of type TYPE, with no punctuation.
Such names can be set up either by typedef declarations Such names can be set up either by typedef declarations
or by struct, enum and union tags. */ or by struct, enum and union tags. */
...@@ -1947,7 +1947,7 @@ dbxout_symbol (decl, local) ...@@ -1947,7 +1947,7 @@ dbxout_symbol (decl, local)
&& !TREE_ASM_WRITTEN (TYPE_NAME (type)) && !TREE_ASM_WRITTEN (TYPE_NAME (type))
/* Distinguish the implicit typedefs of C++ /* Distinguish the implicit typedefs of C++
from explicit ones that might be found in C. */ from explicit ones that might be found in C. */
&& DECL_ARTIFICIAL (decl) && DECL_ARTIFICIAL (decl)
/* Do not generate a tag for records of variable size, /* Do not generate a tag for records of variable size,
since this type can not be properly described in the since this type can not be properly described in the
DBX format, and it confuses some tools such as objdump. */ DBX format, and it confuses some tools such as objdump. */
...@@ -1979,7 +1979,7 @@ dbxout_symbol (decl, local) ...@@ -1979,7 +1979,7 @@ dbxout_symbol (decl, local)
&& TYPE_NAME (type) == decl && TYPE_NAME (type) == decl
/* Distinguish the implicit typedefs of C++ /* Distinguish the implicit typedefs of C++
from explicit ones that might be found in C. */ from explicit ones that might be found in C. */
&& DECL_ARTIFICIAL (decl)) && DECL_ARTIFICIAL (decl))
{ {
if (use_gnu_debug_info_extensions && have_used_extensions) if (use_gnu_debug_info_extensions && have_used_extensions)
{ {
...@@ -2112,7 +2112,7 @@ dbxout_symbol (decl, local) ...@@ -2112,7 +2112,7 @@ dbxout_symbol (decl, local)
result = dbxout_symbol_location (decl, type, 0, DECL_RTL (decl)); result = dbxout_symbol_location (decl, type, 0, DECL_RTL (decl));
break; break;
default: default:
break; break;
} }
...@@ -2136,7 +2136,7 @@ dbxout_symbol_location (decl, type, suffix, home) ...@@ -2136,7 +2136,7 @@ dbxout_symbol_location (decl, type, suffix, home)
/* Don't mention a variable at all /* Don't mention a variable at all
if it was completely optimized into nothingness. if it was completely optimized into nothingness.
If the decl was from an inline function, then its rtl If the decl was from an inline function, then its rtl
is not identically the rtl that was used in this is not identically the rtl that was used in this
particular compilation. */ particular compilation. */
...@@ -2215,7 +2215,7 @@ dbxout_symbol_location (decl, type, suffix, home) ...@@ -2215,7 +2215,7 @@ dbxout_symbol_location (decl, type, suffix, home)
|| GET_CODE (tmp) == LABEL_REF) || GET_CODE (tmp) == LABEL_REF)
current_sym_addr = tmp; current_sym_addr = tmp;
} }
/* Ultrix `as' seems to need this. */ /* Ultrix `as' seems to need this. */
#ifdef DBX_STATIC_STAB_DATA_SECTION #ifdef DBX_STATIC_STAB_DATA_SECTION
data_section (); data_section ();
...@@ -2504,7 +2504,7 @@ dbxout_parms (parms) ...@@ -2504,7 +2504,7 @@ dbxout_parms (parms)
} }
/* It is quite tempting to use: /* It is quite tempting to use:
dbxout_type (TREE_TYPE (parms), 0); dbxout_type (TREE_TYPE (parms), 0);
as the next statement, rather than using DECL_ARG_TYPE(), so as the next statement, rather than using DECL_ARG_TYPE(), so
...@@ -2517,7 +2517,7 @@ dbxout_parms (parms) ...@@ -2517,7 +2517,7 @@ dbxout_parms (parms)
double on the stack, but if we emit a stab saying the type is a double on the stack, but if we emit a stab saying the type is a
float, then gdb will only read in a single value, and this will float, then gdb will only read in a single value, and this will
produce an erroneous value. */ produce an erroneous value. */
dbxout_type (DECL_ARG_TYPE (parms), 0); dbxout_type (DECL_ARG_TYPE (parms), 0);
current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr); current_sym_value = DEBUGGER_ARG_OFFSET (current_sym_value, addr);
dbxout_finish_symbol (parms); dbxout_finish_symbol (parms);
} }
...@@ -2635,13 +2635,13 @@ dbxout_parms (parms) ...@@ -2635,13 +2635,13 @@ dbxout_parms (parms)
const char *const decl_name = (DECL_NAME (parms) const char *const decl_name = (DECL_NAME (parms)
? IDENTIFIER_POINTER (DECL_NAME (parms)) ? IDENTIFIER_POINTER (DECL_NAME (parms))
: "(anon)"); : "(anon)");
if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG) if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG)
current_sym_value = 0; current_sym_value = 0;
else else
current_sym_value current_sym_value
= INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1)); = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1));
current_sym_addr = 0; current_sym_addr = 0;
FORCE_TEXT; FORCE_TEXT;
fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name); fprintf (asmfile, "%s\"%s:v", ASM_STABS_OP, decl_name);
...@@ -2679,7 +2679,7 @@ dbxout_parms (parms) ...@@ -2679,7 +2679,7 @@ dbxout_parms (parms)
&& TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms)) && TYPE_MODE (TREE_TYPE (parms)) != GET_MODE (DECL_RTL (parms))
&& GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD) && GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))) < UNITS_PER_WORD)
{ {
current_sym_value += current_sym_value +=
GET_MODE_SIZE (GET_MODE (DECL_RTL (parms))) GET_MODE_SIZE (GET_MODE (DECL_RTL (parms)))
- GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms))); - GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (parms)));
} }
...@@ -2789,7 +2789,7 @@ dbxout_block (block, depth, args) ...@@ -2789,7 +2789,7 @@ dbxout_block (block, depth, args)
int blocknum = -1; int blocknum = -1;
#if DBX_BLOCKS_FUNCTION_RELATIVE #if DBX_BLOCKS_FUNCTION_RELATIVE
const char *begin_label; const char *begin_label;
if (current_function_func_begin_label != NULL_TREE) if (current_function_func_begin_label != NULL_TREE)
begin_label = IDENTIFIER_POINTER (current_function_func_begin_label); begin_label = IDENTIFIER_POINTER (current_function_func_begin_label);
else else
......
...@@ -149,7 +149,7 @@ typedef struct dependence ...@@ -149,7 +149,7 @@ typedef struct dependence
int distance[MAX_SUBSCRIPTS]; int distance[MAX_SUBSCRIPTS];
struct dependence *next; struct dependence *next;
} dependence; } dependence;
/* subscripts are represented by an array of these. Each reflects one /* subscripts are represented by an array of these. Each reflects one
X * i + Y term, where X and Y are constants. */ X * i + Y term, where X and Y are constants. */
...@@ -255,7 +255,7 @@ init_dependence_analysis (exp) ...@@ -255,7 +255,7 @@ init_dependence_analysis (exp)
} }
/* Build ARRAY_REF def/use info 'def_use_chain' starting at EXP which is a def /* Build ARRAY_REF def/use info 'def_use_chain' starting at EXP which is a def
or use DU_TYPE */ or use DU_TYPE */
static void static void
build_def_use (exp, du_type) build_def_use (exp, du_type)
...@@ -277,7 +277,7 @@ build_def_use (exp, du_type) ...@@ -277,7 +277,7 @@ build_def_use (exp, du_type)
nloop = 0; nloop = 0;
du_idx = 0; du_idx = 0;
} }
while (node) while (node)
switch (TREE_CODE (node)) switch (TREE_CODE (node))
{ {
...@@ -301,7 +301,7 @@ build_def_use (exp, du_type) ...@@ -301,7 +301,7 @@ build_def_use (exp, du_type)
TREE_OPERAND (node, 2), loop_def) TREE_OPERAND (node, 2), loop_def)
== 0) == 0)
loop_def->status = unnormal; loop_def->status = unnormal;
build_def_use (TREE_OPERAND (node, 3), 0); build_def_use (TREE_OPERAND (node, 3), 0);
nloop--; nloop--;
current_loop = 0; current_loop = 0;
...@@ -309,7 +309,7 @@ build_def_use (exp, du_type) ...@@ -309,7 +309,7 @@ build_def_use (exp, du_type)
break; break;
case MODIFY_EXPR: case MODIFY_EXPR:
/* Is an induction variable modified? */ /* Is an induction variable modified? */
if (loop_def if (loop_def
&& TREE_CODE (TREE_OPERAND (node, 0)) == VAR_DECL && TREE_CODE (TREE_OPERAND (node, 0)) == VAR_DECL
&& have_induction_variable && have_induction_variable
(loop_def->outer_loop, (loop_def->outer_loop,
...@@ -362,7 +362,7 @@ build_def_use (exp, du_type) ...@@ -362,7 +362,7 @@ build_def_use (exp, du_type)
break; break;
} }
} }
for (i = 0; for (i = 0;
i < du_idx i < du_idx
&& strcmp (IDENTIFIER_POINTER (DECL_NAME (array_ref)), && strcmp (IDENTIFIER_POINTER (DECL_NAME (array_ref)),
...@@ -388,7 +388,7 @@ build_def_use (exp, du_type) ...@@ -388,7 +388,7 @@ build_def_use (exp, du_type)
case DECL_STMT: case DECL_STMT:
node = TREE_CHAIN (node); node = TREE_CHAIN (node);
break; break;
case EXPR_STMT: case EXPR_STMT:
if (TREE_CODE (TREE_OPERAND (node, 0)) == MODIFY_EXPR) if (TREE_CODE (TREE_OPERAND (node, 0)) == MODIFY_EXPR)
build_def_use (TREE_OPERAND (node, 0), def); build_def_use (TREE_OPERAND (node, 0), def);
...@@ -514,7 +514,7 @@ find_induction_variable (init_node, cond_node, incr_node, loop_def) ...@@ -514,7 +514,7 @@ find_induction_variable (init_node, cond_node, incr_node, loop_def)
ind_ptr->low_bound = get_low_bound (init_node, ind_ptr->variable); ind_ptr->low_bound = get_low_bound (init_node, ind_ptr->variable);
if (TREE_CODE (TREE_OPERAND (cond_node, 0)) == VAR_DECL if (TREE_CODE (TREE_OPERAND (cond_node, 0)) == VAR_DECL
&& IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (cond_node, 0))) && IDENTIFIER_POINTER (DECL_NAME (TREE_OPERAND (cond_node, 0)))
== ind_ptr->variable) == ind_ptr->variable)
{ {
if (TREE_CODE (TREE_OPERAND (cond_node, 1)) == INTEGER_CST) if (TREE_CODE (TREE_OPERAND (cond_node, 1)) == INTEGER_CST)
...@@ -732,7 +732,7 @@ check_node_dependence (du) ...@@ -732,7 +732,7 @@ check_node_dependence (du)
ck_loop_ptr, j); ck_loop_ptr, j);
/* ?? Add other tests: single variable exact test, banerjee */ /* ?? Add other tests: single variable exact test, banerjee */
} }
ck_loop_ptr = ck_loop_ptr->next_nest; ck_loop_ptr = ck_loop_ptr->next_nest;
} }
...@@ -752,8 +752,8 @@ check_node_dependence (du) ...@@ -752,8 +752,8 @@ check_node_dependence (du)
dep_ptr->source = use_ptr->expression; dep_ptr->source = use_ptr->expression;
dep_ptr->destination = def_ptr->expression; dep_ptr->destination = def_ptr->expression;
dep_ptr->next = 0; dep_ptr->next = 0;
if (def_ptr < use_ptr && use_ptr->type == use) if (def_ptr < use_ptr && use_ptr->type == use)
dep_ptr->dependence = dt_flow; dep_ptr->dependence = dt_flow;
else if (def_ptr > use_ptr && use_ptr->type == use) else if (def_ptr > use_ptr && use_ptr->type == use)
dep_ptr->dependence = dt_anti; dep_ptr->dependence = dt_anti;
...@@ -832,7 +832,7 @@ get_coefficients (du, coefficients) ...@@ -832,7 +832,7 @@ get_coefficients (du, coefficients)
coefficients[i].variable = 0; coefficients[i].variable = 0;
coefficients[i].next = 0; coefficients[i].next = 0;
} }
for (array_ref = du->expression; for (array_ref = du->expression;
TREE_CODE (array_ref) == ARRAY_REF; TREE_CODE (array_ref) == ARRAY_REF;
array_ref = TREE_OPERAND (array_ref, 0)) array_ref = TREE_OPERAND (array_ref, 0))
...@@ -951,7 +951,7 @@ normalize_coefficients (coefficients, loop_ptr, count) ...@@ -951,7 +951,7 @@ normalize_coefficients (coefficients, loop_ptr, count)
for (i = 1; i <= count; i++) for (i = 1; i <= count; i++)
{ {
for (ck_loop_ptr = loop_ptr; ck_loop_ptr; for (ck_loop_ptr = loop_ptr; ck_loop_ptr;
ck_loop_ptr = ck_loop_ptr->next_nest) ck_loop_ptr = ck_loop_ptr->next_nest)
for (ind_ptr = ck_loop_ptr->ind; ind_ptr; ind_ptr = ind_ptr->next) for (ind_ptr = ck_loop_ptr->ind; ind_ptr; ind_ptr = ind_ptr->next)
{ {
...@@ -1014,7 +1014,7 @@ classify_dependence (icoefficients, ocoefficients, complexity, separability, ...@@ -1014,7 +1014,7 @@ classify_dependence (icoefficients, ocoefficients, complexity, separability,
} }
} }
} }
for (idx = 1; idx <= count; idx++) for (idx = 1; idx <= count; idx++)
{ {
if (iiv_used[idx] == 0 && oiv_used[idx] == 0) if (iiv_used[idx] == 0 && oiv_used[idx] == 0)
...@@ -1178,7 +1178,7 @@ gcd_test (icoefficients, ocoefficients, direction, distance, loop_ptr, sub) ...@@ -1178,7 +1178,7 @@ gcd_test (icoefficients, ocoefficients, direction, distance, loop_ptr, sub)
} }
/* ?? gcd does not yield direction and distance. Wolfe's direction /* ?? gcd does not yield direction and distance. Wolfe's direction
vector hierarchy can be used to give this. */ vector hierarchy can be used to give this. */
} }
/* Find the gcd of X and Y using Euclid's algorithm */ /* Find the gcd of X and Y using Euclid's algorithm */
...@@ -1213,7 +1213,7 @@ find_gcd (x, y) ...@@ -1213,7 +1213,7 @@ find_gcd (x, y)
} }
/* Merge SUBSCRIPT_COUNT DIRECTIONs and DISTANCEs for LOOP_COUNT loops. /* Merge SUBSCRIPT_COUNT DIRECTIONs and DISTANCEs for LOOP_COUNT loops.
We use a predefined array to handle the direction merge. We use a predefined array to handle the direction merge.
The distance merge makes use of the fact that distances default to The distance merge makes use of the fact that distances default to
INT_MAX. Distances are '&' together. Watch out for a negative distance. INT_MAX. Distances are '&' together. Watch out for a negative distance.
*/ */
...@@ -1228,7 +1228,7 @@ merge_dependencies (direction, distance, loop_count, subscript_count) ...@@ -1228,7 +1228,7 @@ merge_dependencies (direction, distance, loop_count, subscript_count)
int i, j; int i, j;
int sign; int sign;
static const enum direction_type direction_merge [8][8] = static const enum direction_type direction_merge [8][8] =
{{lt, le, le, star, star, lt, independent, lt}, {{lt, le, le, star, star, lt, independent, lt},
{le, le, le, star, star, le, independent, le}, {le, le, le, star, star, le, independent, le},
{le, le, eq, ge, ge, eq, independent, eq}, {le, le, eq, ge, ge, eq, independent, eq},
...@@ -1238,7 +1238,7 @@ merge_dependencies (direction, distance, loop_count, subscript_count) ...@@ -1238,7 +1238,7 @@ merge_dependencies (direction, distance, loop_count, subscript_count)
{independent, independent, independent, independent, independent}, {independent, independent, independent, independent, independent},
{independent, independent, independent} {independent, independent, independent}
}; };
for (i = 1; i <= loop_count; i++) for (i = 1; i <= loop_count; i++)
{ {
distance[i][0] = INT_MAX; distance[i][0] = INT_MAX;
...@@ -1314,7 +1314,7 @@ dump_one_node (du, seen) ...@@ -1314,7 +1314,7 @@ dump_one_node (du, seen)
for (array_ref = du_ptr->expression; for (array_ref = du_ptr->expression;
TREE_CODE (array_ref) == ARRAY_REF; TREE_CODE (array_ref) == ARRAY_REF;
array_ref = TREE_OPERAND (array_ref, 0)) array_ref = TREE_OPERAND (array_ref, 0))
{ {
printf ("["); printf ("[");
dump_array_ref (TREE_OPERAND (array_ref, 1)); dump_array_ref (TREE_OPERAND (array_ref, 1));
printf ("]"); printf ("]");
...@@ -1395,7 +1395,7 @@ search_dependence (node) ...@@ -1395,7 +1395,7 @@ search_dependence (node)
return dep_idx + 1; return dep_idx + 1;
} }
} }
return 0; return 0;
} }
...@@ -1418,7 +1418,7 @@ remember_dest_for_dependence (node) ...@@ -1418,7 +1418,7 @@ remember_dest_for_dependence (node)
#define MEM_DEPENDENCY(RTX) XCWINT (RTX, 2, MEM) #define MEM_DEPENDENCY(RTX) XCWINT (RTX, 2, MEM)
#endif #endif
/* Return 1 along with the dependence DIRECTION and DISTANCE if there is a /* Return 1 along with the dependence DIRECTION and DISTANCE if there is a
dependence from dest_rtx to src_rtx. */ dependence from dest_rtx to src_rtx. */
int int
......
...@@ -153,7 +153,7 @@ when optimising a loop, only certain registers are of interest. ...@@ -153,7 +153,7 @@ when optimising a loop, only certain registers are of interest.
Perhaps there should be a bitmap argument to df_analyse to specify Perhaps there should be a bitmap argument to df_analyse to specify
which registers should be analysed? */ which registers should be analysed? */
#define HANDLE_SUBREG #define HANDLE_SUBREG
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
...@@ -295,16 +295,16 @@ static void df_chain_dump PARAMS((struct df_link *, FILE *file)); ...@@ -295,16 +295,16 @@ static void df_chain_dump PARAMS((struct df_link *, FILE *file));
static void df_chain_dump_regno PARAMS((struct df_link *, FILE *file)); static void df_chain_dump_regno PARAMS((struct df_link *, FILE *file));
static void df_regno_debug PARAMS ((struct df *, unsigned int, FILE *)); static void df_regno_debug PARAMS ((struct df *, unsigned int, FILE *));
static void df_ref_debug PARAMS ((struct df *, struct ref *, FILE *)); static void df_ref_debug PARAMS ((struct df *, struct ref *, FILE *));
static void df_rd_transfer_function PARAMS ((int, int *, bitmap, bitmap, static void df_rd_transfer_function PARAMS ((int, int *, bitmap, bitmap,
bitmap, bitmap, void *)); bitmap, bitmap, void *));
static void df_ru_transfer_function PARAMS ((int, int *, bitmap, bitmap, static void df_ru_transfer_function PARAMS ((int, int *, bitmap, bitmap,
bitmap, bitmap, void *)); bitmap, bitmap, void *));
static void df_lr_transfer_function PARAMS ((int, int *, bitmap, bitmap, static void df_lr_transfer_function PARAMS ((int, int *, bitmap, bitmap,
bitmap, bitmap, void *)); bitmap, bitmap, void *));
static void hybrid_search_bitmap PARAMS ((basic_block, bitmap *, bitmap *, static void hybrid_search_bitmap PARAMS ((basic_block, bitmap *, bitmap *,
bitmap *, bitmap *, enum df_flow_dir, bitmap *, bitmap *, enum df_flow_dir,
enum df_confluence_op, enum df_confluence_op,
transfer_function_bitmap, transfer_function_bitmap,
sbitmap, sbitmap, void *)); sbitmap, sbitmap, void *));
static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *, static void hybrid_search_sbitmap PARAMS ((basic_block, sbitmap *, sbitmap *,
sbitmap *, sbitmap *, enum df_flow_dir, sbitmap *, sbitmap *, enum df_flow_dir,
...@@ -881,7 +881,7 @@ df_ref_record (df, reg, loc, insn, ref_type, ref_flags) ...@@ -881,7 +881,7 @@ df_ref_record (df, reg, loc, insn, ref_type, ref_flags)
XXX Is that true? We could also use the global word_mode variable. */ XXX Is that true? We could also use the global word_mode variable. */
if (GET_CODE (reg) == SUBREG if (GET_CODE (reg) == SUBREG
&& (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode) && (GET_MODE_SIZE (GET_MODE (reg)) < GET_MODE_SIZE (word_mode)
|| GET_MODE_SIZE (GET_MODE (reg)) || GET_MODE_SIZE (GET_MODE (reg))
>= GET_MODE_SIZE (GET_MODE (SUBREG_REG (reg))))) >= GET_MODE_SIZE (GET_MODE (SUBREG_REG (reg)))))
{ {
loc = &SUBREG_REG (reg); loc = &SUBREG_REG (reg);
...@@ -956,7 +956,7 @@ df_def_record_1 (df, x, bb, insn) ...@@ -956,7 +956,7 @@ df_def_record_1 (df, x, bb, insn)
/* May be, we should flag the use of strict_low_part somehow. Might be /* May be, we should flag the use of strict_low_part somehow. Might be
handy for the reg allocator. */ handy for the reg allocator. */
while (GET_CODE (dst) == STRICT_LOW_PART while (GET_CODE (dst) == STRICT_LOW_PART
|| GET_CODE (dst) == ZERO_EXTRACT || GET_CODE (dst) == ZERO_EXTRACT
|| GET_CODE (dst) == SIGN_EXTRACT || GET_CODE (dst) == SIGN_EXTRACT
|| read_modify_subreg_p (dst)) || read_modify_subreg_p (dst))
{ {
...@@ -971,9 +971,9 @@ df_def_record_1 (df, x, bb, insn) ...@@ -971,9 +971,9 @@ df_def_record_1 (df, x, bb, insn)
dst = *loc; dst = *loc;
flags |= DF_REF_READ_WRITE; flags |= DF_REF_READ_WRITE;
} }
if (GET_CODE (dst) == REG if (GET_CODE (dst) == REG
|| (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG)) || (GET_CODE (dst) == SUBREG && GET_CODE (SUBREG_REG (dst)) == REG))
df_ref_record (df, dst, loc, insn, DF_REF_REG_DEF, flags); df_ref_record (df, dst, loc, insn, DF_REF_REG_DEF, flags);
} }
...@@ -1090,7 +1090,7 @@ df_uses_record (df, loc, ref_type, bb, insn, flags) ...@@ -1090,7 +1090,7 @@ df_uses_record (df, loc, ref_type, bb, insn, flags)
case PC: case PC:
break; break;
case MEM: case MEM:
df_uses_record (df, &XEXP (dst, 0), df_uses_record (df, &XEXP (dst, 0),
DF_REF_REG_MEM_STORE, DF_REF_REG_MEM_STORE,
bb, insn, 0); bb, insn, 0);
break; break;
...@@ -1135,7 +1135,7 @@ df_uses_record (df, loc, ref_type, bb, insn, flags) ...@@ -1135,7 +1135,7 @@ df_uses_record (df, loc, ref_type, bb, insn, flags)
For now, just mark any regs we can find in ASM_OPERANDS as For now, just mark any regs we can find in ASM_OPERANDS as
used. */ used. */
/* For all ASM_OPERANDS, we must traverse the vector of input operands. /* For all ASM_OPERANDS, we must traverse the vector of input operands.
We can not just fall through here since then we would be confused We can not just fall through here since then we would be confused
by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate by the ASM_INPUT rtx inside ASM_OPERANDS, which do not indicate
traditional asms unlike their normal usage. */ traditional asms unlike their normal usage. */
...@@ -1253,7 +1253,7 @@ df_insn_refs_record (df, bb, insn) ...@@ -1253,7 +1253,7 @@ df_insn_refs_record (df, bb, insn)
{ {
x = df_reg_use_gen (i); x = df_reg_use_gen (i);
df_uses_record (df, &SET_DEST (x), df_uses_record (df, &SET_DEST (x),
DF_REF_REG_USE, bb, insn, 0); DF_REF_REG_USE, bb, insn, 0);
} }
} }
} }
...@@ -1673,7 +1673,7 @@ df_bb_rd_local_compute (df, bb) ...@@ -1673,7 +1673,7 @@ df_bb_rd_local_compute (df, bb)
bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def)); bitmap_set_bit (bb_info->rd_gen, DF_REF_ID (def));
} }
} }
bb_info->rd_valid = 1; bb_info->rd_valid = 1;
} }
...@@ -1703,7 +1703,7 @@ df_bb_ru_local_compute (df, bb) ...@@ -1703,7 +1703,7 @@ df_bb_ru_local_compute (df, bb)
/* This is much more tricky than computing reaching defs. With /* This is much more tricky than computing reaching defs. With
reaching defs, defs get killed by other defs. With upwards reaching defs, defs get killed by other defs. With upwards
exposed uses, these get killed by defs with the same regno. */ exposed uses, these get killed by defs with the same regno. */
struct bb_info *bb_info = DF_BB_INFO (df, bb); struct bb_info *bb_info = DF_BB_INFO (df, bb);
rtx insn; rtx insn;
...@@ -2015,7 +2015,7 @@ df_analyse_1 (df, blocks, flags, update) ...@@ -2015,7 +2015,7 @@ df_analyse_1 (df, blocks, flags, update)
df->inverse_dfs_map = xmalloc (sizeof(int) * n_basic_blocks); df->inverse_dfs_map = xmalloc (sizeof(int) * n_basic_blocks);
df->inverse_rc_map = xmalloc (sizeof(int) * n_basic_blocks); df->inverse_rc_map = xmalloc (sizeof(int) * n_basic_blocks);
df->inverse_rts_map = xmalloc (sizeof(int) * n_basic_blocks); df->inverse_rts_map = xmalloc (sizeof(int) * n_basic_blocks);
flow_depth_first_order_compute (df->dfs_order, df->rc_order); flow_depth_first_order_compute (df->dfs_order, df->rc_order);
flow_reverse_top_sort_order_compute (df->rts_order); flow_reverse_top_sort_order_compute (df->rts_order);
for (i = 0; i < n_basic_blocks; i ++) for (i = 0; i < n_basic_blocks; i ++)
...@@ -2041,7 +2041,7 @@ df_analyse_1 (df, blocks, flags, update) ...@@ -2041,7 +2041,7 @@ df_analyse_1 (df, blocks, flags, update)
gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_gen; gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_gen;
kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_kill; kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->rd_kill;
} }
iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks,
FORWARD, UNION, df_rd_transfer_function, FORWARD, UNION, df_rd_transfer_function,
df->inverse_rc_map, NULL); df->inverse_rc_map, NULL);
free (in); free (in);
...@@ -2078,7 +2078,7 @@ df_analyse_1 (df, blocks, flags, update) ...@@ -2078,7 +2078,7 @@ df_analyse_1 (df, blocks, flags, update)
gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_gen; gen[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_gen;
kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_kill; kill[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->ru_kill;
} }
iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks, iterative_dataflow_bitmap (in, out, gen, kill, df->all_blocks,
BACKWARD, UNION, df_ru_transfer_function, BACKWARD, UNION, df_ru_transfer_function,
df->inverse_rts_map, NULL); df->inverse_rts_map, NULL);
free (in); free (in);
...@@ -2104,7 +2104,7 @@ df_analyse_1 (df, blocks, flags, update) ...@@ -2104,7 +2104,7 @@ df_analyse_1 (df, blocks, flags, update)
if (aflags & DF_LR) if (aflags & DF_LR)
{ {
/* Compute the sets of defs and uses of live variables. */ /* Compute the sets of defs and uses of live variables. */
df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks); df_lr_local_compute (df, df->flags & DF_LR ? blocks : df->all_blocks);
{ {
int i; int i;
bitmap *in = xmalloc (sizeof (bitmap) * n_basic_blocks); bitmap *in = xmalloc (sizeof (bitmap) * n_basic_blocks);
...@@ -2118,7 +2118,7 @@ df_analyse_1 (df, blocks, flags, update) ...@@ -2118,7 +2118,7 @@ df_analyse_1 (df, blocks, flags, update)
use[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_use; use[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_use;
def[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_def; def[i] = DF_BB_INFO (df, BASIC_BLOCK (i))->lr_def;
} }
iterative_dataflow_bitmap (in, out, use, def, df->all_blocks, iterative_dataflow_bitmap (in, out, use, def, df->all_blocks,
BACKWARD, UNION, df_lr_transfer_function, BACKWARD, UNION, df_lr_transfer_function,
df->inverse_rts_map, NULL); df->inverse_rts_map, NULL);
free (in); free (in);
...@@ -3260,9 +3260,9 @@ df_chain_dump_regno (link, file) ...@@ -3260,9 +3260,9 @@ df_chain_dump_regno (link, file)
for (; link; link = link->next) for (; link; link = link->next)
{ {
fprintf (file, "%c%d(%d) ", fprintf (file, "%c%d(%d) ",
DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u', DF_REF_REG_DEF_P (link->ref) ? 'd' : 'u',
DF_REF_ID (link->ref), DF_REF_ID (link->ref),
DF_REF_REGNO (link->ref)); DF_REF_REGNO (link->ref));
} }
fprintf (file, "}"); fprintf (file, "}");
} }
...@@ -3492,7 +3492,7 @@ df_insn_debug_regno (df, insn, file) ...@@ -3492,7 +3492,7 @@ df_insn_debug_regno (df, insn, file)
bbi = -1; bbi = -1;
fprintf (file, "insn %d bb %d luid %d defs ", fprintf (file, "insn %d bb %d luid %d defs ",
uid, bbi, DF_INSN_LUID (df, insn)); uid, bbi, DF_INSN_LUID (df, insn));
df_chain_dump_regno (df->insns[uid].defs, file); df_chain_dump_regno (df->insns[uid].defs, file);
fprintf (file, " uses "); fprintf (file, " uses ");
df_chain_dump_regno (df->insns[uid].uses, file); df_chain_dump_regno (df->insns[uid].uses, file);
...@@ -3595,9 +3595,9 @@ debug_df_chain (link) ...@@ -3595,9 +3595,9 @@ debug_df_chain (link)
/* Hybrid search algorithm from "Implementation Techniques for /* Hybrid search algorithm from "Implementation Techniques for
Efficient Data-Flow Analysis of Large Programs". */ Efficient Data-Flow Analysis of Large Programs". */
static void static void
hybrid_search_bitmap (block, in, out, gen, kill, dir, hybrid_search_bitmap (block, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, conf_op, transfun, visited, pending,
data) data)
basic_block block; basic_block block;
bitmap *in, *out, *gen, *kill; bitmap *in, *out, *gen, *kill;
...@@ -3634,7 +3634,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, ...@@ -3634,7 +3634,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir,
} }
} }
} }
else else
{ {
/* Calculate <conf_op> of successor ins */ /* Calculate <conf_op> of successor ins */
bitmap_zero(out[i]); bitmap_zero(out[i]);
...@@ -3643,7 +3643,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, ...@@ -3643,7 +3643,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir,
if (e->dest == EXIT_BLOCK_PTR) if (e->dest == EXIT_BLOCK_PTR)
continue; continue;
switch (conf_op) switch (conf_op)
{ {
case UNION: case UNION:
bitmap_a_or_b (out[i], out[i], in[e->dest->index]); bitmap_a_or_b (out[i], out[i], in[e->dest->index]);
break; break;
...@@ -3652,7 +3652,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, ...@@ -3652,7 +3652,7 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir,
break; break;
} }
} }
} }
/* Common part */ /* Common part */
(*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data);
RESET_BIT (pending, i); RESET_BIT (pending, i);
...@@ -3685,8 +3685,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, ...@@ -3685,8 +3685,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir,
if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i)
continue; continue;
if (!TEST_BIT (visited, e->dest->index)) if (!TEST_BIT (visited, e->dest->index))
hybrid_search_bitmap (e->dest, in, out, gen, kill, dir, hybrid_search_bitmap (e->dest, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, conf_op, transfun, visited, pending,
data); data);
} }
} }
...@@ -3697,8 +3697,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, ...@@ -3697,8 +3697,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir,
if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) if (e->src == ENTRY_BLOCK_PTR || e->src->index == i)
continue; continue;
if (!TEST_BIT (visited, e->src->index)) if (!TEST_BIT (visited, e->src->index))
hybrid_search_bitmap (e->src, in, out, gen, kill, dir, hybrid_search_bitmap (e->src, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, conf_op, transfun, visited, pending,
data); data);
} }
} }
...@@ -3706,8 +3706,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir, ...@@ -3706,8 +3706,8 @@ hybrid_search_bitmap (block, in, out, gen, kill, dir,
/* Hybrid search for sbitmaps, rather than bitmaps. */ /* Hybrid search for sbitmaps, rather than bitmaps. */
static void static void
hybrid_search_sbitmap (block, in, out, gen, kill, dir, hybrid_search_sbitmap (block, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, conf_op, transfun, visited, pending,
data) data)
basic_block block; basic_block block;
...@@ -3745,7 +3745,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, ...@@ -3745,7 +3745,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir,
} }
} }
} }
else else
{ {
/* Calculate <conf_op> of successor ins */ /* Calculate <conf_op> of successor ins */
sbitmap_zero(out[i]); sbitmap_zero(out[i]);
...@@ -3754,7 +3754,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, ...@@ -3754,7 +3754,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir,
if (e->dest == EXIT_BLOCK_PTR) if (e->dest == EXIT_BLOCK_PTR)
continue; continue;
switch (conf_op) switch (conf_op)
{ {
case UNION: case UNION:
sbitmap_a_or_b (out[i], out[i], in[e->dest->index]); sbitmap_a_or_b (out[i], out[i], in[e->dest->index]);
break; break;
...@@ -3763,7 +3763,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, ...@@ -3763,7 +3763,7 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir,
break; break;
} }
} }
} }
/* Common part */ /* Common part */
(*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data); (*transfun)(i, &changed, in[i], out[i], gen[i], kill[i], data);
RESET_BIT (pending, i); RESET_BIT (pending, i);
...@@ -3796,8 +3796,8 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, ...@@ -3796,8 +3796,8 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir,
if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i) if (e->dest == EXIT_BLOCK_PTR || e->dest->index == i)
continue; continue;
if (!TEST_BIT (visited, e->dest->index)) if (!TEST_BIT (visited, e->dest->index))
hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir, hybrid_search_sbitmap (e->dest, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, conf_op, transfun, visited, pending,
data); data);
} }
} }
...@@ -3808,8 +3808,8 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, ...@@ -3808,8 +3808,8 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir,
if (e->src == ENTRY_BLOCK_PTR || e->src->index == i) if (e->src == ENTRY_BLOCK_PTR || e->src->index == i)
continue; continue;
if (!TEST_BIT (visited, e->src->index)) if (!TEST_BIT (visited, e->src->index))
hybrid_search_sbitmap (e->src, in, out, gen, kill, dir, hybrid_search_sbitmap (e->src, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, conf_op, transfun, visited, pending,
data); data);
} }
} }
...@@ -3827,20 +3827,20 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir, ...@@ -3827,20 +3827,20 @@ hybrid_search_sbitmap (block, in, out, gen, kill, dir,
transfun = Transfer function. transfun = Transfer function.
order = Order to iterate in. (Should map block numbers -> order) order = Order to iterate in. (Should map block numbers -> order)
data = Whatever you want. It's passed to the transfer function. data = Whatever you want. It's passed to the transfer function.
This function will perform iterative bitvector dataflow, producing This function will perform iterative bitvector dataflow, producing
the in and out sets. Even if you only want to perform it for a the in and out sets. Even if you only want to perform it for a
small number of blocks, the vectors for in and out must be large small number of blocks, the vectors for in and out must be large
enough for *all* blocks, because changing one block might affect enough for *all* blocks, because changing one block might affect
others. However, it'll only put what you say to analyze on the others. However, it'll only put what you say to analyze on the
initial worklist. initial worklist.
For forward problems, you probably want to pass in a mapping of For forward problems, you probably want to pass in a mapping of
block number to rc_order (like df->inverse_rc_map). block number to rc_order (like df->inverse_rc_map).
*/ */
void void
iterative_dataflow_sbitmap (in, out, gen, kill, blocks, iterative_dataflow_sbitmap (in, out, gen, kill, blocks,
dir, conf_op, transfun, order, data) dir, conf_op, transfun, order, data)
sbitmap *in, *out, *gen, *kill; sbitmap *in, *out, *gen, *kill;
bitmap blocks; bitmap blocks;
enum df_flow_dir dir; enum df_flow_dir dir;
...@@ -3860,7 +3860,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, ...@@ -3860,7 +3860,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks,
worklist = fibheap_new (); worklist = fibheap_new ();
EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i, EXECUTE_IF_SET_IN_BITMAP (blocks, 0, i,
{ {
fibheap_insert (worklist, order[i], (void *) (size_t) i); fibheap_insert (worklist, order[i], (void *) (size_t) i);
SET_BIT (pending, i); SET_BIT (pending, i);
if (dir == FORWARD) if (dir == FORWARD)
sbitmap_copy (out[i], gen[i]); sbitmap_copy (out[i], gen[i]);
...@@ -3874,7 +3874,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, ...@@ -3874,7 +3874,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks,
i = (size_t) fibheap_extract_min (worklist); i = (size_t) fibheap_extract_min (worklist);
bb = BASIC_BLOCK (i); bb = BASIC_BLOCK (i);
if (!TEST_BIT (visited, bb->index)) if (!TEST_BIT (visited, bb->index))
hybrid_search_sbitmap (bb, in, out, gen, kill, dir, hybrid_search_sbitmap (bb, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, data); conf_op, transfun, visited, pending, data);
} }
if (sbitmap_first_set_bit (pending) != -1) if (sbitmap_first_set_bit (pending) != -1)
...@@ -3888,7 +3888,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, ...@@ -3888,7 +3888,7 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks,
else else
{ {
break; break;
} }
} }
sbitmap_free (pending); sbitmap_free (pending);
sbitmap_free (visited); sbitmap_free (visited);
...@@ -3898,8 +3898,8 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks, ...@@ -3898,8 +3898,8 @@ iterative_dataflow_sbitmap (in, out, gen, kill, blocks,
/* Exactly the same as iterative_dataflow_sbitmap, except it works on /* Exactly the same as iterative_dataflow_sbitmap, except it works on
bitmaps instead */ bitmaps instead */
void void
iterative_dataflow_bitmap (in, out, gen, kill, blocks, iterative_dataflow_bitmap (in, out, gen, kill, blocks,
dir, conf_op, transfun, order, data) dir, conf_op, transfun, order, data)
bitmap *in, *out, *gen, *kill; bitmap *in, *out, *gen, *kill;
bitmap blocks; bitmap blocks;
enum df_flow_dir dir; enum df_flow_dir dir;
...@@ -3933,7 +3933,7 @@ iterative_dataflow_bitmap (in, out, gen, kill, blocks, ...@@ -3933,7 +3933,7 @@ iterative_dataflow_bitmap (in, out, gen, kill, blocks,
i = (size_t) fibheap_extract_min (worklist); i = (size_t) fibheap_extract_min (worklist);
bb = BASIC_BLOCK (i); bb = BASIC_BLOCK (i);
if (!TEST_BIT (visited, bb->index)) if (!TEST_BIT (visited, bb->index))
hybrid_search_bitmap (bb, in, out, gen, kill, dir, hybrid_search_bitmap (bb, in, out, gen, kill, dir,
conf_op, transfun, visited, pending, data); conf_op, transfun, visited, pending, data);
} }
if (sbitmap_first_set_bit (pending) != -1) if (sbitmap_first_set_bit (pending) != -1)
...@@ -3947,9 +3947,9 @@ iterative_dataflow_bitmap (in, out, gen, kill, blocks, ...@@ -3947,9 +3947,9 @@ iterative_dataflow_bitmap (in, out, gen, kill, blocks,
else else
{ {
break; break;
} }
} }
sbitmap_free (pending); sbitmap_free (pending);
sbitmap_free (visited); sbitmap_free (visited);
fibheap_delete (worklist); fibheap_delete (worklist);
} }
...@@ -40,11 +40,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -40,11 +40,13 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define obstack_chunk_alloc xmalloc #define obstack_chunk_alloc xmalloc
#define obstack_chunk_free free #define obstack_chunk_free free
#define output_formatted_integer(BUFFER, FORMAT, INTEGER) \ #define output_formatted_integer(BUFFER, FORMAT, INTEGER) \
do { \ do \
sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \ { \
output_add_string (BUFFER, (BUFFER)->digit_buffer); \ sprintf ((BUFFER)->digit_buffer, FORMAT, INTEGER); \
} while (0) output_add_string (BUFFER, (BUFFER)->digit_buffer); \
} \
while (0)
#define output_text_length(BUFFER) (BUFFER)->line_length #define output_text_length(BUFFER) (BUFFER)->line_length
#define is_starting_newline(BUFFER) (output_text_length (BUFFER) == 0) #define is_starting_newline(BUFFER) (output_text_length (BUFFER) == 0)
...@@ -59,7 +61,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -59,7 +61,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Prototypes. */ /* Prototypes. */
static void diagnostic_finish PARAMS ((output_buffer *)); static void diagnostic_finish PARAMS ((output_buffer *));
static void output_do_verbatim PARAMS ((output_buffer *, static void output_do_verbatim PARAMS ((output_buffer *,
const char *, va_list *)); const char *, va_list *));
static void output_buffer_to_stream PARAMS ((output_buffer *)); static void output_buffer_to_stream PARAMS ((output_buffer *));
static void output_format PARAMS ((output_buffer *)); static void output_format PARAMS ((output_buffer *));
static void output_indent PARAMS ((output_buffer *)); static void output_indent PARAMS ((output_buffer *));
...@@ -77,22 +79,22 @@ static void set_real_maximum_length PARAMS ((output_buffer *)); ...@@ -77,22 +79,22 @@ static void set_real_maximum_length PARAMS ((output_buffer *));
static void output_unsigned_decimal PARAMS ((output_buffer *, unsigned int)); static void output_unsigned_decimal PARAMS ((output_buffer *, unsigned int));
static void output_long_decimal PARAMS ((output_buffer *, long int)); static void output_long_decimal PARAMS ((output_buffer *, long int));
static void output_long_unsigned_decimal PARAMS ((output_buffer *, static void output_long_unsigned_decimal PARAMS ((output_buffer *,
long unsigned int)); long unsigned int));
static void output_octal PARAMS ((output_buffer *, unsigned int)); static void output_octal PARAMS ((output_buffer *, unsigned int));
static void output_long_octal PARAMS ((output_buffer *, unsigned long int)); static void output_long_octal PARAMS ((output_buffer *, unsigned long int));
static void output_hexadecimal PARAMS ((output_buffer *, unsigned int)); static void output_hexadecimal PARAMS ((output_buffer *, unsigned int));
static void output_long_hexadecimal PARAMS ((output_buffer *, static void output_long_hexadecimal PARAMS ((output_buffer *,
unsigned long int)); unsigned long int));
static void output_append_r PARAMS ((output_buffer *, const char *, int)); static void output_append_r PARAMS ((output_buffer *, const char *, int));
static void wrap_text PARAMS ((output_buffer *, const char *, const char *)); static void wrap_text PARAMS ((output_buffer *, const char *, const char *));
static void maybe_wrap_text PARAMS ((output_buffer *, const char *, static void maybe_wrap_text PARAMS ((output_buffer *, const char *,
const char *)); const char *));
static void clear_diagnostic_info PARAMS ((output_buffer *)); static void clear_diagnostic_info PARAMS ((output_buffer *));
static void default_diagnostic_starter PARAMS ((output_buffer *, static void default_diagnostic_starter PARAMS ((output_buffer *,
diagnostic_context *)); diagnostic_context *));
static void default_diagnostic_finalizer PARAMS ((output_buffer *, static void default_diagnostic_finalizer PARAMS ((output_buffer *,
diagnostic_context *)); diagnostic_context *));
static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN; static void error_recursion PARAMS ((void)) ATTRIBUTE_NORETURN;
...@@ -203,13 +205,13 @@ set_real_maximum_length (buffer) ...@@ -203,13 +205,13 @@ set_real_maximum_length (buffer)
else else
{ {
int prefix_length = int prefix_length =
output_prefix (buffer) ? strlen (output_prefix (buffer)) : 0; output_prefix (buffer) ? strlen (output_prefix (buffer)) : 0;
/* If the prefix is ridiculously too long, output at least /* If the prefix is ridiculously too long, output at least
32 characters. */ 32 characters. */
if (output_line_cutoff (buffer) - prefix_length < 32) if (output_line_cutoff (buffer) - prefix_length < 32)
line_wrap_cutoff (buffer) = output_line_cutoff (buffer) + 32; line_wrap_cutoff (buffer) = output_line_cutoff (buffer) + 32;
else else
line_wrap_cutoff (buffer) = output_line_cutoff (buffer); line_wrap_cutoff (buffer) = output_line_cutoff (buffer);
} }
} }
...@@ -245,7 +247,7 @@ output_last_position (buffer) ...@@ -245,7 +247,7 @@ output_last_position (buffer)
const output_buffer *buffer; const output_buffer *buffer;
{ {
const char *p = NULL; const char *p = NULL;
if (obstack_base (&buffer->obstack) != obstack_next_free (&buffer->obstack)) if (obstack_base (&buffer->obstack) != obstack_next_free (&buffer->obstack))
p = ((const char *) obstack_next_free (&buffer->obstack)) - 1; p = ((const char *) obstack_next_free (&buffer->obstack)) - 1;
return p; return p;
...@@ -302,7 +304,7 @@ init_output_buffer (buffer, prefix, maximum_length) ...@@ -302,7 +304,7 @@ init_output_buffer (buffer, prefix, maximum_length)
output_prefixing_rule (buffer) = diagnostic_prefixing_rule (global_dc); output_prefixing_rule (buffer) = diagnostic_prefixing_rule (global_dc);
output_set_prefix (buffer, prefix); output_set_prefix (buffer, prefix);
output_text_length (buffer) = 0; output_text_length (buffer) = 0;
clear_diagnostic_info (buffer); clear_diagnostic_info (buffer);
} }
/* Reinitialize BUFFER. */ /* Reinitialize BUFFER. */
...@@ -352,28 +354,28 @@ output_emit_prefix (buffer) ...@@ -352,28 +354,28 @@ output_emit_prefix (buffer)
if (output_prefix (buffer) != NULL) if (output_prefix (buffer) != NULL)
{ {
switch (output_prefixing_rule (buffer)) switch (output_prefixing_rule (buffer))
{ {
default: default:
case DIAGNOSTICS_SHOW_PREFIX_NEVER: case DIAGNOSTICS_SHOW_PREFIX_NEVER:
break; break;
case DIAGNOSTICS_SHOW_PREFIX_ONCE: case DIAGNOSTICS_SHOW_PREFIX_ONCE:
if (prefix_was_emitted_for (buffer)) if (prefix_was_emitted_for (buffer))
{ {
output_indent (buffer); output_indent (buffer);
break; break;
} }
output_indentation (buffer) += 3; output_indentation (buffer) += 3;
/* Fall through. */ /* Fall through. */
case DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE: case DIAGNOSTICS_SHOW_PREFIX_EVERY_LINE:
{ {
int prefix_length = strlen (output_prefix (buffer)); int prefix_length = strlen (output_prefix (buffer));
output_append_r (buffer, output_prefix (buffer), prefix_length); output_append_r (buffer, output_prefix (buffer), prefix_length);
prefix_was_emitted_for (buffer) = 1; prefix_was_emitted_for (buffer) = 1;
} }
break; break;
} }
} }
} }
...@@ -511,8 +513,8 @@ output_append (buffer, start, end) ...@@ -511,8 +513,8 @@ output_append (buffer, start, end)
{ {
output_emit_prefix (buffer); output_emit_prefix (buffer);
if (output_is_line_wrapping (buffer)) if (output_is_line_wrapping (buffer))
while (start != end && *start == ' ') while (start != end && *start == ' ')
++start; ++start;
} }
output_append_r (buffer, start, end - start); output_append_r (buffer, start, end - start);
} }
...@@ -537,30 +539,30 @@ wrap_text (buffer, start, end) ...@@ -537,30 +539,30 @@ wrap_text (buffer, start, end)
const char *end; const char *end;
{ {
int is_wrapping = output_is_line_wrapping (buffer); int is_wrapping = output_is_line_wrapping (buffer);
while (start != end) while (start != end)
{ {
/* Dump anything bordered by whitespaces. */ /* Dump anything bordered by whitespaces. */
{ {
const char *p = start; const char *p = start;
while (p != end && *p != ' ' && *p != '\n') while (p != end && *p != ' ' && *p != '\n')
++p; ++p;
if (is_wrapping && p - start >= output_space_left (buffer)) if (is_wrapping && p - start >= output_space_left (buffer))
output_add_newline (buffer); output_add_newline (buffer);
output_append (buffer, start, p); output_append (buffer, start, p);
start = p; start = p;
} }
if (start != end && *start == ' ') if (start != end && *start == ' ')
{ {
output_add_space (buffer); output_add_space (buffer);
++start; ++start;
} }
if (start != end && *start == '\n') if (start != end && *start == '\n')
{ {
output_add_newline (buffer); output_add_newline (buffer);
++start; ++start;
} }
} }
} }
...@@ -626,110 +628,110 @@ output_format (buffer) ...@@ -626,110 +628,110 @@ output_format (buffer)
/* Ignore text. */ /* Ignore text. */
{ {
const char *p = output_buffer_text_cursor (buffer); const char *p = output_buffer_text_cursor (buffer);
while (*p && *p != '%') while (*p && *p != '%')
++p; ++p;
wrap_text (buffer, output_buffer_text_cursor (buffer), p); wrap_text (buffer, output_buffer_text_cursor (buffer), p);
output_buffer_text_cursor (buffer) = p; output_buffer_text_cursor (buffer) = p;
} }
if (!*output_buffer_text_cursor (buffer)) if (!*output_buffer_text_cursor (buffer))
break; break;
/* We got a '%'. Let's see what happens. Record whether we're /* We got a '%'. Let's see what happens. Record whether we're
parsing a long integer format specifier. */ parsing a long integer format specifier. */
if (*++output_buffer_text_cursor (buffer) == 'l') if (*++output_buffer_text_cursor (buffer) == 'l')
{ {
long_integer = 1; long_integer = 1;
++output_buffer_text_cursor (buffer); ++output_buffer_text_cursor (buffer);
} }
/* Handle %c, %d, %i, %ld, %li, %lo, %lu, %lx, %o, %s, %u, /* Handle %c, %d, %i, %ld, %li, %lo, %lu, %lx, %o, %s, %u,
%x, %.*s; %%. And nothing else. Front-ends should install %x, %.*s; %%. And nothing else. Front-ends should install
printers to grok language specific format specifiers. */ printers to grok language specific format specifiers. */
switch (*output_buffer_text_cursor (buffer)) switch (*output_buffer_text_cursor (buffer))
{ {
case 'c': case 'c':
output_add_character output_add_character
(buffer, va_arg (output_buffer_format_args (buffer), int)); (buffer, va_arg (output_buffer_format_args (buffer), int));
break; break;
case 'd': case 'd':
case 'i': case 'i':
if (long_integer) if (long_integer)
output_long_decimal output_long_decimal
(buffer, va_arg (output_buffer_format_args (buffer), long int)); (buffer, va_arg (output_buffer_format_args (buffer), long int));
else else
output_decimal output_decimal
(buffer, va_arg (output_buffer_format_args (buffer), int)); (buffer, va_arg (output_buffer_format_args (buffer), int));
break; break;
case 'o': case 'o':
if (long_integer) if (long_integer)
output_long_octal (buffer, output_long_octal (buffer,
va_arg (output_buffer_format_args (buffer), va_arg (output_buffer_format_args (buffer),
unsigned long int)); unsigned long int));
else else
output_octal (buffer, output_octal (buffer,
va_arg (output_buffer_format_args (buffer), va_arg (output_buffer_format_args (buffer),
unsigned int)); unsigned int));
break; break;
case 's': case 's':
output_add_string (buffer, output_add_string (buffer,
va_arg (output_buffer_format_args (buffer), va_arg (output_buffer_format_args (buffer),
const char *)); const char *));
break; break;
case 'u': case 'u':
if (long_integer) if (long_integer)
output_long_unsigned_decimal output_long_unsigned_decimal
(buffer, va_arg (output_buffer_format_args (buffer), (buffer, va_arg (output_buffer_format_args (buffer),
long unsigned int)); long unsigned int));
else else
output_unsigned_decimal output_unsigned_decimal
(buffer, va_arg (output_buffer_format_args (buffer), (buffer, va_arg (output_buffer_format_args (buffer),
unsigned int)); unsigned int));
break; break;
case 'x': case 'x':
if (long_integer) if (long_integer)
output_long_hexadecimal output_long_hexadecimal
(buffer, va_arg (output_buffer_format_args (buffer), (buffer, va_arg (output_buffer_format_args (buffer),
unsigned long int)); unsigned long int));
else else
output_hexadecimal output_hexadecimal
(buffer, va_arg (output_buffer_format_args (buffer), (buffer, va_arg (output_buffer_format_args (buffer),
unsigned int)); unsigned int));
break; break;
case '%': case '%':
output_add_character (buffer, '%'); output_add_character (buffer, '%');
break; break;
case '.': case '.':
{ {
int n; int n;
const char *s; const char *s;
/* We handle no precision specifier but `%.*s'. */ /* We handle no precision specifier but `%.*s'. */
if (*++output_buffer_text_cursor (buffer) != '*') if (*++output_buffer_text_cursor (buffer) != '*')
abort (); abort ();
else if (*++output_buffer_text_cursor (buffer) != 's') else if (*++output_buffer_text_cursor (buffer) != 's')
abort (); abort ();
n = va_arg (output_buffer_format_args (buffer), int); n = va_arg (output_buffer_format_args (buffer), int);
s = va_arg (output_buffer_format_args (buffer), const char *); s = va_arg (output_buffer_format_args (buffer), const char *);
output_append (buffer, s, s + n); output_append (buffer, s, s + n);
} }
break; break;
default: default:
if (!buffer->format_decoder || !(*buffer->format_decoder) (buffer)) if (!buffer->format_decoder || !(*buffer->format_decoder) (buffer))
{ {
/* Hmmm. The front-end failed to install a format translator /* Hmmm. The front-end failed to install a format translator
but called us with an unrecognized format. Sorry. */ but called us with an unrecognized format. Sorry. */
abort (); abort ();
} }
} }
} }
} }
...@@ -804,7 +806,7 @@ output_do_printf (buffer, msg) ...@@ -804,7 +806,7 @@ output_do_printf (buffer, msg)
const char *msg; const char *msg;
{ {
char *message = vbuild_message_string (msg, char *message = vbuild_message_string (msg,
output_buffer_format_args (buffer)); output_buffer_format_args (buffer));
wrap_text (buffer, message, message + strlen (message)); wrap_text (buffer, message, message + strlen (message));
free (message); free (message);
...@@ -837,7 +839,7 @@ format_with_decl (buffer, decl) ...@@ -837,7 +839,7 @@ format_with_decl (buffer, decl)
tree decl; tree decl;
{ {
const char *p; const char *p;
/* Do magic to get around lack of varargs support for insertion /* Do magic to get around lack of varargs support for insertion
of arguments into existing list. We know that the decl is first; of arguments into existing list. We know that the decl is first;
we ass_u_me that it will be printed with "%s". */ we ass_u_me that it will be printed with "%s". */
...@@ -856,7 +858,7 @@ format_with_decl (buffer, decl) ...@@ -856,7 +858,7 @@ format_with_decl (buffer, decl)
/* Print the left-hand substring. */ /* Print the left-hand substring. */
maybe_wrap_text (buffer, output_buffer_text_cursor (buffer), p); maybe_wrap_text (buffer, output_buffer_text_cursor (buffer), p);
if (*p == '%') /* Print the name. */ if (*p == '%') /* Print the name. */
{ {
const char *const n = (DECL_NAME (decl) const char *const n = (DECL_NAME (decl)
...@@ -907,7 +909,7 @@ diagnostic_for_decl (decl, msgid, args_ptr, warn) ...@@ -907,7 +909,7 @@ diagnostic_for_decl (decl, msgid, args_ptr, warn)
format_with_decl (diagnostic_buffer, decl); format_with_decl (diagnostic_buffer, decl);
diagnostic_finish ((output_buffer *) global_dc); diagnostic_finish ((output_buffer *) global_dc);
output_destroy_prefix (diagnostic_buffer); output_destroy_prefix (diagnostic_buffer);
output_buffer_state (diagnostic_buffer) = os; output_buffer_state (diagnostic_buffer) = os;
} }
diagnostic_lock--; diagnostic_lock--;
...@@ -1068,7 +1070,7 @@ announce_function (decl) ...@@ -1068,7 +1070,7 @@ announce_function (decl)
if (rtl_dump_and_exit) if (rtl_dump_and_exit)
verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl))); verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
else else
verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2)); verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
fflush (stderr); fflush (stderr);
output_needs_newline (diagnostic_buffer) = 1; output_needs_newline (diagnostic_buffer) = 1;
record_last_error_function (); record_last_error_function ();
...@@ -1090,19 +1092,19 @@ lhd_print_error_function (context, file) ...@@ -1090,19 +1092,19 @@ lhd_print_error_function (context, file)
os = diagnostic_state (context); os = diagnostic_state (context);
output_set_prefix ((output_buffer *) context, prefix); output_set_prefix ((output_buffer *) context, prefix);
if (current_function_decl == NULL) if (current_function_decl == NULL)
output_add_string ((output_buffer *) context, _("At top level:")); output_add_string ((output_buffer *) context, _("At top level:"));
else else
{ {
if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE) if (TREE_CODE (TREE_TYPE (current_function_decl)) == METHOD_TYPE)
output_printf output_printf
((output_buffer *) context, "In member function `%s':", ((output_buffer *) context, "In member function `%s':",
(*lang_hooks.decl_printable_name) (current_function_decl, 2)); (*lang_hooks.decl_printable_name) (current_function_decl, 2));
else else
output_printf output_printf
((output_buffer *) context, "In function `%s':", ((output_buffer *) context, "In function `%s':",
(*lang_hooks.decl_printable_name) (current_function_decl, 2)); (*lang_hooks.decl_printable_name) (current_function_decl, 2));
} }
output_add_newline ((output_buffer *) context); output_add_newline ((output_buffer *) context);
...@@ -1225,7 +1227,7 @@ internal_error VPARAMS ((const char *msgid, ...)) ...@@ -1225,7 +1227,7 @@ internal_error VPARAMS ((const char *msgid, ...))
if (internal_error_function != 0) if (internal_error_function != 0)
(*internal_error_function) (_(msgid), &ap); (*internal_error_function) (_(msgid), &ap);
set_diagnostic_context set_diagnostic_context
(&dc, msgid, &ap, input_filename, lineno, /* warn = */0); (&dc, msgid, &ap, input_filename, lineno, /* warn = */0);
report_diagnostic (&dc); report_diagnostic (&dc);
...@@ -1487,10 +1489,10 @@ report_problematic_module (buffer) ...@@ -1487,10 +1489,10 @@ report_problematic_module (buffer)
for (p = input_file_stack->next; p; p = p->next) for (p = input_file_stack->next; p; p = p->next)
if (p == input_file_stack->next) if (p == input_file_stack->next)
output_verbatim output_verbatim
(buffer, "In file included from %s:%d", p->name, p->line); (buffer, "In file included from %s:%d", p->name, p->line);
else else
output_verbatim output_verbatim
(buffer, ",\n from %s:%d", p->name, p->line); (buffer, ",\n from %s:%d", p->name, p->line);
output_verbatim (buffer, ":\n"); output_verbatim (buffer, ":\n");
record_last_error_module (); record_last_error_module ();
} }
...@@ -1503,9 +1505,9 @@ default_diagnostic_starter (buffer, dc) ...@@ -1503,9 +1505,9 @@ default_diagnostic_starter (buffer, dc)
{ {
report_error_function (diagnostic_file_location (dc)); report_error_function (diagnostic_file_location (dc));
output_set_prefix (buffer, output_set_prefix (buffer,
context_as_prefix (diagnostic_file_location (dc), context_as_prefix (diagnostic_file_location (dc),
diagnostic_line_location (dc), diagnostic_line_location (dc),
diagnostic_is_warning (dc))); diagnostic_is_warning (dc)));
} }
static void static void
...@@ -1516,7 +1518,7 @@ default_diagnostic_finalizer (buffer, dc) ...@@ -1516,7 +1518,7 @@ default_diagnostic_finalizer (buffer, dc)
output_destroy_prefix (buffer); output_destroy_prefix (buffer);
} }
void void
warn_deprecated_use (node) warn_deprecated_use (node)
tree node; tree node;
{ {
...@@ -1537,7 +1539,7 @@ warn_deprecated_use (node) ...@@ -1537,7 +1539,7 @@ warn_deprecated_use (node)
else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
&& DECL_NAME (TYPE_NAME (node))) && DECL_NAME (TYPE_NAME (node)))
what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node))); what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
if (what) if (what)
{ {
if (decl) if (decl)
......
...@@ -263,7 +263,7 @@ doloop_valid_p (loop, jump_insn) ...@@ -263,7 +263,7 @@ doloop_valid_p (loop, jump_insn)
|| ! onlyjump_p (jump_insn)) || ! onlyjump_p (jump_insn))
{ {
if (loop_dump_stream) if (loop_dump_stream)
fprintf (loop_dump_stream, fprintf (loop_dump_stream,
"Doloop: Invalid jump at loop end.\n"); "Doloop: Invalid jump at loop end.\n");
return 0; return 0;
} }
...@@ -801,7 +801,7 @@ doloop_optimize (loop) ...@@ -801,7 +801,7 @@ doloop_optimize (loop)
&increment, &mode)) &increment, &mode))
{ {
if (loop_dump_stream) if (loop_dump_stream)
fprintf (loop_dump_stream, fprintf (loop_dump_stream,
"Doloop: Cannot precondition loop.\n"); "Doloop: Cannot precondition loop.\n");
return 0; return 0;
} }
......
/* Calculate (post)dominators in slightly super-linear time. /* Calculate (post)dominators in slightly super-linear time.
Copyright (C) 2000 Free Software Foundation, Inc. Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Michael Matz (matz@ifh.de). Contributed by Michael Matz (matz@ifh.de).
This file is part of GCC. This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it GCC is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
...@@ -119,17 +119,19 @@ static void idoms_to_doms PARAMS ((struct dom_info *, ...@@ -119,17 +119,19 @@ static void idoms_to_doms PARAMS ((struct dom_info *,
/* Helper macro for allocating and initializing an array, /* Helper macro for allocating and initializing an array,
for aesthetic reasons. */ for aesthetic reasons. */
#define init_ar(var, type, num, content) \ #define init_ar(var, type, num, content) \
do { \ do \
unsigned int i = 1; /* Catch content == i. */ \ { \
if (! (content)) \ unsigned int i = 1; /* Catch content == i. */ \
(var) = (type *) xcalloc ((num), sizeof (type)); \ if (! (content)) \
else \ (var) = (type *) xcalloc ((num), sizeof (type)); \
{ \ else \
(var) = (type *) xmalloc ((num) * sizeof (type)); \ { \
for (i = 0; i < num; i++) \ (var) = (type *) xmalloc ((num) * sizeof (type)); \
(var)[i] = (content); \ for (i = 0; i < num; i++) \
} \ (var)[i] = (content); \
} while (0) } \
} \
while (0)
/* Allocate all needed memory in a pessimistic fashion (so we round up). /* Allocate all needed memory in a pessimistic fashion (so we round up).
This initialises the contents of DI, which already must be allocated. */ This initialises the contents of DI, which already must be allocated. */
......
...@@ -71,13 +71,13 @@ char *path; ...@@ -71,13 +71,13 @@ char *path;
char *last_slash = strrchr (path, '/'); char *last_slash = strrchr (path, '/');
char *cp, *dp; char *cp, *dp;
int dots_seen, chars_seen; int dots_seen, chars_seen;
if (last_slash+1 == null) if (last_slash+1 == null)
{ {
* --null = '\0'; * --null = '\0';
last_slash = strrchr (path, '/'); last_slash = strrchr (path, '/');
} }
if (!last_slash) if (!last_slash)
{ {
last_slash = first-1; last_slash = first-1;
...@@ -239,7 +239,7 @@ display_problems () ...@@ -239,7 +239,7 @@ display_problems ()
{ {
ENT **elist, *ent; ENT **elist, *ent;
int ecount, i, first, first_err; int ecount, i, first, first_err;
for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++); for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++);
elist = (ENT **)malloc (sizeof (ENT *) * ecount); elist = (ENT **)malloc (sizeof (ENT *) * ecount);
for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++) for (ecount=0, ent=eroot; ent; ent=ent->next, ecount++)
......
...@@ -60,7 +60,7 @@ dw2_assemble_integer (size, x) ...@@ -60,7 +60,7 @@ dw2_assemble_integer (size, x)
else else
assemble_integer (x, size, BITS_PER_UNIT, 1); assemble_integer (x, size, BITS_PER_UNIT, 1);
} }
/* Output an immediate constant in a given size. */ /* Output an immediate constant in a given size. */
...@@ -316,7 +316,7 @@ size_of_sleb128 (value) ...@@ -316,7 +316,7 @@ size_of_sleb128 (value)
} }
/* Given an encoding, return the number of bytes the format occupies. /* Given an encoding, return the number of bytes the format occupies.
This is only defined for fixed-size encodings, and so does not This is only defined for fixed-size encodings, and so does not
include leb128. */ include leb128. */
int int
...@@ -845,7 +845,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding, ...@@ -845,7 +845,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding,
{ {
restart: restart:
/* Allow the target first crack at emitting this. Some of the /* Allow the target first crack at emitting this. Some of the
special relocations require special directives instead of special relocations require special directives instead of
just ".4byte" or whatever. */ just ".4byte" or whatever. */
#ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX #ifdef ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX
ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX (asm_out_file, encoding, size, ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX (asm_out_file, encoding, size,
...@@ -883,7 +883,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding, ...@@ -883,7 +883,7 @@ dw2_asm_output_encoded_addr_rtx VPARAMS ((int encoding,
break; break;
default: default:
/* Other encodings should have been handled by /* Other encodings should have been handled by
ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX. */ ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX. */
abort (); abort ();
} }
......
...@@ -344,15 +344,17 @@ static void def_cfa_1 PARAMS ((const char *, ...@@ -344,15 +344,17 @@ static void def_cfa_1 PARAMS ((const char *,
#ifdef SET_ASM_OP #ifdef SET_ASM_OP
#ifndef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL #ifndef ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL
#define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \ #define ASM_OUTPUT_DEFINE_LABEL_DIFFERENCE_SYMBOL(FILE, SY, HI, LO) \
do { \ do \
fprintf (FILE, "%s", SET_ASM_OP); \ { \
assemble_name (FILE, SY); \ fprintf (FILE, "%s", SET_ASM_OP); \
fputc (',', FILE); \ assemble_name (FILE, SY); \
assemble_name (FILE, HI); \ fputc (',', FILE); \
fputc ('-', FILE); \ assemble_name (FILE, HI); \
assemble_name (FILE, LO); \ fputc ('-', FILE); \
} while (0) assemble_name (FILE, LO); \
} \
while (0)
#endif #endif
#endif #endif
......
...@@ -523,7 +523,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -523,7 +523,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
are still being discussed. Also, we in the PLSIG are still discussing are still being discussed. Also, we in the PLSIG are still discussing
whether or not we need to do anything special for C++ templates. (At this whether or not we need to do anything special for C++ templates. (At this
time it is not yet clear whether we even need to do anything special for time it is not yet clear whether we even need to do anything special for
these.) these.)
With regard to FORTRAN, the UI/PLSIG has defined what is believed to be a With regard to FORTRAN, the UI/PLSIG has defined what is believed to be a
complete and sufficient set of codes and rules for adequately representing complete and sufficient set of codes and rules for adequately representing
...@@ -560,7 +560,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA ...@@ -560,7 +560,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
Other possible `compacting' transformations designed to save disk Other possible `compacting' transformations designed to save disk
space and to reduce linker & debugger I/O activity. space and to reduce linker & debugger I/O activity.
*/ */
#include "config.h" #include "config.h"
...@@ -1287,7 +1287,7 @@ static void retry_incomplete_types PARAMS ((void)); ...@@ -1287,7 +1287,7 @@ static void retry_incomplete_types PARAMS ((void));
ASM_OUTPUT_ASCII ((FILE), P, strlen (P)+1) ASM_OUTPUT_ASCII ((FILE), P, strlen (P)+1)
#else #else
#define ASM_OUTPUT_DWARF_STRING_NEWLINE(FILE,P) \ #define ASM_OUTPUT_DWARF_STRING_NEWLINE(FILE,P) \
ASM_OUTPUT_DWARF_STRING (FILE,P), ASM_OUTPUT_DWARF_STRING (FILE,"\n") ASM_OUTPUT_DWARF_STRING (FILE,P), ASM_OUTPUT_DWARF_STRING (FILE,"\n")
#endif #endif
...@@ -1323,7 +1323,7 @@ is_pseudo_reg (rtl) ...@@ -1323,7 +1323,7 @@ is_pseudo_reg (rtl)
rtx rtl; rtx rtl;
{ {
return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER)) return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER))
|| ((GET_CODE (rtl) == SUBREG) || ((GET_CODE (rtl) == SUBREG)
&& (REGNO (SUBREG_REG (rtl)) >= FIRST_PSEUDO_REGISTER))); && (REGNO (SUBREG_REG (rtl)) >= FIRST_PSEUDO_REGISTER)));
} }
...@@ -1341,7 +1341,7 @@ type_main_variant (type) ...@@ -1341,7 +1341,7 @@ type_main_variant (type)
if (TREE_CODE (type) == ARRAY_TYPE) if (TREE_CODE (type) == ARRAY_TYPE)
{ {
while (type != TYPE_MAIN_VARIANT (type)) while (type != TYPE_MAIN_VARIANT (type))
type = TYPE_MAIN_VARIANT (type); type = TYPE_MAIN_VARIANT (type);
} }
return type; return type;
...@@ -1607,7 +1607,7 @@ static tree ...@@ -1607,7 +1607,7 @@ static tree
decl_ultimate_origin (decl) decl_ultimate_origin (decl)
tree decl; tree decl;
{ {
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
if (DECL_FROM_INLINE (DECL_ORIGIN (decl))) if (DECL_FROM_INLINE (DECL_ORIGIN (decl)))
/* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the /* Since the DECL_ABSTRACT_ORIGIN for a DECL is supposed to be the
most distant ancestor, this should never happen. */ most distant ancestor, this should never happen. */
...@@ -1705,7 +1705,7 @@ output_signed_leb128 (value) ...@@ -1705,7 +1705,7 @@ output_signed_leb128 (value)
if (negative) if (negative)
value |= 0xfe000000; /* manually sign extend */ value |= 0xfe000000; /* manually sign extend */
if (((value == 0) && ((byte & 0x40) == 0)) if (((value == 0) && ((byte & 0x40) == 0))
|| ((value == -1) && ((byte & 0x40) == 1))) || ((value == -1) && ((byte & 0x40) == 1)))
more = 0; more = 0;
else else
{ {
...@@ -2839,8 +2839,8 @@ location_or_const_value_attribute (decl) ...@@ -2839,8 +2839,8 @@ location_or_const_value_attribute (decl)
if (rtl == NULL_RTX || is_pseudo_reg (rtl)) if (rtl == NULL_RTX || is_pseudo_reg (rtl))
{ {
/* This decl represents a formal parameter which was optimized out. */ /* This decl represents a formal parameter which was optimized out. */
tree declared_type = type_main_variant (TREE_TYPE (decl)); tree declared_type = type_main_variant (TREE_TYPE (decl));
tree passed_type = type_main_variant (DECL_ARG_TYPE (decl)); tree passed_type = type_main_variant (DECL_ARG_TYPE (decl));
/* Note that DECL_INCOMING_RTL may be NULL in here, but we handle /* Note that DECL_INCOMING_RTL may be NULL in here, but we handle
*all* cases where (rtl == NULL_RTX) just below. */ *all* cases where (rtl == NULL_RTX) just below. */
...@@ -3464,10 +3464,10 @@ pure_or_virtual_attribute (func_decl) ...@@ -3464,10 +3464,10 @@ pure_or_virtual_attribute (func_decl)
{ {
#if 0 /* DECL_ABSTRACT_VIRTUAL_P is C++-specific. */ #if 0 /* DECL_ABSTRACT_VIRTUAL_P is C++-specific. */
if (DECL_ABSTRACT_VIRTUAL_P (func_decl)) if (DECL_ABSTRACT_VIRTUAL_P (func_decl))
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_pure_virtual); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_pure_virtual);
else else
#endif #endif
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_virtual);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
} }
} }
...@@ -3506,7 +3506,7 @@ name_and_src_coords_attributes (decl) ...@@ -3506,7 +3506,7 @@ name_and_src_coords_attributes (decl)
file_index = lookup_filename (DECL_SOURCE_FILE (decl)); file_index = lookup_filename (DECL_SOURCE_FILE (decl));
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SECTION);
src_coords_attribute (file_index, DECL_SOURCE_LINE (decl)); src_coords_attribute (file_index, DECL_SOURCE_LINE (decl));
} }
#endif /* defined(DWARF_DECL_COORDINATES) */ #endif /* defined(DWARF_DECL_COORDINATES) */
} }
...@@ -3587,7 +3587,7 @@ type_tag (type) ...@@ -3587,7 +3587,7 @@ type_tag (type)
if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE) if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
t = TYPE_NAME (type); t = TYPE_NAME (type);
/* The g++ front end makes the TYPE_NAME of *each* tagged type point to /* The g++ front end makes the TYPE_NAME of *each* tagged type point to
a TYPE_DECL node, regardless of whether or not a `typedef' was a TYPE_DECL node, regardless of whether or not a `typedef' was
involved. */ involved. */
else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL else if (TREE_CODE (TYPE_NAME (type)) == TYPE_DECL
...@@ -4168,7 +4168,7 @@ output_compile_unit_die (arg) ...@@ -4168,7 +4168,7 @@ output_compile_unit_die (arg)
sf_names_attribute (SFNAMES_BEGIN_LABEL); sf_names_attribute (SFNAMES_BEGIN_LABEL);
src_info_attribute (SRCINFO_BEGIN_LABEL); src_info_attribute (SRCINFO_BEGIN_LABEL);
if (debug_info_level >= DINFO_LEVEL_VERBOSE) if (debug_info_level >= DINFO_LEVEL_VERBOSE)
mac_info_attribute (MACINFO_BEGIN_LABEL); mac_info_attribute (MACINFO_BEGIN_LABEL);
} }
} }
...@@ -4211,7 +4211,7 @@ output_inheritance_die (arg) ...@@ -4211,7 +4211,7 @@ output_inheritance_die (arg)
ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_protected); ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_protected);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
} }
} }
static void static void
output_structure_type_die (arg) output_structure_type_die (arg)
...@@ -4795,7 +4795,7 @@ output_type (type, containing_scope) ...@@ -4795,7 +4795,7 @@ output_type (type, containing_scope)
end_sibling_chain (); end_sibling_chain ();
break; break;
case ARRAY_TYPE: case ARRAY_TYPE:
if (TYPE_STRING_FLAG (type) && TREE_CODE(TREE_TYPE(type)) == CHAR_TYPE) if (TYPE_STRING_FLAG (type) && TREE_CODE(TREE_TYPE(type)) == CHAR_TYPE)
{ {
output_type (TREE_TYPE (type), containing_scope); output_type (TREE_TYPE (type), containing_scope);
...@@ -5150,8 +5150,8 @@ output_decls_for_scope (stmt, depth) ...@@ -5150,8 +5150,8 @@ output_decls_for_scope (stmt, depth)
tree subblocks; tree subblocks;
for (subblocks = BLOCK_SUBBLOCKS (stmt); for (subblocks = BLOCK_SUBBLOCKS (stmt);
subblocks; subblocks;
subblocks = BLOCK_CHAIN (subblocks)) subblocks = BLOCK_CHAIN (subblocks))
output_block (subblocks, depth + 1); output_block (subblocks, depth + 1);
} }
} }
...@@ -5197,10 +5197,10 @@ output_decl (decl, containing_scope) ...@@ -5197,10 +5197,10 @@ output_decl (decl, containing_scope)
if ((TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE if ((TREE_CODE (TREE_TYPE (decl)) == RECORD_TYPE
|| TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE) || TREE_CODE (TREE_TYPE (decl)) == UNION_TYPE)
&& ((DECL_NAME (decl) == 0 && TYPE_NAME (TREE_TYPE (decl)) == 0) && ((DECL_NAME (decl) == 0 && TYPE_NAME (TREE_TYPE (decl)) == 0)
|| (TYPE_FIELDS (TREE_TYPE (decl)) || (TYPE_FIELDS (TREE_TYPE (decl))
&& (TREE_CODE (TYPE_FIELDS (TREE_TYPE (decl))) == ERROR_MARK)))) && (TREE_CODE (TYPE_FIELDS (TREE_TYPE (decl))) == ERROR_MARK))))
return; return;
/* If this ..._DECL node is marked to be ignored, then ignore it. */ /* If this ..._DECL node is marked to be ignored, then ignore it. */
if (DECL_IGNORED_P (decl)) if (DECL_IGNORED_P (decl))
...@@ -5325,7 +5325,7 @@ output_decl (decl, containing_scope) ...@@ -5325,7 +5325,7 @@ output_decl (decl, containing_scope)
for (parm = arg_decls; parm; parm = TREE_CHAIN (parm)) for (parm = arg_decls; parm; parm = TREE_CHAIN (parm))
if (TREE_CODE (parm) == PARM_DECL) if (TREE_CODE (parm) == PARM_DECL)
{ {
if (DECL_NAME(parm) && if (DECL_NAME(parm) &&
!strcmp(IDENTIFIER_POINTER(DECL_NAME(parm)), !strcmp(IDENTIFIER_POINTER(DECL_NAME(parm)),
"__builtin_va_alist") ) "__builtin_va_alist") )
...@@ -5362,13 +5362,13 @@ output_decl (decl, containing_scope) ...@@ -5362,13 +5362,13 @@ output_decl (decl, containing_scope)
/* this is the prototyped case, check for ... */ /* this is the prototyped case, check for ... */
if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node) if (TREE_VALUE (tree_last (fn_arg_types)) != void_type_node)
output_die (output_unspecified_parameters_die, decl); output_die (output_unspecified_parameters_die, decl);
} }
else else
{ {
/* this is unprototyped, check for undefined (just declaration) */ /* this is unprototyped, check for undefined (just declaration) */
if (!DECL_INITIAL (decl)) if (!DECL_INITIAL (decl))
output_die (output_unspecified_parameters_die, decl); output_die (output_unspecified_parameters_die, decl);
} }
} }
/* Output Dwarf info for all of the stuff within the body of the /* Output Dwarf info for all of the stuff within the body of the
...@@ -5427,7 +5427,7 @@ output_decl (decl, containing_scope) ...@@ -5427,7 +5427,7 @@ output_decl (decl, containing_scope)
if (debug_info_level <= DINFO_LEVEL_TERSE) if (debug_info_level <= DINFO_LEVEL_TERSE)
if (! TYPE_DECL_IS_STUB (decl) if (! TYPE_DECL_IS_STUB (decl)
|| (! TYPE_USED_FOR_FUNCTION (TREE_TYPE (decl)) && ! in_class)) || (! TYPE_USED_FOR_FUNCTION (TREE_TYPE (decl)) && ! in_class))
return; return;
/* In the special case of a TYPE_DECL node representing /* In the special case of a TYPE_DECL node representing
the declaration of some type tag, if the given TYPE_DECL is the declaration of some type tag, if the given TYPE_DECL is
...@@ -5468,7 +5468,7 @@ output_decl (decl, containing_scope) ...@@ -5468,7 +5468,7 @@ output_decl (decl, containing_scope)
any variable declarations or definitions. */ any variable declarations or definitions. */
if (debug_info_level <= DINFO_LEVEL_TERSE) if (debug_info_level <= DINFO_LEVEL_TERSE)
break; break;
/* Output any DIEs that are needed to specify the type of this data /* Output any DIEs that are needed to specify the type of this data
object. */ object. */
...@@ -5502,7 +5502,7 @@ output_decl (decl, containing_scope) ...@@ -5502,7 +5502,7 @@ output_decl (decl, containing_scope)
function. */ function. */
{ {
void (*func) PARAMS ((void *)); void (*func) PARAMS ((void *));
register tree origin = decl_ultimate_origin (decl); register tree origin = decl_ultimate_origin (decl);
if (origin != NULL && TREE_CODE (origin) == PARM_DECL) if (origin != NULL && TREE_CODE (origin) == PARM_DECL)
...@@ -5523,7 +5523,7 @@ output_decl (decl, containing_scope) ...@@ -5523,7 +5523,7 @@ output_decl (decl, containing_scope)
if (DECL_NAME (decl) != 0) if (DECL_NAME (decl) != 0)
{ {
output_type (member_declared_type (decl), containing_scope); output_type (member_declared_type (decl), containing_scope);
output_die (output_member_die, decl); output_die (output_member_die, decl);
} }
break; break;
...@@ -5623,7 +5623,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ...@@ -5623,7 +5623,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
these same functions should NOT be ignored however. */ these same functions should NOT be ignored however. */
if (DECL_EXTERNAL (decl) && DECL_FUNCTION_CODE (decl)) if (DECL_EXTERNAL (decl) && DECL_FUNCTION_CODE (decl))
return; return;
/* What we would really like to do here is to filter out all mere /* What we would really like to do here is to filter out all mere
file-scope declarations of file-scope functions which are never file-scope declarations of file-scope functions which are never
...@@ -5723,7 +5723,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ...@@ -5723,7 +5723,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, ASM_OUTPUT_DWARF_ADDR (asm_out_file,
IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl))); IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)));
ASM_OUTPUT_DWARF_DATA4 (asm_out_file, ASM_OUTPUT_DWARF_DATA4 (asm_out_file,
(unsigned) int_size_in_bytes (TREE_TYPE (decl))); (unsigned) int_size_in_bytes (TREE_TYPE (decl)));
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
...@@ -5733,7 +5733,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ...@@ -5733,7 +5733,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
any variable declarations or definitions. */ any variable declarations or definitions. */
if (debug_info_level <= DINFO_LEVEL_TERSE) if (debug_info_level <= DINFO_LEVEL_TERSE)
return; return;
break; break;
...@@ -5771,7 +5771,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ...@@ -5771,7 +5771,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
if (debug_info_level <= DINFO_LEVEL_TERSE) if (debug_info_level <= DINFO_LEVEL_TERSE)
if (! TYPE_DECL_IS_STUB (decl) if (! TYPE_DECL_IS_STUB (decl)
|| ! TYPE_USED_FOR_FUNCTION (TREE_TYPE (decl))) || ! TYPE_USED_FOR_FUNCTION (TREE_TYPE (decl)))
return; return;
break; break;
...@@ -5801,7 +5801,7 @@ dwarfout_file_scope_decl (decl, set_finalizing) ...@@ -5801,7 +5801,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
if this is not a nested function or class. If this is a nested type, if this is not a nested function or class. If this is a nested type,
then the remaining pending_types will be emitted when the containing type then the remaining pending_types will be emitted when the containing type
is handled. */ is handled. */
if (! DECL_CONTEXT (decl)) if (! DECL_CONTEXT (decl))
{ {
if (pending_types != 0) if (pending_types != 0)
...@@ -5930,9 +5930,9 @@ generate_new_sfname_entry () ...@@ -5930,9 +5930,9 @@ generate_new_sfname_entry ()
sprintf (label, SFNAMES_ENTRY_LABEL_FMT, filename_table[0].number); sprintf (label, SFNAMES_ENTRY_LABEL_FMT, filename_table[0].number);
ASM_OUTPUT_LABEL (asm_out_file, label); ASM_OUTPUT_LABEL (asm_out_file, label);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file,
filename_table[0].name filename_table[0].name
? filename_table[0].name ? filename_table[0].name
: ""); : "");
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
...@@ -5984,7 +5984,7 @@ lookup_filename (file_name) ...@@ -5984,7 +5984,7 @@ lookup_filename (file_name)
same filename will find it as quickly as possible. */ same filename will find it as quickly as possible. */
shuffle_filename_entry (search_p); shuffle_filename_entry (search_p);
return filename_table[0].number; return filename_table[0].number;
} }
/* We come here whenever we have a new filename which is not registered /* We come here whenever we have a new filename which is not registered
...@@ -6062,18 +6062,18 @@ dwarfout_source_line (line, filename) ...@@ -6062,18 +6062,18 @@ dwarfout_source_line (line, filename)
ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION);
if (this_file_entry_num != prev_file_entry_num) if (this_file_entry_num != prev_file_entry_num)
{ {
char line_entry_label[MAX_ARTIFICIAL_LABEL_BYTES]; char line_entry_label[MAX_ARTIFICIAL_LABEL_BYTES];
sprintf (line_entry_label, LINE_ENTRY_LABEL_FMT, last_line_entry_num); sprintf (line_entry_label, LINE_ENTRY_LABEL_FMT, last_line_entry_num);
ASM_OUTPUT_LABEL (asm_out_file, line_entry_label); ASM_OUTPUT_LABEL (asm_out_file, line_entry_label);
} }
{ {
const char *tail = strrchr (filename, '/'); const char *tail = strrchr (filename, '/');
if (tail != NULL) if (tail != NULL)
filename = tail; filename = tail;
} }
dw2_asm_output_data (4, line, "%s:%u", filename, line); dw2_asm_output_data (4, line, "%s:%u", filename, line);
...@@ -6082,7 +6082,7 @@ dwarfout_source_line (line, filename) ...@@ -6082,7 +6082,7 @@ dwarfout_source_line (line, filename)
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
if (this_file_entry_num != prev_file_entry_num) if (this_file_entry_num != prev_file_entry_num)
generate_srcinfo_entry (last_line_entry_num, this_file_entry_num); generate_srcinfo_entry (last_line_entry_num, this_file_entry_num);
prev_file_entry_num = this_file_entry_num; prev_file_entry_num = this_file_entry_num;
} }
} }
...@@ -6275,7 +6275,7 @@ dwarfout_init (main_input_filename) ...@@ -6275,7 +6275,7 @@ dwarfout_init (main_input_filename)
/* Output a starting label and an initial (compilation directory) /* Output a starting label and an initial (compilation directory)
entry for the .debug_sfnames section. The starting label will be entry for the .debug_sfnames section. The starting label will be
referenced by the initial entry in the .debug_srcinfo section. */ referenced by the initial entry in the .debug_srcinfo section. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL); ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
...@@ -6292,29 +6292,29 @@ dwarfout_init (main_input_filename) ...@@ -6292,29 +6292,29 @@ dwarfout_init (main_input_filename)
} }
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
if (debug_info_level >= DINFO_LEVEL_VERBOSE if (debug_info_level >= DINFO_LEVEL_VERBOSE
&& use_gnu_debug_info_extensions) && use_gnu_debug_info_extensions)
{ {
/* Output a starting label for the .debug_macinfo section. This /* Output a starting label for the .debug_macinfo section. This
label will be referenced by the AT_mac_info attribute in the label will be referenced by the AT_mac_info attribute in the
TAG_compile_unit DIE. */ TAG_compile_unit DIE. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, MACINFO_BEGIN_LABEL); ASM_OUTPUT_LABEL (asm_out_file, MACINFO_BEGIN_LABEL);
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
/* Generate the initial entry for the .line section. */ /* Generate the initial entry for the .line section. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, LINE_BEGIN_LABEL); ASM_OUTPUT_LABEL (asm_out_file, LINE_BEGIN_LABEL);
ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, LINE_END_LABEL, LINE_BEGIN_LABEL); ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, LINE_END_LABEL, LINE_BEGIN_LABEL);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_BEGIN_LABEL); ASM_OUTPUT_DWARF_ADDR (asm_out_file, TEXT_BEGIN_LABEL);
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
/* Generate the initial entry for the .debug_srcinfo section. */ /* Generate the initial entry for the .debug_srcinfo section. */
...@@ -6333,16 +6333,16 @@ dwarfout_init (main_input_filename) ...@@ -6333,16 +6333,16 @@ dwarfout_init (main_input_filename)
#endif #endif
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
/* Generate the initial entry for the .debug_pubnames section. */ /* Generate the initial entry for the .debug_pubnames section. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_PUBNAMES_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_PUBNAMES_SECTION);
ASM_OUTPUT_DWARF_ADDR (asm_out_file, DEBUG_BEGIN_LABEL); ASM_OUTPUT_DWARF_ADDR (asm_out_file, DEBUG_BEGIN_LABEL);
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
/* Generate the initial entry for the .debug_aranges section. */ /* Generate the initial entry for the .debug_aranges section. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION);
ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, ASM_OUTPUT_DWARF_DELTA4 (asm_out_file,
...@@ -6468,7 +6468,7 @@ dwarfout_finish (main_input_filename) ...@@ -6468,7 +6468,7 @@ dwarfout_finish (main_input_filename)
if (debug_info_level >= DINFO_LEVEL_NORMAL) if (debug_info_level >= DINFO_LEVEL_NORMAL)
{ {
/* Output a terminating entry for the .line section. */ /* Output a terminating entry for the .line section. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, LINE_SECTION);
ASM_OUTPUT_LABEL (asm_out_file, LINE_LAST_ENTRY_LABEL); ASM_OUTPUT_LABEL (asm_out_file, LINE_LAST_ENTRY_LABEL);
...@@ -6477,7 +6477,7 @@ dwarfout_finish (main_input_filename) ...@@ -6477,7 +6477,7 @@ dwarfout_finish (main_input_filename)
ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, TEXT_END_LABEL, TEXT_BEGIN_LABEL); ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, TEXT_END_LABEL, TEXT_BEGIN_LABEL);
ASM_OUTPUT_LABEL (asm_out_file, LINE_END_LABEL); ASM_OUTPUT_LABEL (asm_out_file, LINE_END_LABEL);
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
if (use_gnu_debug_info_extensions) if (use_gnu_debug_info_extensions)
{ {
/* Output a terminating entry for the .debug_srcinfo section. */ /* Output a terminating entry for the .debug_srcinfo section. */
...@@ -6493,7 +6493,7 @@ dwarfout_finish (main_input_filename) ...@@ -6493,7 +6493,7 @@ dwarfout_finish (main_input_filename)
if (debug_info_level >= DINFO_LEVEL_VERBOSE) if (debug_info_level >= DINFO_LEVEL_VERBOSE)
{ {
/* Output terminating entries for the .debug_macinfo section. */ /* Output terminating entries for the .debug_macinfo section. */
dwarfout_end_source_file (0); dwarfout_end_source_file (0);
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
...@@ -6502,15 +6502,15 @@ dwarfout_finish (main_input_filename) ...@@ -6502,15 +6502,15 @@ dwarfout_finish (main_input_filename)
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
} }
/* Generate the terminating entry for the .debug_pubnames section. */ /* Generate the terminating entry for the .debug_pubnames section. */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_PUBNAMES_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_PUBNAMES_SECTION);
ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0); ASM_OUTPUT_DWARF_DATA4 (asm_out_file, 0);
ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, ""); ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, "");
ASM_OUTPUT_POP_SECTION (asm_out_file); ASM_OUTPUT_POP_SECTION (asm_out_file);
/* Generate the terminating entries for the .debug_aranges section. /* Generate the terminating entries for the .debug_aranges section.
Note that we want to do this only *after* we have output the end Note that we want to do this only *after* we have output the end
...@@ -6524,7 +6524,7 @@ dwarfout_finish (main_input_filename) ...@@ -6524,7 +6524,7 @@ dwarfout_finish (main_input_filename)
entries at this late point in the assembly output, we skirt the entries at this late point in the assembly output, we skirt the
issue simply by avoiding forward-references. issue simply by avoiding forward-references.
*/ */
fputc ('\n', asm_out_file); fputc ('\n', asm_out_file);
ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION); ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_ARANGES_SECTION);
......
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