Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
cd8b7a75
Commit
cd8b7a75
authored
Feb 27, 2010
by
Michael Beck
Browse files
- removed C99 features
- removed useless Id-node creation - reordered conditions from cheap to expensive [r27245]
parent
96bef462
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/iropt.c
View file @
cd8b7a75
...
...
@@ -2321,6 +2321,7 @@ static ir_node *transform_node_Add(ir_node *n)
{
ir_mode
*
mode
;
ir_node
*
a
,
*
b
,
*
c
,
*
oldn
=
n
;
vrp_attr
*
a_vrp
,
*
b_vrp
;
n
=
transform_node_AddSub
(
n
);
...
...
@@ -2412,11 +2413,9 @@ static ir_node *transform_node_Add(ir_node *n)
}
}
vrp_attr
*
a_vrp
,
*
b_vrp
;
a_vrp
=
vrp_get_info
(
a
);
b_vrp
=
vrp_get_info
(
b
);
if
(
a_vrp
&&
b_vrp
)
{
tarval
*
c
=
tarval_and
(
tarval_not
(
a_vrp
->
bits_not_set
),
...
...
@@ -3470,6 +3469,7 @@ static ir_node *transform_node_And(ir_node *n)
ir_node
*
a
=
get_And_left
(
n
);
ir_node
*
b
=
get_And_right
(
n
);
ir_mode
*
mode
;
vrp_attr
*
a_vrp
,
*
b_vrp
;
mode
=
get_irn_mode
(
n
);
HANDLE_BINOP_PHI
((
eval_func
)
tarval_and
,
a
,
b
,
c
,
mode
);
...
...
@@ -3590,21 +3590,17 @@ static ir_node *transform_node_And(ir_node *n)
return
n
;
}
vrp_attr
*
a_vrp
,
*
b_vrp
;
a_vrp
=
vrp_get_info
(
a
);
b_vrp
=
vrp_get_info
(
b
);
if
(
is_Const
(
a
)
&&
b_vrp
&&
(
tarval_is_all_one
(
tarval_or
(
get_Const_tarval
(
a
),
b_vrp
->
bits_not_set
))))
{
return
new_rd_Id
(
get_irn_dbg_info
(
n
),
get_nodes_block
(
n
),
b
,
get_irn_mode
(
n
));
if
(
b_vrp
&&
is_Const
(
a
)
&&
(
tarval_is_all_one
(
tarval_or
(
get_Const_tarval
(
a
),
b_vrp
->
bits_not_set
))))
{
return
b
;
}
if
(
is_Const
(
b
)
&&
a_vrp
&&
(
tarval_is_all_one
(
tarval_or
(
get_Const_tarval
(
b
),
a_vrp
->
bits_not_set
))))
{
return
new_rd_Id
(
get_irn_dbg_info
(
n
),
get_nodes_block
(
n
),
a
,
get_irn_mode
(
n
))
;
a_vrp
=
vrp_get_info
(
a
);
if
(
a_vrp
&&
is_Const
(
b
)
&&
(
tarval_is_all_one
(
tarval_or
(
get_Const_tarval
(
b
),
a_vrp
->
bits_not_set
))))
{
return
a
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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