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
ec9575be
Commit
ec9575be
authored
Apr 17, 2013
by
Matthias Braun
Browse files
fix heights computation
In the previous buggy form it was creating an overly conservative approximation.
parent
cf62b331
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/heights.c
View file @
ec9575be
...
...
@@ -143,10 +143,8 @@ static unsigned compute_height(ir_heights_t *h, ir_node *irn, const ir_node *bl)
if
(
!
is_Block
(
dep
)
&&
!
is_Phi
(
dep
)
&&
get_nodes_block
(
dep
)
==
bl
)
{
unsigned
dep_height
=
compute_height
(
h
,
dep
,
bl
);
ih
->
height
=
MAX
(
ih
->
height
,
dep_height
);
ih
->
height
=
MAX
(
ih
->
height
,
dep_height
+
1
);
}
ih
->
height
++
;
}
foreach_out_edge_kind
(
irn
,
edge
,
EDGE_KIND_DEP
)
{
...
...
@@ -155,10 +153,8 @@ static unsigned compute_height(ir_heights_t *h, ir_node *irn, const ir_node *bl)
assert
(
!
is_Phi
(
dep
));
if
(
!
is_Block
(
dep
)
&&
get_nodes_block
(
dep
)
==
bl
)
{
unsigned
dep_height
=
compute_height
(
h
,
dep
,
bl
);
ih
->
height
=
MAX
(
ih
->
height
,
dep_height
);
ih
->
height
=
MAX
(
ih
->
height
,
dep_height
+
1
);
}
ih
->
height
++
;
}
return
ih
->
height
;
...
...
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