Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
9828c0d9
Commit
9828c0d9
authored
Oct 30, 2014
by
Christoph Mallon
Browse files
all: Use MEMCPY().
parent
93d15208
Changes
5
Hide whitespace changes
Inline
Side-by-side
ir/ana/analyze_irg_args.c
View file @
9828c0d9
...
...
@@ -17,8 +17,8 @@
#include
"cgana.h"
#include
"irprog.h"
#include
"entity_t.h"
#include
"analyze_irg_args.h"
#include
"util.h"
/**
* Walk recursive the successors of a graph argument
...
...
@@ -196,8 +196,7 @@ static void analyze_ent_args(ir_entity *ent)
}
/* copy the temporary info */
memcpy
(
ent
->
attr
.
mtd_attr
.
param_access
,
rw_info
,
nparams
*
sizeof
(
ent
->
attr
.
mtd_attr
.
param_access
[
0
]));
MEMCPY
(
ent
->
attr
.
mtd_attr
.
param_access
,
rw_info
,
nparams
);
}
void
analyze_irg_args
(
ir_graph
*
irg
)
...
...
ir/be/beinfo.c
View file @
9828c0d9
...
...
@@ -21,6 +21,7 @@
#include
"irdump_t.h"
#include
"irhooks.h"
#include
"panic.h"
#include
"util.h"
static
copy_attr_func
old_phi_copy_attr
;
...
...
@@ -72,9 +73,8 @@ static void new_phi_copy_attr(ir_graph *irg, const ir_node *old_node,
backend_info_t
*
new_info
=
be_get_info
(
new_node
);
new_info
->
in_reqs
=
old_info
->
in_reqs
;
size_t
n_outs
=
arch_get_irn_n_outs
(
old_node
);
memcpy
(
new_info
->
out_infos
,
old_info
->
out_infos
,
n_outs
*
sizeof
(
old_info
->
out_infos
[
0
]));
size_t
const
n_outs
=
arch_get_irn_n_outs
(
old_node
);
MEMCPY
(
new_info
->
out_infos
,
old_info
->
out_infos
,
n_outs
);
old_phi_copy_attr
(
irg
,
old_node
,
new_node
);
}
...
...
ir/be/benode.c
View file @
9828c0d9
...
...
@@ -704,8 +704,7 @@ static void copy_attr(ir_graph *irg, const ir_node *old_node, ir_node *new_node)
}
else
{
new_info
->
in_reqs
=
OALLOCN
(
obst
,
const
arch_register_req_t
*
,
n_ins
);
}
memcpy
(
new_info
->
in_reqs
,
old_info
->
in_reqs
,
n_ins
*
sizeof
(
new_info
->
in_reqs
[
0
]));
MEMCPY
(
new_info
->
in_reqs
,
old_info
->
in_reqs
,
n_ins
);
}
else
{
new_info
->
in_reqs
=
NULL
;
}
...
...
ir/be/ia32/ia32_common_transform.c
View file @
9828c0d9
...
...
@@ -546,8 +546,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
const
arch_register_req_t
**
new_in_reg_reqs
=
OALLOCN
(
obst
,
const
arch_register_req_t
*
,
in_size
);
memcpy
(
new_in_reg_reqs
,
in_reg_reqs
,
n_ins
*
sizeof
(
new_in_reg_reqs
[
0
]));
MEMCPY
(
new_in_reg_reqs
,
in_reg_reqs
,
n_ins
);
ir_node
**
new_in
=
ALLOCANZ
(
ir_node
*
,
in_size
);
MEMCPY
(
new_in
,
in
,
n_ins
);
...
...
@@ -576,8 +575,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
out_size
*=
2
;
new_out_reg_reqs
=
OALLOCN
(
obst
,
const
arch_register_req_t
*
,
out_size
);
memcpy
(
new_out_reg_reqs
,
out_reg_reqs
,
out_arity
*
sizeof
(
new_out_reg_reqs
[
0
]));
MEMCPY
(
new_out_reg_reqs
,
out_reg_reqs
,
out_arity
);
out_reg_reqs
=
new_out_reg_reqs
;
}
...
...
@@ -595,8 +593,7 @@ ir_node *ia32_gen_ASM(ir_node *node)
out_size
=
out_arity
+
1
;
new_out_reg_reqs
=
OALLOCN
(
obst
,
const
arch_register_req_t
*
,
out_size
);
memcpy
(
new_out_reg_reqs
,
out_reg_reqs
,
out_arity
*
sizeof
(
new_out_reg_reqs
[
0
]));
MEMCPY
(
new_out_reg_reqs
,
out_reg_reqs
,
out_arity
);
out_reg_reqs
=
new_out_reg_reqs
;
}
...
...
ir/be/sparc/sparc_transform.c
View file @
9828c0d9
...
...
@@ -550,8 +550,7 @@ static ir_node *gen_ASM(ir_node *node)
out_size
=
n_outs
+
1
;
const
arch_register_req_t
**
new_out_reg_reqs
=
OALLOCN
(
obst
,
const
arch_register_req_t
*
,
out_size
);
memcpy
(
new_out_reg_reqs
,
out_reg_reqs
,
n_outs
*
sizeof
(
new_out_reg_reqs
[
0
]));
MEMCPY
(
new_out_reg_reqs
,
out_reg_reqs
,
n_outs
);
out_reg_reqs
=
new_out_reg_reqs
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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