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
5691afe5
Commit
5691afe5
authored
Jul 26, 2015
by
Christoph Mallon
Browse files
template: Transform Add(Address, Const) into a single template Const.
parent
c361c2a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/TEMPLATE/TEMPLATE_transform.c
View file @
5691afe5
...
...
@@ -109,6 +109,15 @@ static ir_node *gen_Add(ir_node *node)
if
(
mode_is_float
(
mode
))
{
return
transform_binop
(
node
,
new_bd_TEMPLATE_fAdd
);
}
ir_node
*
const
l
=
get_Add_left
(
node
);
ir_node
*
const
r
=
get_Add_right
(
node
);
if
(
is_Address
(
l
)
&&
is_Const
(
r
))
{
ir_entity
*
const
entity
=
get_Address_entity
(
l
);
ir_tarval
*
const
value
=
get_Const_tarval
(
r
);
return
transform_const
(
node
,
entity
,
value
);
}
return
transform_binop
(
node
,
new_bd_TEMPLATE_Add
);
}
...
...
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