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
5efc71ac
Commit
5efc71ac
authored
Sep 14, 2005
by
Michael Beck
Browse files
renamed is_forking_op() to is_irn_forking()
cleaned up the comments fixed typos [r6617]
parent
7af00ed6
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/opt/ldstopt.c
View file @
5efc71ac
...
...
@@ -83,7 +83,7 @@ typedef struct _ldst_info_t {
*/
enum
block_flags_t
{
BLOCK_HAS_COND
=
1
,
/**< Block has conditional control flow */
BLOCK_HAS_EXC
=
2
/**< Block has exceptionl control flow */
BLOCK_HAS_EXC
=
2
/**< Block has exception
a
l control flow */
};
/**
...
...
@@ -148,7 +148,11 @@ static unsigned update_projs(ldst_info_t *info, ir_node *proj)
}
/**
* update the exception block info for a Load/Store
* update the exception block info for a Load/Store node.
*
* @param info the load/store info struct
* @param block the exception handler block for this load/store
* @param pos the control flow input of the block
*/
static
unsigned
update_exc
(
ldst_info_t
*
info
,
ir_node
*
block
,
int
pos
)
{
...
...
@@ -165,7 +169,7 @@ static unsigned update_exc(ldst_info_t *info, ir_node *block, int pos)
/**
* walker, collects all Load/Store/Proj nodes
*
* walks f
o
rm Start -> End
* walks fr
o
m Start -> End
*/
static
void
collect_nodes
(
ir_node
*
node
,
void
*
env
)
{
...
...
@@ -233,9 +237,9 @@ static void collect_nodes(ir_node *node, void *env)
}
}
else
if
(
op
==
op_Block
)
{
/* check, if it's an exception block */
int
i
,
n
;
int
i
;
for
(
i
=
0
,
n
=
get_Block_n_cfgpreds
(
node
)
;
i
<
n
;
++
i
)
{
for
(
i
=
get_Block_n_cfgpreds
(
node
)
-
1
;
i
>=
0
;
--
i
)
{
ir_node
*
pred_block
;
block_info_t
*
bl_info
;
...
...
@@ -250,7 +254,7 @@ static void collect_nodes(ir_node *node, void *env)
if
(
is_fragile_op
(
pred
))
bl_info
->
flags
|=
BLOCK_HAS_EXC
;
else
if
(
is_forking
_op
(
pred
))
else
if
(
is_
irn_
forking
(
pred
))
bl_info
->
flags
|=
BLOCK_HAS_COND
;
if
(
get_irn_op
(
pred
)
==
op_Load
||
get_irn_op
(
pred
)
==
op_Store
)
{
...
...
@@ -746,10 +750,10 @@ static unsigned optimize_store(ir_node *store)
* \ | / Str
* Phi
*
* This re
mov
es the number of stores and allows for predicated execution.
* Moves Stores back to the end of a function which may be bad
* This re
duc
es the number of stores and allows for predicated execution.
* Moves Stores back to the end of a function which may be bad
.
*
*
I
s only
allowed
if the predecessor blocks have only one successor.
*
This i
s only
possible
if the predecessor blocks have only one successor.
*/
static
unsigned
optimize_phi
(
ir_node
*
phi
,
void
*
env
)
{
...
...
@@ -781,7 +785,7 @@ static unsigned optimize_phi(ir_node *phi, void *env)
if
(
is_Block_dead
(
get_nodes_block
(
store
)))
return
0
;
/* check if the block has only one
output
*/
/* check if the block has only one
successor
*/
bl_info
=
get_irn_link
(
get_nodes_block
(
store
));
if
(
bl_info
->
flags
)
return
0
;
...
...
@@ -811,7 +815,7 @@ static unsigned optimize_phi(ir_node *phi, void *env)
if
(
is_Block_dead
(
get_nodes_block
(
store
)))
return
0
;
/* check if the block has only one
output
*/
/* check if the block has only one
successor
*/
bl_info
=
get_irn_link
(
get_nodes_block
(
store
));
if
(
bl_info
->
flags
)
return
0
;
...
...
@@ -885,7 +889,7 @@ static unsigned optimize_phi(ir_node *phi, void *env)
res
|=
CF_CHANGED
;
}
/* sixt step: replace old Phi */
/* sixt
h
step: replace old Phi */
exchange
(
phi
,
projM
);
return
res
|
DF_CHANGED
;
...
...
Write
Preview
Supports
Markdown
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