X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbecopyheur3.c;h=18cae3964d163c6c11473eb5199725394f3b11df;hb=5346758a7b02ed44d65cdd26cd49221fbaf2dd45;hp=8aeb44ae5470621fd25f98621c0f4e3cf02b652c;hpb=4d5c3365a58cba59993045a9e08e686d8ae079a7;p=libfirm diff --git a/ir/be/becopyheur3.c b/ir/be/becopyheur3.c index 8aeb44ae5..18cae3964 100644 --- a/ir/be/becopyheur3.c +++ b/ir/be/becopyheur3.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -18,16 +18,20 @@ */ /** - * More experiments on coalescing. - * @author Sebastian Hack - * @date 25.07.2006 + * @file + * @brief More experiments on coalescing with Java implementation. + * @author Sebastian Hack + * @date 25.07.2006 + * @version $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif -#include -#include +#ifdef WITH_JVM + +#include "lc_opts.h" +#include "lc_opts_enum.h" #include #include @@ -78,7 +82,7 @@ static lc_opt_enum_mask_var_t dump_var = { static const lc_opt_table_entry_t options[] = { LC_OPT_ENT_ENUM_MASK("dump", "dump ifg cloud", &dump_var), LC_OPT_ENT_INT ("dbg", "debug level for the Java coalescer", &dbg_level), - { NULL } + LC_OPT_LAST }; void be_init_copyheur3(void) @@ -146,8 +150,8 @@ int co_solve_heuristic_java(copy_opt_t *co) } } - node_map = malloc((get_irg_last_idx(co->irg) + 1) * sizeof(node_map[0])); - inv_node_map = malloc((get_irg_last_idx(co->irg) + 1) * sizeof(inv_node_map[0])); + node_map = xmalloc((get_irg_last_idx(co->irg) + 1) * sizeof(node_map[0])); + inv_node_map = xmalloc((get_irg_last_idx(co->irg) + 1) * sizeof(inv_node_map[0])); curr_idx = 0; be_ifg_foreach_node(ifg, nodes_it, n) { @@ -235,3 +239,5 @@ int co_solve_heuristic_java(copy_opt_t *co) bitset_free(nodes); return 0; } + +#endif