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
cf4139d8
Commit
cf4139d8
authored
May 18, 2013
by
yb9976
Browse files
Improved dca transfer function for Shr and Shrs.
parent
ff8ad9ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ana/dca.c
View file @
cf4139d8
...
...
@@ -56,6 +56,12 @@ static void care_for(ir_node *irn, ir_tarval *care, pdeq *q)
}
}
/* Creates a bit mask that have the lsb and all more significant bits set. */
static
ir_tarval
*
create_lsb_mask
(
ir_tarval
*
tv
)
{
return
tarval_or
(
tv
,
tarval_neg
(
tv
));
}
/* Creates a bit mask that have the msb and all less significant bits set. */
static
ir_tarval
*
create_msb_mask
(
ir_tarval
*
tv
)
{
...
...
@@ -214,8 +220,9 @@ static void dca_transfer(ir_node *irn, pdeq *q)
care_for
(
left
,
get_tarval_min
(
mode
),
q
);
}
else
care_for
(
left
,
0
,
q
);
care_for
(
left
,
create_lsb_mask
(
care
)
,
q
);
// TODO Consider modulo shift
care_for
(
right
,
0
,
q
);
return
;
...
...
@@ -229,6 +236,7 @@ static void dca_transfer(ir_node *irn, pdeq *q)
else
care_for
(
left
,
create_msb_mask
(
care
),
q
);
// TODO Consider modulo shift
care_for
(
right
,
0
,
q
);
return
;
...
...
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