Commit 1759fbe9 authored by Matthias Braun's avatar Matthias Braun
Browse files

simply use long long

Most of the world can handle C99 now, and the important rest (=msvc) can
handle long long as an extension.
parent 594a8d1e
......@@ -1211,16 +1211,16 @@ void co_driver(be_chordal_env_t *cenv)
co_complete_stats(co, &after);
if (do_stats) {
ulong64 optimizable_costs = after.max_costs - after.inevit_costs;
ulong64 evitable = after.costs - after.inevit_costs;
unsigned long long optimizable_costs = after.max_costs - after.inevit_costs;
unsigned long long evitable = after.costs - after.inevit_costs;
ir_printf("%30F ", cenv->irg);
printf("%10s %10" ULL_FMT "%10" ULL_FMT "%10" ULL_FMT, cenv->cls->name, after.max_costs, before.costs, after.inevit_costs);
printf("%10s %10llu%10llu%10llu", cenv->cls->name, after.max_costs, before.costs, after.inevit_costs);
if (optimizable_costs > 0)
printf("%10" ULL_FMT " %5.2f\n", after.costs, (evitable * 100.0) / optimizable_costs);
printf("%10llu %5.2f\n", after.costs, (evitable * 100.0) / optimizable_costs);
else
printf("%10" ULL_FMT " %5s\n", after.costs, "-");
printf("%10llu %5s\n", after.costs, "-");
}
/* Dump the interference graph in Appel's format. */
......
......@@ -119,33 +119,17 @@ int co_get_costs_exec_freq(const copy_opt_t *co, ir_node *root, ir_node* arg, in
*/
int co_get_costs_all_one(const copy_opt_t *co, ir_node *root, ir_node* arg, int pos);
#ifdef _MSC_VER
typedef __int64 long64;
typedef unsigned __int64 ulong64;
#define LL_FMT "i64"
#define ULL_FMT "ui64"
#else
typedef long long long64;
typedef unsigned long long ulong64;
#define LL_FMT "ll"
#define ULL_FMT "llu"
#endif
/**
* Statistics over a copy optimization module.
*/
typedef struct {
ulong64 aff_edges; /**< number of affinity edges. */
ulong64 aff_nodes; /**< number of nodes with incident affinity edges. */
ulong64 aff_int; /**< number of affinity edges whose nodes also interfere. */
ulong64 inevit_costs; /**< costs which cannot be evited (due to interfering affinities). */
ulong64 max_costs; /**< all costs of the affinities. */
ulong64 costs; /**< The costs of the current coloring. */
ulong64 unsatisfied_edges; /**< The number of unequally colored affinity edges. */
unsigned long long aff_edges; /**< number of affinity edges. */
unsigned long long aff_nodes; /**< number of nodes with incident affinity edges. */
unsigned long long aff_int; /**< number of affinity edges whose nodes also interfere. */
unsigned long long inevit_costs; /**< costs which cannot be evited (due to interfering affinities). */
unsigned long long max_costs; /**< all costs of the affinities. */
unsigned long long costs; /**< The costs of the current coloring. */
unsigned long long unsatisfied_edges; /**< The number of unequally colored affinity edges. */
} co_complete_stats_t;
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment