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
1475afff
Commit
1475afff
authored
Nov 09, 2011
by
Matthias Braun
Browse files
heights: use fast access functions for _reachable
parent
f8526c84
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/heights.c
View file @
1475afff
...
...
@@ -100,12 +100,12 @@ static bool search(ir_heights_t *h, const ir_node *curr, const ir_node *tgt)
return
false
;
/* Check, if we have already been here. Coming more often won't help :-) */
h_curr
=
get_height_data
(
h
,
curr
);
h_curr
=
maybe_
get_height_data
(
h
,
curr
);
if
(
h_curr
->
visited
>=
h
->
visited
)
return
false
;
/* If we are too deep into the DAG we won't find the target either. */
h_tgt
=
get_height_data
(
h
,
tgt
);
h_tgt
=
maybe_
get_height_data
(
h
,
tgt
);
if
(
h_curr
->
height
>
h_tgt
->
height
)
return
false
;
...
...
@@ -130,8 +130,8 @@ int heights_reachable_in_block(ir_heights_t *h, const ir_node *n,
const
ir_node
*
m
)
{
int
res
=
0
;
irn_height_t
*
hn
=
get_height_data
(
h
,
n
);
irn_height_t
*
hm
=
get_height_data
(
h
,
m
);
irn_height_t
*
hn
=
maybe_
get_height_data
(
h
,
n
);
irn_height_t
*
hm
=
maybe_
get_height_data
(
h
,
m
);
assert
(
get_nodes_block
(
n
)
==
get_nodes_block
(
m
));
assert
(
hn
!=
NULL
&&
hm
!=
NULL
);
...
...
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