static bool constant_folding;
static bool initializer_use_bitfield_basetype;
-extern bool have_const_functions;
-
static const entity_t *current_function_entity;
static ir_node *current_function_name;
static ir_node *current_funcsig;
}
if (modifiers & DM_CONST) {
add_entity_additional_properties(irentity, mtp_property_const);
- have_const_functions = true;
}
}
if (modifiers & DM_USED) {
}
static int *irg_dump_no;
-static int firm_const_exists;
-
-static void do_optimize_funccalls(void)
-{
- optimize_funccalls(firm_const_exists, NULL);
-}
static void do_lower_highlevel(ir_graph *irg)
{
IRP("inline", do_inline, "inlining", OPT_FLAG_NONE),
IRP("lower-const", lower_const_code, "lowering of constant code", OPT_FLAG_HIDE_OPTIONS | OPT_FLAG_NO_DUMP | OPT_FLAG_NO_VERIFY | OPT_FLAG_ESSENTIAL),
IRP("target-lowering", be_lower_for_target, "lowering necessary for target architecture", OPT_FLAG_HIDE_OPTIONS | OPT_FLAG_ESSENTIAL),
- IRP("opt-func-call", do_optimize_funccalls, "function call optimization", OPT_FLAG_NONE),
+ IRP("opt-func-call", optimize_funccalls, "function call optimization", OPT_FLAG_NONE),
IRP("opt-proc-clone", do_cloning, "procedure cloning", OPT_FLAG_NONE),
IRP("remove-unused", garbage_collect_entities, "removal of unused functions/variables", OPT_FLAG_NO_DUMP | OPT_FLAG_NO_VERIFY),
IRP("rts", rts_map, "optimization of known library functions", OPT_FLAG_HIDE_OPTIONS),
* @param out a file handle for the output, may be NULL
* @param input_filename the name of the (main) source file
* @param c_mode non-zero if "C" was compiled
- * @param new_firm_const_exists non-zero, if the const attribute was used on functions
*/
-void gen_firm_finish(FILE *out, const char *input_filename,
- int new_firm_const_exists)
+void gen_firm_finish(FILE *out, const char *input_filename)
{
int i;
- firm_const_exists = new_firm_const_exists;
-
/* the general for dumping option must be set, or the others will not work*/
firm_dump.ir_graph
= (a_byte) (firm_dump.ir_graph | firm_dump.all_phases | firm_dump.extbb);
bool char_is_signed = true;
bool strict_mode = false;
bool use_builtins = false;
-bool have_const_functions = false;
atomic_type_kind_t wchar_atomic_kind = ATOMIC_TYPE_INT;
unsigned force_long_double_size = 0;
bool enable_main_collect2_hack = false;
return EXIT_SUCCESS;
}
- gen_firm_finish(asm_out, filename, have_const_functions);
+ gen_firm_finish(asm_out, filename);
if (asm_out != out) {
fclose(asm_out);
}