void sorry PVPROTO((char *s, ...));
void really_sorry PVPROTO((char *s, ...));
void fancy_abort ();
-#ifndef abort
-void abort ();
-#endif
void set_target_switch ();
static char *decl_name ();
/* Length of line when printing switch values. */
#define MAX_LINE 75
+#ifdef NEED_DECLARATION_ABORT
+void abort ();
+#endif
+
#ifdef NEED_DECLARATION_SBRK
extern char *sbrk ();
#endif
int global_reg_dump = 0;
int sched2_dump = 0;
int jump2_opt_dump = 0;
+#ifdef DELAY_SLOTS
int dbr_sched_dump = 0;
+#endif
int flag_print_asm_name = 0;
#ifdef STACK_REGS
int stack_reg_dump = 0;
flag_schedule_speculative_load means allow speculative motion of some
load insns.
flag_schedule_speculative_load_dangerous allows speculative motion of more
- load insns.
- flag_schedule_reverse_before_reload means try to reverse original order
- of insns (S).
- flag_schedule_reverse_after_reload means try to reverse original order
- of insns (R). */
+ load insns. */
int flag_schedule_interblock = 1;
int flag_schedule_speculative = 1;
int flag_schedule_speculative_load = 0;
int flag_schedule_speculative_load_dangerous = 0;
-int flag_schedule_reverse_before_reload = 0;
-int flag_schedule_reverse_after_reload = 0;
-
/* flag_on_branch_count_reg means try to replace add-1,compare,branch tupple
by a cheaper branch, on a count register. */
{"sched-spec",&flag_schedule_speculative, 1},
{"sched-spec-load",&flag_schedule_speculative_load, 1},
{"sched-spec-load-dangerous",&flag_schedule_speculative_load_dangerous, 1},
- {"sched-reverse-S",&flag_schedule_reverse_before_reload, 1},
- {"sched-reverse-R",&flag_schedule_reverse_after_reload, 1},
{"branch-count-reg",&flag_branch_on_count_reg, 1},
#endif /* HAIFA */
{"pic", &flag_pic, 1},
int local_alloc_time;
int global_alloc_time;
int sched2_time;
+#ifdef DELAY_SLOTS
int dbr_sched_time;
+#endif
int shorten_branch_time;
int stack_reg_time;
int final_time;
/* Strip off a legitimate source ending from the input string NAME of
length LEN. Rather than having to know the names used by all of
- our front ends, we strip off an ending of a period followed by one,
- two, or three characters. */
+ our front ends, we strip off an ending of a period followed by
+ up to five characters. (Java uses ".class".) */
void
strip_off_ending (name, len)
char *name;
int len;
{
- if (len > 2 && name[len - 2] == '.')
- name[len - 2] = '\0';
- else if (len > 3 && name[len - 3] == '.')
- name[len - 3] = '\0';
- else if (len > 4 && name[len - 4] == '.')
- name[len - 4] = '\0';
+ int i;
+ for (i = 2; i < 6 && len > i; i++)
+ {
+ if (name[len - i] == '.')
+ {
+ name[len - i] = '\0';
+ break;
+ }
+ }
}
/* Output a quoted string. */
/* Routine to close a dump file. */
static void
close_dump_file (func, insns)
- void (*func)(FILE *, rtx);
+ void (*func) PROTO ((FILE *, rtx));
rtx insns;
{
TIMEVAR
dump_rtl (suffix, decl, func, insns)
char *suffix;
tree decl;
- void (*func)(FILE *, rtx);
+ void (*func) PROTO ((FILE *, rtx));
rtx insns;
{
open_dump_file (suffix, decl_printable_name (decl, 2));
local_alloc_time = 0;
global_alloc_time = 0;
sched2_time = 0;
+#ifdef DELAY_SLOTS
dbr_sched_time = 0;
+#endif
shorten_branch_time = 0;
stack_reg_time = 0;
final_time = 0;
clean_dump_file (".sched2");
if (jump2_opt_dump)
clean_dump_file (".jump2");
+#ifdef DELAY_SLOTS
if (dbr_sched_dump)
clean_dump_file (".dbr");
+#endif
#ifdef STACK_REGS
if (stack_reg_dump)
clean_dump_file (".stack");
print_time ("local-alloc", local_alloc_time);
print_time ("global-alloc", global_alloc_time);
print_time ("sched2", sched2_time);
+#ifdef DELAY_SLOTS
print_time ("dbranch", dbr_sched_time);
+#endif
print_time ("shorten-branch", shorten_branch_time);
print_time ("stack-reg", stack_reg_time);
print_time ("final", final_time);
/* Do control and data flow analysis,
and write some of the results to dump file. */
- TIMEVAR (flow_time, flow_analysis (insns, max_reg_num (),
- rtl_dump_file));
+ TIMEVAR
+ (flow_time,
+ {
+ find_basic_blocks (insns, max_reg_num (), rtl_dump_file, 1);
+ life_analysis (insns, max_reg_num (), rtl_dump_file);
+ });
+
if (warn_uninitialized)
{
uninitialized_vars_warning (DECL_INITIAL (decl));
/* Register allocation pre-pass, to reduce number of moves
necessary for two-address machines. */
- if (optimize > 0 && flag_regmove)
+ if (optimize > 0 && (flag_regmove || flag_expensive_optimizations))
{
if (regmove_dump)
open_dump_file (".regmove", decl_printable_name (decl, 2));
flag_inline_functions = 1;
}
- /* Disable code bloating optimizations if optimizing for size. */
- if (optimize_size)
- {
- flag_inline_functions = 0;
- }
-
/* Initialize target_flags before OPTIMIZATION_OPTIONS so the latter can
modify it. */
target_flags = 0;
case 'a':
branch_prob_dump = 1;
combine_dump = 1;
+#ifdef DELAY_SLOTS
dbr_sched_dump = 1;
+#endif
flow_dump = 1;
global_reg_dump = 1;
jump_opt_dump = 1;
case 'c':
combine_dump = 1;
break;
+#ifdef DELAY_SLOTS
case 'd':
dbr_sched_dump = 1;
break;
+#endif
case 'f':
flow_dump = 1;
break;
type = PREFERRED_DEBUGGING_TYPE;
if (len > 1 && strncmp (str, "ggdb", len) == 0)
{
-#ifdef DWARF2_DEBUGGING_INFO
+#if defined (DWARF2_DEBUGGING_INFO) && !defined (LINKER_DOES_NOT_WORK_WITH_DWARF2)
type = DWARF2_DEBUG;
#else
#ifdef DBX_DEBUGGING_INFO