projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed perm insertion
[libfirm]
/
ir
/
be
/
becopystat.c
diff --git
a/ir/be/becopystat.c
b/ir/be/becopystat.c
index
fe491dc
..
7fa9c06
100644
(file)
--- a/
ir/be/becopystat.c
+++ b/
ir/be/becopystat.c
@@
-13,6
+13,7
@@
#include "irprog.h"
#include "iredges.h"
#include "phiclass_t.h"
#include "irprog.h"
#include "iredges.h"
#include "phiclass_t.h"
+#include "beutil.h"
#include "becopyopt.h"
#include "becopystat.h"
#include "xmalloc.h"
#include "becopyopt.h"
#include "becopystat.h"
#include "xmalloc.h"
@@
-22,9
+23,9
@@
#define DEBUG_LVL SET_LEVEL_1
static firm_dbg_module_t *dbg = NULL;
#define DEBUG_LVL SET_LEVEL_1
static firm_dbg_module_t *dbg = NULL;
-#define MAX_ARITY
1
0
-#define MAX_CLS_SIZE
1
0
-#define MAX_CLS_PHIS
1
0
+#define MAX_ARITY
2
0
+#define MAX_CLS_SIZE
2
0
+#define MAX_CLS_PHIS
2
0
/**
* For an explanation of these values see the code of copystat_dump_pretty
/**
* For an explanation of these values see the code of copystat_dump_pretty
@@
-121,11
+122,13
@@
static void irg_stat_walker(ir_node *node, void *env) {
if (is_Block(node)) /* count all blocks */
curr_vals[I_BLOCKS]++;
if (is_Block(node)) /* count all blocks */
curr_vals[I_BLOCKS]++;
- if (is_
Phi(node) && mode_is_datab(get_irn_mode(node)
)) /* collect phis */
+ if (is_
Reg_Phi(node
)) /* collect phis */
pset_insert_ptr(all_phi_nodes, node);
pset_insert_ptr(all_phi_nodes, node);
- if (is_
Copy
(arch_env, node))
+ if (is_
Perm_Proj
(arch_env, node))
pset_insert_ptr(all_copy_nodes, node);
pset_insert_ptr(all_copy_nodes, node);
+
+ /* TODO: Add 2-Addr-Code nodes */
}
static void copystat_collect_irg(ir_graph *irg, arch_env_t *arch_env) {
}
static void copystat_collect_irg(ir_graph *irg, arch_env_t *arch_env) {
@@
-273,17
+276,17
@@
static void stat_phi_class(be_chordal_env_t *chordal_env, pset *pc) {
}
#define is_curr_reg_class(irn) \
}
#define is_curr_reg_class(irn) \
- (arch_get_irn_reg_class(chordal_env->
session_env->
main_env->arch_env, irn, \
-
arch_pos_make_out(0)
) == chordal_env->cls)
+ (arch_get_irn_reg_class(chordal_env->main_env->arch_env, irn, \
+
-1
) == chordal_env->cls)
void copystat_collect_cls(be_chordal_env_t *chordal_env) {
ir_node *n;
pset *pc;
void copystat_collect_cls(be_chordal_env_t *chordal_env) {
ir_node *n;
pset *pc;
- ir_graph *irg = chordal_env->
session_env->
irg;
+ ir_graph *irg = chordal_env->irg;
if (last_irg != irg) {
copystat_reset();
if (last_irg != irg) {
copystat_reset();
- copystat_collect_irg(irg, chordal_env->
session_env->
main_env->arch_env);
+ copystat_collect_irg(irg, chordal_env->main_env->arch_env);
}
for (n = pset_first(all_phi_nodes); n; n = pset_next(all_phi_nodes))
}
for (n = pset_first(all_phi_nodes); n; n = pset_next(all_phi_nodes))