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
5e6af0de
Commit
5e6af0de
authored
Jan 03, 2013
by
Christoph Mallon
Browse files
ia32: Simplify test, whether a Copy copies a GP value.
parent
0e716f5d
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/be/ia32/ia32_optimize.c
View file @
5e6af0de
...
...
@@ -497,18 +497,6 @@ static void peephole_IncSP_Store_to_push(ir_node *irn)
be_set_IncSP_offset
(
irn
,
inc_ofs
);
}
/**
* Return true if a mode can be stored in the GP register set
*/
static
inline
int
mode_needs_gp_reg
(
ir_mode
*
mode
)
{
if
(
mode
==
ia32_mode_fpcw
)
return
0
;
if
(
get_mode_size_bits
(
mode
)
>
32
)
return
0
;
return
mode_is_int
(
mode
)
||
mode_is_reference
(
mode
)
||
mode
==
mode_b
;
}
/**
* Tries to create Pops from Load, IncSP combinations.
* The Loads are replaced by Pops, the IncSP is modified
...
...
@@ -544,11 +532,11 @@ static void peephole_Load_IncSP_to_pop(ir_node *irn)
/* it has to be a Load */
if
(
!
is_ia32_Load
(
node
))
{
if
(
be_is_Copy
(
node
))
{
if
(
!
mode_needs_gp_reg
(
get_irn_mode
(
node
)))
{
dreg
=
arch_get_irn_register
(
node
);
if
(
dreg
->
reg_class
!=
&
ia32_reg_classes
[
CLASS_ia32_gp
])
{
/* not a GP copy, ignore */
continue
;
}
dreg
=
arch_get_irn_register
(
node
);
sreg
=
arch_get_irn_register
(
be_get_Copy_op
(
node
));
if
(
regmask
&
copymask
&
(
1
<<
sreg
->
index
))
{
break
;
...
...
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