projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fixed r22803
[libfirm]
/
ir
/
be
/
betranshlp.c
diff --git
a/ir/be/betranshlp.c
b/ir/be/betranshlp.c
index
13382e1
..
c7582cd
100644
(file)
--- a/
ir/be/betranshlp.c
+++ b/
ir/be/betranshlp.c
@@
-24,9
+24,7
@@
* @date 14.06.2007
* @version $Id$
*/
* @date 14.06.2007
* @version $Id$
*/
-#ifdef HAVE_CONFIG_H
#include "config.h"
#include "config.h"
-#endif
#include "pdeq.h"
#include "irop_t.h"
#include "pdeq.h"
#include "irop_t.h"
@@
-85,6
+83,14
@@
void be_duplicate_deps(ir_node *old_node, ir_node *new_node) {
}
}
}
}
+void be_dep_on_frame(ir_node *const node)
+{
+ ir_graph *const irg = current_ir_graph;
+
+ if (get_irg_start_block(irg) == get_nodes_block(node))
+ add_irn_dep(node, get_irg_frame(irg));
+}
+
ir_node *be_duplicate_node(ir_node *node) {
ir_node *block = be_transform_node(get_nodes_block(node));
ir_graph *irg = env.irg;
ir_node *be_duplicate_node(ir_node *node) {
ir_node *block = be_transform_node(get_nodes_block(node));
ir_graph *irg = env.irg;
@@
-253,8
+259,7
@@
static void kill_unused_anchor(int anchor)
/**
* Transforms all nodes. Deletes the old obstack and creates a new one.
*/
/**
* Transforms all nodes. Deletes the old obstack and creates a new one.
*/
-static void transform_nodes(ir_graph *irg, arch_pretrans_nodes *pre_transform,
- void *cg)
+static void transform_nodes(ir_graph *irg, arch_pretrans_nodes *pre_transform)
{
int i;
ir_node *old_end, *new_anchor;
{
int i;
ir_node *old_end, *new_anchor;
@@
-291,7
+296,7
@@
static void transform_nodes(ir_graph *irg, arch_pretrans_nodes *pre_transform,
kill_unused_anchor(anchor_tls);
if (pre_transform)
kill_unused_anchor(anchor_tls);
if (pre_transform)
-
(*pre_transform)(cg
);
+
pre_transform(
);
/* process worklist (this should transform all nodes in the graph) */
while (! waitq_empty(env.worklist)) {
/* process worklist (this should transform all nodes in the graph) */
while (! waitq_empty(env.worklist)) {
@@
-384,7
+389,7
@@
static ir_node *gen_End(ir_node *node) {
return new_end;
}
return new_end;
}
-void be_transform_graph(be_irg_t *birg, arch_pretrans_nodes *func
, void *cg
)
+void be_transform_graph(be_irg_t *birg, arch_pretrans_nodes *func)
{
ir_graph *irg = birg->irg;
ir_graph *old_current_ir_graph = current_ir_graph;
{
ir_graph *irg = birg->irg;
ir_graph *old_current_ir_graph = current_ir_graph;
@@
-409,7
+414,7
@@
void be_transform_graph(be_irg_t *birg, arch_pretrans_nodes *func, void *cg)
op_End->ops.generic = (op_func)gen_End;
/* do the main transformation */
op_End->ops.generic = (op_func)gen_End;
/* do the main transformation */
- transform_nodes(irg, func
, cg
);
+ transform_nodes(irg, func);
/* free the old obstack */
obstack_free(old_obst, 0);
/* free the old obstack */
obstack_free(old_obst, 0);