projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
dc87aa4
)
Set all values of the cost irg to 0
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Tue, 2 Sep 2003 09:29:34 +0000
(09:29 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Tue, 2 Sep 2003 09:29:34 +0000
(09:29 +0000)
[r1785]
ir/ir/irgraph.c
patch
|
blob
|
history
diff --git
a/ir/ir/irgraph.c
b/ir/ir/irgraph.c
index
0b509e3
..
c8d9024
100644
(file)
--- a/
ir/ir/irgraph.c
+++ b/
ir/ir/irgraph.c
@@
-159,11
+159,13
@@
new_ir_graph (entity *ent, int n_loc)
/* Make a rudimentary ir graph for the constant code.
Must look like a correct irg, spare everything else. */
-ir_graph *new_const_code_irg() {
+ir_graph *new_const_code_irg(
void
) {
ir_graph *res;
ir_node *projX;
- res = (ir_graph *) malloc (sizeof (ir_graph));
+ res = (ir_graph *) malloc (sizeof(*res));
+ memset(res, 0, sizeof(*res));
+
current_ir_graph = res;
res->n_loc = 1; /* Only the memory. */
res->visited = 0; /* visited flag, for the ir walker */