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
5d9cd796
Commit
5d9cd796
authored
Apr 20, 2011
by
Andreas Zwinkau
Browse files
Refactoring
* removed unnecessary call_tp variable * removed shadowed tp variable (twice)
parent
78a6f037
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/lower/lower_dw.c
View file @
5d9cd796
...
...
@@ -1678,7 +1678,6 @@ static void lower_Start(ir_node *node, ir_mode *mode, lower_env_t *env)
static
void
lower_Call
(
ir_node
*
node
,
ir_mode
*
mode
,
lower_env_t
*
env
)
{
ir_type
*
tp
=
get_Call_type
(
node
);
ir_type
*
call_tp
;
ir_node
**
in
,
*
proj
,
*
results
;
size_t
n_params
,
n_res
;
bool
need_lower
=
false
;
...
...
@@ -1687,14 +1686,12 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env)
long
*
res_numbers
=
NULL
;
(
void
)
mode
;
call_tp
=
tp
;
n_params
=
get_method_n_params
(
call_tp
);
n_params
=
get_method_n_params
(
tp
);
for
(
p
=
0
;
p
<
n_params
;
++
p
)
{
ir_type
*
tp
=
get_method_param_type
(
call_
tp
,
p
);
ir_type
*
p
tp
=
get_method_param_type
(
tp
,
p
);
if
(
is_Primitive_type
(
tp
))
{
ir_mode
*
mode
=
get_type_mode
(
tp
);
if
(
is_Primitive_type
(
p
tp
))
{
ir_mode
*
mode
=
get_type_mode
(
p
tp
);
if
(
mode
==
env
->
high_signed
||
mode
==
env
->
high_unsigned
)
{
need_lower
=
true
;
...
...
@@ -1702,16 +1699,16 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env)
}
}
}
n_res
=
get_method_n_ress
(
call_
tp
);
n_res
=
get_method_n_ress
(
tp
);
if
(
n_res
>
0
)
{
NEW_ARR_A
(
long
,
res_numbers
,
n_res
);
for
(
i
=
j
=
0
;
i
<
n_res
;
++
i
,
++
j
)
{
ir_type
*
tp
=
get_method_res_type
(
call_
tp
,
i
);
ir_type
*
p
tp
=
get_method_res_type
(
tp
,
i
);
res_numbers
[
i
]
=
j
;
if
(
is_Primitive_type
(
tp
))
{
ir_mode
*
mode
=
get_type_mode
(
tp
);
if
(
is_Primitive_type
(
p
tp
))
{
ir_mode
*
mode
=
get_type_mode
(
p
tp
);
if
(
mode
==
env
->
high_signed
||
mode
==
env
->
high_unsigned
)
{
need_lower
=
true
;
...
...
@@ -1725,10 +1722,10 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env)
return
;
/* let's lower it */
call_
tp
=
lower_mtp
(
env
,
call_
tp
);
set_Call_type
(
node
,
call_
tp
);
tp
=
lower_mtp
(
env
,
tp
);
set_Call_type
(
node
,
tp
);
NEW_ARR_A
(
ir_node
*
,
in
,
get_method_n_params
(
call_
tp
)
+
2
);
NEW_ARR_A
(
ir_node
*
,
in
,
get_method_n_params
(
tp
)
+
2
);
in
[
0
]
=
get_Call_mem
(
node
);
in
[
1
]
=
get_Call_ptr
(
node
);
...
...
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