Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
b3e096e7
Commit
b3e096e7
authored
Sep 04, 2009
by
yb9976
Browse files
- removed remnant of copyheur3
- use name copyopt instead of copycoal [r26493]
parent
41ca8262
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/becopyopt.c
View file @
b3e096e7
...
...
@@ -101,10 +101,11 @@ static const lc_opt_enum_mask_items_t algo_items[] = {
{
"none"
,
CO_ALGO_NONE
},
{
"heur"
,
CO_ALGO_HEUR
},
{
"heur2"
,
CO_ALGO_HEUR2
},
{
"heur3"
,
CO_ALGO_HEUR3
},
{
"heur4"
,
CO_ALGO_HEUR4
},
{
"ilp"
,
CO_ALGO_ILP
},
#ifdef FIRM_KAPS
{
"pbqp"
,
CO_ALGO_PBQP
},
#endif
{
NULL
,
0
}
};
...
...
@@ -139,16 +140,11 @@ static const lc_opt_table_entry_t options[] = {
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 heur
3
before if algo can exploit start solutions"
,
&
improve
),
LC_OPT_ENT_BOOL
(
"improve"
,
"run heur
1
before if algo can exploit start solutions"
,
&
improve
),
LC_OPT_LAST
};
/* Insert additional options registration functions here. */
extern
void
be_co_ilp_register_options
(
lc_opt_entry_t
*
grp
);
extern
void
be_co2_register_options
(
lc_opt_entry_t
*
grp
);
extern
void
be_co3_register_options
(
lc_opt_entry_t
*
grp
);
void
be_init_copycoal
(
void
)
void
be_init_copyopt
(
void
)
{
lc_opt_entry_t
*
be_grp
=
lc_opt_get_grp
(
firm_opt_get_root
(),
"be"
);
lc_opt_entry_t
*
ra_grp
=
lc_opt_get_grp
(
be_grp
,
"ra"
);
...
...
@@ -1104,15 +1100,10 @@ typedef struct {
int
can_improve_existing
;
}
co_algo_info_t
;
static
co_algo_info_t
algos
[]
=
{
static
const
co_algo_info_t
algos
[]
=
{
{
void_algo
,
"none"
,
0
},
{
co_solve_heuristic
,
"heur1"
,
0
},
{
co_solve_heuristic_new
,
"heur2"
,
0
},
#ifdef WITH_JVM
{
co_solve_heuristic_java
,
"heur3"
,
0
},
#else
{
NULL
,
"heur3"
,
0
},
#endif
{
co_solve_heuristic_mst
,
"heur4"
,
0
},
#ifdef WITH_ILP
{
co_solve_ilp2
,
"ilp"
,
1
},
...
...
@@ -1193,28 +1184,18 @@ void co_driver(be_chordal_env_t *cenv)
fclose
(
f
);
}
/* if the algo can improve results, provide an initial solution with heur
3
*/
/* if the algo can improve results, provide an initial solution with heur
1
*/
if
(
improve
&&
algos
[
algo
].
can_improve_existing
)
{
co_complete_stats_t
stats
;
/* produce a heuristic solution */
#ifdef WITH_JVM
co_solve_heuristic_java
(
co
);
#else
co_solve_heuristic
(
co
);
#endif
/* WITH_JVM */
/* do the stats and provide the current costs */
co_complete_stats
(
co
,
&
stats
);
be_stat_ev_ull
(
"co_prepare_costs"
,
stats
.
costs
);
}
#ifdef WITH_JVM
/* start the JVM here so that it does not tamper the timing. */
if
(
algo
==
CO_ALGO_HEUR3
)
be_java_coal_start_jvm
();
#endif
/* WITH_JVM */
algo_func
=
algos
[
algo
].
algo
;
/* perform actual copy minimization */
...
...
ir/be/becopyopt.h
View file @
b3e096e7
...
...
@@ -55,10 +55,11 @@ enum {
CO_ALGO_NONE
,
CO_ALGO_HEUR
,
CO_ALGO_HEUR2
,
CO_ALGO_HEUR3
,
CO_ALGO_HEUR4
,
CO_ALGO_ILP
,
#ifdef FIRM_KAPS
CO_ALGO_PBQP
,
#endif
CO_ALGO_LAST
};
...
...
@@ -156,13 +157,6 @@ void co_solve_park_moon(copy_opt_t *co);
*/
int
co_solve_heuristic_new
(
copy_opt_t
*
co
);
/**
* Solves the copy minimization problem using another heuristic approach implemented in Java.
* This function needs a JVM which is started to call the Java module.
* Uses the GRAPH data structure.
*/
int
co_solve_heuristic_java
(
copy_opt_t
*
co
);
/**
* This is the pure C implementation of co_solve_heuristic_java().
*/
...
...
ir/be/bemodule.c
View file @
b3e096e7
...
...
@@ -39,7 +39,7 @@ void be_init_listsched(void);
void
be_init_schedrss
(
void
);
void
be_init_chordal
(
void
);
void
be_init_chordal_main
(
void
);
void
be_init_copy
coal
(
void
);
void
be_init_copy
opt
(
void
);
void
be_init_copyheur2
(
void
);
void
be_init_copyheur4
(
void
);
void
be_init_copyheur5
(
void
);
...
...
@@ -98,7 +98,7 @@ void be_init_modules(void)
be_init_schedrss
();
be_init_chordal_main
();
be_init_chordal
();
be_init_copy
coal
();
be_init_copy
opt
();
be_init_copyheur2
();
be_init_copyheur4
();
// be_init_copyheur5();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment