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
9fe9c20a
Commit
9fe9c20a
authored
Dec 02, 2004
by
Michael Beck
Browse files
fixed config.h include
used xmalloc instead of malloc [r4558]
parent
6c5692ca
Changes
19
Hide whitespace changes
Inline
Side-by-side
ir/ir/ircgcons.c
View file @
9fe9c20a
...
...
@@ -11,10 +11,13 @@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <stdbool.h>
#include "ircgcons.h"
...
...
ir/ir/ircgopt.c
View file @
9fe9c20a
...
...
@@ -16,7 +16,7 @@
* Aufrufrelation bestimmt.
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#include "ircgopt.h"
...
...
ir/ir/ircons.c
View file @
9fe9c20a
...
...
@@ -12,7 +12,17 @@
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
# include "irgraph_t.h"
...
...
@@ -25,8 +35,6 @@
# include "iropt_t.h"
# include "irgmod.h"
# include "array.h"
/* memset belongs to string.h */
# include "string.h"
# include "irbackedge_t.h"
# include "irflag_t.h"
...
...
ir/ir/irdump.c
View file @
9fe9c20a
...
...
@@ -9,10 +9,16 @@
* Copyright: (c) 1998-2003 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdarg.h>
#include "firm_common_t.h"
...
...
ir/ir/irdumptxt.c
View file @
9fe9c20a
/*
* Project: libFIRM
* File name: ir/ir/irdump.c
* File name: ir/ir/irdump
txt
.c
* Purpose: Write vcg representation of firm to file.
* Author: Martin Trapp, Christian Schaefer
* Modified by: Goetz Lindenmaier, Hubert Schmidt
...
...
@@ -9,9 +9,17 @@
* Copyright: (c) 1998-2003 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include <stdarg.h>
#include "irdump_t.h"
...
...
ir/ir/irflag.c
View file @
9fe9c20a
...
...
@@ -11,7 +11,7 @@
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#include "firm_common.h"
...
...
ir/ir/irgmod.c
View file @
9fe9c20a
...
...
@@ -11,7 +11,7 @@
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
# include "irvrfy.h"
...
...
ir/ir/irgopt.c
View file @
9fe9c20a
...
...
@@ -12,11 +12,10 @@
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#include <assert.h>
#include <stdbool.h>
#include "irnode_t.h"
#include "irgraph_t.h"
...
...
@@ -32,6 +31,7 @@
#include "pset.h"
#include "eset.h"
#include "pdeq.h"
/* Fuer code placement */
#include "xmalloc.h"
#include "irouts.h"
#include "irloop_t.h"
...
...
@@ -907,8 +907,8 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
arity
=
get_irn_arity
(
end_bl
);
/* arity = n_exc + n_ret */
n_res
=
get_method_n_ress
(
get_Call_type
(
call
));
res_pred
=
(
ir_node
**
)
malloc
(
n_res
*
sizeof
(
ir_node
*
));
cf_pred
=
(
ir_node
**
)
malloc
(
arity
*
sizeof
(
ir_node
*
));
res_pred
=
(
ir_node
**
)
x
malloc
(
n_res
*
sizeof
(
ir_node
*
));
cf_pred
=
(
ir_node
**
)
x
malloc
(
arity
*
sizeof
(
ir_node
*
));
set_irg_current_block
(
current_ir_graph
,
post_bl
);
/* just to make sure */
...
...
@@ -1039,7 +1039,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
}
main_end_bl
=
get_irg_end_block
(
current_ir_graph
);
main_end_bl_arity
=
get_irn_arity
(
main_end_bl
);
end_preds
=
(
ir_node
**
)
malloc
((
n_exc
+
main_end_bl_arity
)
*
sizeof
(
ir_node
*
));
end_preds
=
(
ir_node
**
)
x
malloc
((
n_exc
+
main_end_bl_arity
)
*
sizeof
(
ir_node
*
));
for
(
i
=
0
;
i
<
main_end_bl_arity
;
++
i
)
end_preds
[
i
]
=
get_irn_n
(
main_end_bl
,
i
);
...
...
@@ -1083,7 +1083,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
if (i < get_Block_n_cfgpreds(end_bl)) {
bl = get_nodes_block(cf_op);
arity = get_Block_n_cfgpreds(end_bl) + get_Block_n_cfgpreds(bl) - 1;
cf_pred = (ir_node **) malloc (arity * sizeof (ir_node *));
cf_pred = (ir_node **)
x
malloc (arity * sizeof (ir_node *));
for (j = 0; j < i; j++)
cf_pred[j] = get_Block_cfgpred(end_bl, j);
for (j = j; j < i + get_Block_n_cfgpreds(bl); j++)
...
...
@@ -1215,7 +1215,7 @@ typedef struct {
}
inline_irg_env
;
static
inline_irg_env
*
new_inline_irg_env
(
void
)
{
inline_irg_env
*
env
=
malloc
(
sizeof
(
inline_irg_env
));
inline_irg_env
*
env
=
x
malloc
(
sizeof
(
inline_irg_env
));
env
->
n_nodes
=
-
2
;
/* uncount Start, End */
env
->
n_nodes_orig
=
-
2
;
/* uncount Start, End */
env
->
call_nodes
=
eset_create
();
...
...
ir/ir/irgraph.c
View file @
9fe9c20a
...
...
@@ -11,11 +11,14 @@
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
# include "xmalloc.h"
# include "ircons.h"
# include "irgraph_t.h"
# include "irprog_t.h"
...
...
@@ -86,7 +89,7 @@ new_r_ir_graph (entity *ent, int n_loc)
ir_node
*
first_block
;
ir_node
*
projX
;
res
=
(
ir_graph
*
)
malloc
(
sizeof
(
ir_graph
));
res
=
(
ir_graph
*
)
x
malloc
(
sizeof
(
ir_graph
));
memset
(
res
,
0
,
sizeof
(
ir_graph
));
res
->
kind
=
k_ir_graph
;
...
...
@@ -195,7 +198,7 @@ ir_graph *new_const_code_irg(void) {
ir_graph
*
res
;
ir_node
*
projX
;
res
=
(
ir_graph
*
)
malloc
(
sizeof
(
*
res
));
res
=
(
ir_graph
*
)
x
malloc
(
sizeof
(
*
res
));
memset
(
res
,
0
,
sizeof
(
*
res
));
/* inform statistics here, as blocks will be already build on this graph */
...
...
ir/ir/irgwalk.c
View file @
9fe9c20a
...
...
@@ -11,17 +11,21 @@
*/
/**
* traverse an ir graph
* - execute the pre function before recursion
* - execute the post function after recursion
*/
* @file irgwalk.c
*
* traverse an ir graph
* - execute the pre function before recursion
* - execute the post function after recursion
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#include <stdlib.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#include "irnode_t.h"
#include "irgraph_t.h"
/* visited flag */
...
...
ir/ir/irgwalk_blk.c
View file @
9fe9c20a
...
...
@@ -10,7 +10,7 @@
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#include "irnode_t.h"
...
...
ir/ir/irmode.c
View file @
9fe9c20a
...
...
@@ -9,16 +9,18 @@
* Copyright: (c) 1998-2003 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
# include <stddef.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
# include <stdbool.h>
#endif
# include <stddef.h>
# include "irmode_t.h"
# include "ident.h"
...
...
ir/ir/irnode.c
View file @
9fe9c20a
...
...
@@ -11,9 +11,12 @@
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
# include "config.h"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#include <string.h>
#include "ident.h"
#include "irnode_t.h"
...
...
ir/ir/irop.c
View file @
9fe9c20a
...
...
@@ -11,10 +11,12 @@
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
# include "irop_t.h"
# include "irnode_t.h"
...
...
ir/ir/iropt.c
View file @
9fe9c20a
...
...
@@ -11,7 +11,17 @@
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
#endif
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
# include "irnode_t.h"
...
...
ir/ir/irprintf.c
View file @
9fe9c20a
...
...
@@ -18,12 +18,15 @@
*/
#ifdef HAVE_CONFIG_H
#include
<
config.h
>
#include
"
config.h
"
#endif
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#include "ident.h"
#include "irmode_t.h"
...
...
ir/ir/irprog.c
View file @
9fe9c20a
...
...
@@ -11,10 +11,12 @@
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
# include "irprog_t.h"
# include "irgraph_t.h"
...
...
@@ -58,7 +60,7 @@ INLINE void remove_irp_type_from_list (type *typ) {
ir_prog
*
new_ir_prog
(
void
)
{
ir_prog
*
res
;
res
=
(
ir_prog
*
)
malloc
(
sizeof
(
ir_prog
));
res
=
(
ir_prog
*
)
x
malloc
(
sizeof
(
ir_prog
));
memset
(
res
,
0
,
sizeof
(
res
));
irp
=
res
;
/* res->obst = (struct obstack *) xmalloc (sizeof (struct obstack)); */
...
...
ir/ir/irreflect.c
View file @
9fe9c20a
...
...
@@ -6,10 +6,19 @@
*
* $Id$
*/
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
#define obstack_chunk_alloc malloc
#define obstack_chunk_free free
...
...
ir/ir/irvrfy.c
View file @
9fe9c20a
...
...
@@ -11,7 +11,7 @@
*/
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
# include "irprog.h"
...
...
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