/* Top level of GCC compilers (cc1, cc1plus, etc.)
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This file is part of GCC.
if (flag_mudflap)
mudflap_finish_file ();
+ output_shared_constant_pool ();
+ output_object_blocks ();
+
/* Write out any pending weak symbol declarations. */
weak_finish ();
/* Do dbx symbols. */
timevar_push (TV_SYMOUT);
-#ifdef DWARF2_UNWIND_INFO
+#if defined DWARF2_DEBUGGING_INFO || defined DWARF2_UNWIND_INFO
if (dwarf2out_do_frame ())
dwarf2out_frame_finish ();
#endif
init_optimization_passes ();
}
+/* Return true if the current target supports -fsection-anchors. */
+
+static bool
+target_supports_section_anchors_p (void)
+{
+ if (targetm.min_anchor_offset == 0 && targetm.max_anchor_offset == 0)
+ return false;
+
+ if (targetm.asm_out.output_anchor == NULL)
+ return false;
+
+ return true;
+}
+
/* Process the options that have been parsed. */
static void
process_options (void)
OVERRIDE_OPTIONS;
#endif
+ if (flag_section_anchors && !target_supports_section_anchors_p ())
+ {
+ warning (OPT_fsection_anchors,
+ "this target does not support %qs", "-fsection-anchors");
+ flag_section_anchors = 0;
+ }
+
if (flag_short_enums == 2)
flag_short_enums = targetm.default_short_enums ();
if (flag_rename_registers == AUTODETECT_VALUE)
flag_rename_registers = flag_unroll_loops || flag_peel_loops;
- /* If explicitly asked to run new loop optimizer, switch off the old
- one. */
- if (flag_loop_optimize2)
- flag_loop_optimize = 0;
-
- /* Enable new loop optimizer pass if any of its optimizations is called. */
- if (flag_move_loop_invariants
- || flag_unswitch_loops
- || flag_peel_loops
- || flag_unroll_loops
- || flag_branch_on_count_reg)
- flag_loop_optimize2 = 1;
-
if (flag_non_call_exceptions)
flag_asynchronous_unwind_tables = 1;
if (flag_asynchronous_unwind_tables)
if (flag_unit_at_a_time && ! lang_hooks.callgraph.expand_function)
flag_unit_at_a_time = 0;
+ if (!flag_unit_at_a_time)
+ flag_section_anchors = 0;
+
if (flag_value_profile_transformations)
flag_profile_values = 1;
init_regs ();
init_fake_stack_mems ();
init_alias_once ();
- init_loop ();
init_reload ();
init_varasm_once ();
predefined types. */
timevar_push (TV_SYMOUT);
-#ifdef DWARF2_UNWIND_INFO
+#if defined DWARF2_DEBUGGING_INFO || defined DWARF2_UNWIND_INFO
if (dwarf2out_do_frame ())
dwarf2out_frame_init ();
#endif