X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=driver%2Ffirm_cmdline.c;h=0b8cc872b8f7b973c675b6bf2836a06479ec05c8;hb=321d7bff758a89eee73d2d51f6c6c54dd9a60f96;hp=21903fa6286beb1839a8dd280cdbb87094a5cf5a;hpb=9172859ef43ceef06661e6fefe832c1990601eeb;p=cparser diff --git a/driver/firm_cmdline.c b/driver/firm_cmdline.c index 21903fa..0b8cc87 100644 --- a/driver/firm_cmdline.c +++ b/driver/firm_cmdline.c @@ -39,8 +39,7 @@ struct a_firm_opt firm_opt = { /* cc_opt = */ TRUE, /* freestanding; = */ FALSE, /* fp_model = */ fp_model_precise, - /* lower_ll = */ FALSE, - /* vrfy = */ FIRM_VERIFICATION_ON, + /* verify = */ FIRM_VERIFICATION_ON, /* check_all = */ FALSE, /* lower = */ TRUE, /* os_support = */ DEFAULT_OS, @@ -50,10 +49,9 @@ struct a_firm_opt firm_opt = { /* clone_threshold = */ DEFAULT_CLONE_THRESHOLD, /* inline_maxsize = */ 750, /* inline_threshold= */ 0, - /* vrfy_edges = */ FALSE, + /* verify_edges = */ FALSE, /* grs_simd_opt = */ 0, /* grs_create_pattern = */ 0, - /* spare_size = */ 128, /* enable_statev = */ FALSE, /* statev_filter = */ "", }; @@ -66,11 +64,9 @@ struct a_firm_dump firm_dump = { /* extbb = */ FALSE, /* ir_graph = */ FALSE, /* all_phases = */ FALSE, - /* edge_labels = */ FALSE, /* statistic = */ STAT_NONE, /* stat_pattern = */ 0, /* stat_dag = */ 0, - /* gen_firm_asm = */ FALSE, /* filter = */ NULL }; @@ -141,13 +137,13 @@ static const struct params { { X("restrict"), &firm_opt.honor_restrict, 1, "firm: honor restrict keyword" }, { X("no-restrict"), &firm_opt.honor_restrict, 1, "firm: restrict keyword is meaningless" }, { X("no-lower"), &firm_opt.lower, 0, "firm: disable lowering" }, - { X("vrfy-off"), &firm_opt.vrfy, FIRM_VERIFICATION_OFF, "firm: disable node verification" }, - { X("vrfy-on"), &firm_opt.vrfy, FIRM_VERIFICATION_ON, "firm: enable node verification" }, - { X("vrfy-report"), &firm_opt.vrfy, FIRM_VERIFICATION_REPORT, "firm: node verification, report only" }, + { X("verify-off"), &firm_opt.verify, FIRM_VERIFICATION_OFF, "firm: disable node verification" }, + { X("verify-on"), &firm_opt.verify, FIRM_VERIFICATION_ON, "firm: enable node verification" }, + { X("verify-report"), &firm_opt.verify, FIRM_VERIFICATION_REPORT, "firm: node verification, report only" }, { X("check-all"), &firm_opt.check_all, 1, "firm: enable checking all Firm phases" }, { X("no-check-all"), &firm_opt.check_all, 0, "firm: disable checking all Firm phases" }, - { X("vrfy-edges-on"), &firm_opt.vrfy_edges, 1, "firm: enable out edge verification" }, - { X("vrfy-edges-off"), &firm_opt.vrfy_edges, 0, "firm: disable out edge verification" }, + { X("verify-edges-on"), &firm_opt.verify_edges, 1, "firm: enable out edge verification" }, + { X("verify-edges-off"), &firm_opt.verify_edges, 0, "firm: disable out edge verification" }, /* dumping */ #if defined(_DEBUG) || defined(FIRM_DEBUG) @@ -159,7 +155,6 @@ static const struct params { { X("dump-no-blocks"), &firm_dump.no_blocks, 1, "firm: dump non-blocked graph" }, { X("dump-extbb"), &firm_dump.extbb, 1, "firm: dump extended basic blocks" }, { X("dump-all-phases"), &firm_dump.all_phases, 1, "firm: dump graphs for all optimization phases" }, - { X("dump-edge-labels"), &firm_dump.edge_labels, 1, "firm: dump edge labels" }, /* code generation */ { X("no-codegen"), &firm_be_opt.selection, BE_NONE, "cg: disable code generator" }, @@ -171,9 +166,7 @@ static const struct params { { X("no-grs-create-pattern"), &firm_ext_grs.create_pattern, 0, "firm: create patterns for simd optimization" }, #endif -#ifdef FIRM_BACKEND { X("be-firm"), &firm_be_opt.selection, BE_FIRM_BE, "backend: firm backend facility" }, -#endif /* FIRM_BACKEND */ #ifdef FIRM2C_BACKEND { X("be-firm2c"), &firm_be_opt.selection, BE_FIRM2C, "backend: firm2C" }, #endif /* FIRM2C_BACKEND */ @@ -186,7 +179,6 @@ static const struct params { { X("stat-final"), &firm_dump.statistic, STAT_FINAL, "misc: Firm statistic after code generation" }, { X("stat-pattern"), &firm_dump.stat_pattern, 1, "misc: Firm statistic calculates most used pattern" }, { X("stat-dag"), &firm_dump.stat_dag, 1, "misc: Firm calculates DAG statistics" }, - { X("firm-asm"), &firm_dump.gen_firm_asm, 1, "misc: output Firm assembler" }, { X("win32"), &firm_opt.os_support, OS_SUPPORT_MINGW, "misc: generate MinGW Win32 code" }, { X("mac"), &firm_opt.os_support, OS_SUPPORT_MACHO, "misc: generate MacOS code" }, { X("linux"), &firm_opt.os_support, OS_SUPPORT_LINUX, "misc: generate Linux-ELF code" }, @@ -228,6 +220,7 @@ static void disable_opts(void) { firm_opt.no_alias = FALSE; firm_opt.cc_opt = FALSE; firm_opt.freestanding = TRUE; + disable_all_opts(); } /* disable_opts */ void print_option_help(const char *name, const char *description) @@ -287,8 +280,8 @@ int firm_option(const char *opt) if (firm_opt.debug_mode == DBG_MODE_FULL) disable_opts(); res = 1; - res &= firm_be_option("omitfp=0"); - res &= firm_be_option("stabs"); + res &= be_parse_arg("omitfp=0"); + res &= be_parse_arg("stabs"); return res; } break; @@ -305,20 +298,6 @@ int firm_option(const char *opt) return 0; } /* firm_option */ -/** - * Handles a firm backend option. - * - * The options are here only checked for validity and later transmitted - * to the firm backend (in the hope they do not fail ...) - */ -int firm_be_option(const char *opt) { -#ifdef FIRM_BACKEND - return be_parse_arg(opt); -#else - return 0; -#endif /* FIRM_BACKEND */ -} /* firm_be_option */ - /** * prints the firm version number */