projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Discard all non-anchors from the input, not just the first one.
[cparser]
/
driver
/
firm_opt.c
diff --git
a/driver/firm_opt.c
b/driver/firm_opt.c
index
2ea1dec
..
defb7aa
100644
(file)
--- a/
driver/firm_opt.c
+++ b/
driver/firm_opt.c
@@
-170,7
+170,7
@@
static void dump_all(const char *suffix)
}
/* entities of runtime functions */
}
/* entities of runtime functions */
-ir_entity
_ptr
rts_entities[rts_max];
+ir_entity
*
rts_entities[rts_max];
/**
* Map runtime functions.
/**
* Map runtime functions.
@@
-178,7
+178,7
@@
ir_entity_ptr rts_entities[rts_max];
static void rts_map(void)
{
static const struct {
static void rts_map(void)
{
static const struct {
- ir_entity
_ptr
*ent; /**< address of the rts entity */
+ ir_entity
*
*ent; /**< address of the rts entity */
i_mapper_func func; /**< mapper function. */
} mapper[] = {
/* integer */
i_mapper_func func; /**< mapper function. */
} mapper[] = {
/* integer */
@@
-756,12
+756,9
@@
void generate_code(FILE *out, const char *input_filename)
{
int i;
{
int i;
- set_optimize(1);
- set_opt_constant_folding(firm_opt.const_folding);
- set_opt_algebraic_simplification(firm_opt.const_folding);
- set_opt_cse(firm_opt.cse);
- set_opt_global_cse(0);
-
+ /* initialize implicit opts, just to be sure because really the frontend
+ * should have called it already before starting graph construction */
+ init_implicit_optimizations();
init_statistics();
do_node_verification((firm_verification_t) firm_opt.verify);
init_statistics();
do_node_verification((firm_verification_t) firm_opt.verify);
@@
-833,6
+830,7
@@
static void disable_all_opts(void)
firm_opt.alias_analysis = false;
firm_opt.strict_alias = false;
firm_opt.no_alias = false;
firm_opt.alias_analysis = false;
firm_opt.strict_alias = false;
firm_opt.no_alias = false;
+ firm_opt.const_folding = false;
FOR_EACH_OPT(config) {
if (config->flags & OPT_FLAG_ESSENTIAL) {
FOR_EACH_OPT(config) {
if (config->flags & OPT_FLAG_ESSENTIAL) {
@@
-859,8
+857,6
@@
static bool firm_opt_option(const char *opt)
void firm_option_help(print_option_help_func print_option_help)
{
void firm_option_help(print_option_help_func print_option_help)
{
- print_option_help(firm_options[0].option, firm_options[0].description);
-
FOR_EACH_OPT(config) {
char buf[1024];
char buf2[1024];
FOR_EACH_OPT(config) {
char buf[1024];
char buf2[1024];
@@
-967,3
+963,12
@@
void choose_optimization_pack(int level)
break;
}
}
break;
}
}
+
+void init_implicit_optimizations(void)
+{
+ set_optimize(1);
+ set_opt_constant_folding(firm_opt.const_folding);
+ set_opt_algebraic_simplification(firm_opt.const_folding);
+ set_opt_cse(firm_opt.cse);
+ set_opt_global_cse(0);
+}