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
3cda7b99
Commit
3cda7b99
authored
Dec 04, 2012
by
Christoph Mallon
Browse files
benode: Remove the parameter irg from be_new_Call().
Infer it from block.
parent
711f1f9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
ir/be/beabi.c
View file @
3cda7b99
...
...
@@ -541,14 +541,14 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
throws_exception
=
ir_throws_exception
(
irn
);
if
(
env
->
call
->
flags
.
call_has_imm
&&
is_SymConst
(
call_ptr
))
{
/* direct call */
low_call
=
be_new_Call
(
dbgi
,
irg
,
bl
,
curr_mem
,
sp
->
single_req
,
curr_sp
,
low_call
=
be_new_Call
(
dbgi
,
bl
,
curr_mem
,
sp
->
single_req
,
curr_sp
,
sp
->
single_req
,
curr_sp
,
n_reg_results
+
pn_be_Call_first_res
+
ARR_LEN
(
destroyed_regs
),
n_ins
,
in
,
get_Call_type
(
irn
));
be_Call_set_entity
(
low_call
,
get_SymConst_entity
(
call_ptr
));
}
else
{
/* indirect call */
low_call
=
be_new_Call
(
dbgi
,
irg
,
bl
,
curr_mem
,
sp
->
single_req
,
curr_sp
,
low_call
=
be_new_Call
(
dbgi
,
bl
,
curr_mem
,
sp
->
single_req
,
curr_sp
,
sp
->
reg_class
->
class_req
,
call_ptr
,
n_reg_results
+
pn_be_Call_first_res
+
ARR_LEN
(
destroyed_regs
),
n_ins
,
in
,
get_Call_type
(
irn
));
...
...
ir/be/benode.c
View file @
3cda7b99
...
...
@@ -470,14 +470,13 @@ void be_Keep_add_node(ir_node *keep, const arch_register_class_t *cls, ir_node *
add_register_req_in
(
keep
,
cls
->
class_req
);
}
ir_node
*
be_new_Call
(
dbg_info
*
dbg
,
ir_graph
*
irg
,
ir_node
*
bl
,
ir_node
*
mem
,
ir_node
*
be_new_Call
(
dbg_info
*
dbg
,
ir_node
*
bl
,
ir_node
*
mem
,
const
arch_register_req_t
*
sp_req
,
ir_node
*
sp
,
const
arch_register_req_t
*
ptr_req
,
ir_node
*
ptr
,
int
n_outs
,
int
n
,
ir_node
*
in
[],
ir_type
*
call_tp
)
{
be_call_attr_t
*
a
;
int
real_n
=
n_be_Call_first_arg
+
n
;
ir_node
*
irn
;
ir_node
**
real_in
;
NEW_ARR_A
(
ir_node
*
,
real_in
,
real_n
);
...
...
@@ -486,7 +485,8 @@ ir_node *be_new_Call(dbg_info *dbg, ir_graph *irg, ir_node *bl, ir_node *mem,
real_in
[
n_be_Call_ptr
]
=
ptr
;
memcpy
(
&
real_in
[
n_be_Call_first_arg
],
in
,
n
*
sizeof
(
in
[
0
]));
irn
=
new_ir_node
(
dbg
,
irg
,
bl
,
op_be_Call
,
mode_T
,
real_n
,
real_in
);
ir_graph
*
const
irg
=
get_Block_irg
(
bl
);
ir_node
*
const
irn
=
new_ir_node
(
dbg
,
irg
,
bl
,
op_be_Call
,
mode_T
,
real_n
,
real_in
);
init_node_attr
(
irn
,
real_n
,
n_outs
);
a
=
(
be_call_attr_t
*
)
get_irn_generic_attr
(
irn
);
a
->
ent
=
NULL
;
...
...
ir/be/benode.h
View file @
3cda7b99
...
...
@@ -294,7 +294,6 @@ typedef enum {
* Construct a new be_Call.
*
* @param dbg debug info
* @param irg the graph where the call is placed
* @param block the block where the call is placed
* @param mem the memory input of the call
* @param sp the stack pointer input of the call
...
...
@@ -305,7 +304,7 @@ typedef enum {
* @param in the (register) inputs of this call
* @param call_tp the call type of this call
*/
ir_node
*
be_new_Call
(
dbg_info
*
dbg
,
ir_graph
*
irg
,
ir_node
*
block
,
ir_node
*
mem
,
ir_node
*
be_new_Call
(
dbg_info
*
dbg
,
ir_node
*
block
,
ir_node
*
mem
,
const
arch_register_req_t
*
sp_req
,
ir_node
*
sp
,
const
arch_register_req_t
*
ptr_req
,
ir_node
*
ptr
,
int
n_outs
,
int
n
,
ir_node
*
in
[],
ir_type
*
call_tp
);
...
...
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