X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=driver%2Ffirm_opt.h;h=90938cf9843ac70214b74ca925125e862643b093;hb=9a9a71f0190e6a79bc3712a1adb8c935fe7e48ca;hp=6a00b1fecedb64c4c0426fe515e0ad816d23bbf1;hpb=0ebbd3e65a57231db1c7346190cb4f04ea52b628;p=cparser diff --git a/driver/firm_opt.h b/driver/firm_opt.h index 6a00b1f..90938cf 100644 --- a/driver/firm_opt.h +++ b/driver/firm_opt.h @@ -1,6 +1,7 @@ #ifndef FIRM_OPT_H #define FIRM_OPT_H +#include #include #include @@ -90,28 +91,37 @@ enum rts_names { rts_max }; -extern ir_entity_ptr rts_entities[rts_max]; - -/** Debug printf implementation. */ -extern void dbg_printf(const char *fmt, ...); +extern ir_entity *rts_entities[rts_max]; /** Initialize for the Firm-generating back end. */ void gen_firm_init(void); -void disable_all_opts(void); +/** free resources hold by firm-generating back end */ +void gen_firm_finish(void); + +/** + * Transform, optimize and generate code + * + * @param out a file handle for the output, may be NULL + * @param input_filename the name of the (main) source file + */ +void generate_code(FILE *out, const char *input_filename); -/** called, after the Firm generation is completed. */ -void gen_firm_finish(FILE *out, const char *input_filename, int firm_const_exists); +/** process optimization commandline option */ +int firm_option(const char *opt); -void gen_Firm_assembler(const char *input_filename); +typedef void (*print_option_help_func)(const char *name, const char *description); -/** early initialization. */ -void firm_early_init(void); +void firm_option_help(print_option_help_func func); -/** process optimisation commandline option */ -int firm_opt_option(const char *opt); +/** Choose an optimization level. (Typically used to interpret the -O compiler + * switches) */ +void choose_optimization_pack(int level); -/** print help about optimisations options */ -void firm_opt_option_help(void); +/** + * Initialize implicit optimization settings in firm. Frontends should call this + * before starting graph construction + */ +void init_implicit_optimizations(void); -#endif /* FIRM_OPT_H */ +#endif