int flag_reorder_blocks = 0;
+/* Nonzero if blocks should be partitioned into hot and cold sections in
+ addition to being reordered. */
+
+int flag_reorder_blocks_and_partition = 0;
+
/* Nonzero if functions should be reordered. */
int flag_reorder_functions = 0;
{"branch-probabilities", &flag_branch_probabilities, 1 },
{"profile", &profile_flag, 1 },
{"reorder-blocks", &flag_reorder_blocks, 1 },
+ {"reorder-blocks-and-partition", &flag_reorder_blocks_and_partition, 1},
{"reorder-functions", &flag_reorder_functions, 1 },
{"rename-registers", &flag_rename_registers, 1 },
{"cprop-registers", &flag_cprop_registers, 1 },
set_src_pwd (const char *pwd)
{
if (src_pwd)
- return false;
+ {
+ if (strcmp (src_pwd, pwd) == 0)
+ return true;
+ else
+ return false;
+ }
src_pwd = xstrdup (pwd);
return true;
if (rtl_dump_and_exit)
verbatim ("%s ", IDENTIFIER_POINTER (DECL_NAME (decl)));
else
- verbatim (" %s", (*lang_hooks.decl_printable_name) (decl, 2));
+ verbatim (" %s", lang_hooks.decl_printable_name (decl, 2));
fflush (stderr);
pp_needs_newline (global_dc->printer) = true;
diagnostic_set_last_function (global_dc);
DECL_DEFER_OUTPUT (decl) = 0;
if (TREE_CODE (decl) == VAR_DECL && DECL_SIZE (decl) == 0)
- (*lang_hooks.finish_incomplete_decl) (decl);
+ lang_hooks.finish_incomplete_decl (decl);
}
/* Now emit any global variables or functions that we have been
/* Global register variables must be declared to reserve them. */
&& ! (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
/* Otherwise, ask the language. */
- && (*lang_hooks.decls.warn_unused_global) (decl))
+ && lang_hooks.decls.warn_unused_global (decl))
warning ("%J'%D' defined but not used", decl, decl);
/* Avoid confusing the debug information machinery when there are
/* Call the parser, which parses the entire file (calling
rest_of_compilation for each function). */
- (*lang_hooks.parse_file) (set_yydebug);
+ lang_hooks.parse_file (set_yydebug);
/* In case there were missing block closers,
get us back to the global binding level. */
- (*lang_hooks.clear_binding_stack) ();
+ lang_hooks.clear_binding_stack ();
/* Compilation is now finished except for writing
what's left of the symbol table output. */
if (flag_syntax_only)
return;
- (*lang_hooks.decls.final_write_globals)();
+ lang_hooks.decls.final_write_globals ();
cgraph_varpool_assemble_pending_decls ();
{
tree t = va_arg (*text->args_ptr, tree);
const char *n = DECL_NAME (t)
- ? (*lang_hooks.decl_printable_name) (t, 2)
+ ? lang_hooks.decl_printable_name (t, 2)
: "<anonymous>";
pp_string (pp, n);
}
initialization based on the command line options. This hook also
sets the original filename if appropriate (e.g. foo.i -> foo.c)
so we can correctly initialize debug output. */
- no_backend = (*lang_hooks.post_options) (&main_input_filename);
+ no_backend = lang_hooks.post_options (&main_input_filename);
input_filename = main_input_filename;
#ifdef OVERRIDE_OPTIONS
dump_base_name = name ? name : "gccdump";
/* Other front-end initialization. */
- if ((*lang_hooks.init) () == 0)
+ if (lang_hooks.init () == 0)
return 0;
init_asm_output (name);
front end is initialized. */
init_eh ();
init_optabs ();
+ init_optimization_passes ();
/* The following initialization functions need to generate rtl, so
provide a dummy function context for them. */
free_reg_info ();
/* Language-specific end of compilation actions. */
- (*lang_hooks.finish) ();
+ lang_hooks.finish ();
}
/* Initialize the compiler, and compile the input file. */