} ia32_fpu_mode_t; static const lc_opt_enum_int_items_t fp_unit_items[] = { { "387" , IA32_FPU_X87 }, { "sse", IA32_FPU_SSE2 }, { "softfloat", IA32_FPU_SOFTFLOAT }, { NULL, IA32_FPU_X87 } }; static lc_opt_enum_int_var_t fp_unit_var = { &fpu_arch, fp_unit_items }; static const lc_opt_table_entry_t ia32_architecture_options[] = { LC_OPT_ENT_INT ("stackalign", "set power of two stack alignment for calls", &po2_stack_alignment), LC_OPT_ENT_BOOL ("size", "optimize for size", &opt_size), LC_OPT_ENT_ENUM_INT("arch", "select the instruction architecture", &arch_var), LC_OPT_ENT_ENUM_INT("tune", "optimize for instruction architecture", &opt_arch_var), LC_OPT_ENT_ENUM_INT("fpmath", "select the floating point unit", &fp_unit_var), LC_OPT_ENT_BOOL ("optcc", "optimize calling convention", &opt_cc), LC_OPT_ENT_BOOL ("unsafe_floatconv", "do unsafe floating point controlword optimizations", &opt_unsafe_floatconv), LC_OPT_ENT_BOOL ("machcode", "output machine code instead of assembler", &emit_machcode), LC_OPT_ENT_BOOL ("soft-float", "equivalent to fpmath=softfloat", &use_softfloat), LC_OPT_ENT_BOOL ("sse", "gcc compatibility", &use_sse), LC_OPT_ENT_BOOL ("sse2", "gcc compatibility", &use_sse2), LC_OPT_ENT_BOOL ("sse3", "gcc compatibility", &use_sse3), LC_OPT_ENT_BOOL ("sse4", "gcc compatibility", &use_sse4), LC_OPT_ENT_BOOL ("sse4.1", "gcc compatibility", &use_sse4_1), LC_OPT_ENT_BOOL ("sse4.2", "gcc compatibility", &use_sse4_2), LC_OPT_ENT_BOOL ("sse4a", "gcc compatibility", &use_sse4a), LC_OPT_ENT_BOOL ("sse5", "gcc compatibility", &use_sse5),
#include "bespill.h" #include "bemodule.h" #include "be.h" #include "belive.h" #include "beirg.h" #include "benode.h" #include "bera.h" #include "lc_opts.h" #include "lc_opts_enum.h" bool be_coalesce_spill_slots = true; bool be_do_remats = true; static const lc_opt_table_entry_t be_spill_options[] = { LC_OPT_ENT_BOOL ("coalesce_slots", "coalesce the spill slots", &be_coalesce_spill_slots), LC_OPT_ENT_BOOL ("remat", "try to rematerialize values instead of reloading", &be_do_remats), LC_OPT_LAST }; static be_module_list_entry_t *spillers; static be_spill_func selected_spiller; void be_register_spiller(const char *name, be_spill_func spiller) { if (selected_spiller == NULL) selected_spiller = spiller; be_add_module_to_list(&spillers, name, spiller); } void be_do_spill(ir_graph *irg, const arch_register_class_t *cls,
&dump_flags, dump_items }; static lc_opt_enum_mask_var_t style_var = { &style_flags, style_items }; static lc_opt_enum_func_ptr_var_t cost_func_var = { (opt_funcptr*) &cost_func, cost_func_items }; static const lc_opt_table_entry_t options[] = { LC_OPT_ENT_ENUM_FUNC_PTR ("cost", "select a cost function", &cost_func_var), LC_OPT_ENT_ENUM_MASK ("dump", "dump ifg before or after copy optimization", &dump_var), LC_OPT_ENT_ENUM_MASK ("style", "dump style for ifg dumping", &style_var), LC_OPT_ENT_BOOL ("stats", "dump statistics after each optimization", &do_stats), LC_OPT_ENT_BOOL ("improve", "run heur1 before if algo can exploit start solutions", &improve), LC_OPT_LAST }; static be_module_list_entry_t *copyopts = NULL; static const co_algo_info *selected_copyopt = NULL; void be_register_copyopt(const char *name, co_algo_info *copyopt) { if (selected_copyopt == NULL) selected_copyopt = copyopt; be_add_module_to_list(©opts, name, copyopt); } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyopt)