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
6c165ecb
Commit
6c165ecb
authored
Dec 02, 2004
by
Michael Beck
Browse files
fixed config.h include
used xmalloc instead of malloc [r4553]
parent
c6f33d8e
Changes
9
Hide whitespace changes
Inline
Side-by-side
ir/ana/callgraph.c
View file @
6c165ecb
...
...
@@ -9,8 +9,16 @@
* Copyright: (c) 2004 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
#include <stdlib.h>
#include "callgraph.h"
#include "irloop_t.h"
...
...
ir/ana/cgana.c
View file @
6c165ecb
...
...
@@ -18,13 +18,17 @@
*
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
# include "config.h"
#endif
#ifdef HAVE_STRING_H
# include <string.h>
#endif
#include <stdlib.h>
#include "cgana.h"
#include "rta.h"
#include "xmalloc.h"
#include "irnode_t.h"
#include "irmode_t.h"
#include "irprog_t.h"
...
...
@@ -832,7 +836,7 @@ void cgana(int *length, entity ***free_methods) {
/* Convert the flexible array to an array that can be handled
by standard C. */
p
=
(
entity
**
)
malloc
(
sizeof
(
*
p
)
*
ARR_LEN
(
free_meths
));
p
=
(
entity
**
)
x
malloc
(
sizeof
(
*
p
)
*
ARR_LEN
(
free_meths
));
memcpy
(
p
,
free_meths
,
ARR_LEN
(
free_meths
)
*
sizeof
(
*
p
));
*
length
=
ARR_LEN
(
free_meths
);
...
...
ir/ana/execution_frequency.c
View file @
6c165ecb
...
...
@@ -9,6 +9,9 @@
* Copyright: (c) 2004 Universitt Karlsruhe
* Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "execution_frequency.h"
...
...
ir/ana/interval_analysis.c
View file @
6c165ecb
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "interval_analysis.h"
...
...
ir/ana/ircfscc.c
View file @
6c165ecb
...
...
@@ -17,7 +17,9 @@
#include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "irloop_t.h"
#include "irnode_t.h"
...
...
ir/ana/irdom.c
View file @
6c165ecb
...
...
@@ -14,8 +14,13 @@
#include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "irouts.h"
#include "xmalloc.h"
#include "irgwalk.h"
#include "irdom_t.h"
#include "irgraph_t.h"
/* To access state field. */
...
...
@@ -181,7 +186,8 @@ void compute_doms(ir_graph *irg) {
irg_block_walk
(
get_irg_end
(
current_ir_graph
),
count_and_init_blocks
,
NULL
,
&
n_blocks
);
/* Memory for temporary information. */
tdi_list
=
(
tmp_dom_info
*
)
calloc
(
n_blocks
,
sizeof
(
tmp_dom_info
));
tdi_list
=
xmalloc
(
n_blocks
*
sizeof
(
tmp_dom_info
));
memset
(
tdi_list
,
0
,
n_blocks
*
sizeof
(
tmp_dom_info
));
/* We need the out datastructure. */
if
(
current_ir_graph
->
outs_state
!=
outs_consistent
)
...
...
ir/ana/irouts.c
View file @
6c165ecb
...
...
@@ -19,17 +19,20 @@
* Authors: Goetz Lindenmaier
*/
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/* defined HAVE_CONFIG_H */
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include "xmalloc.h"
#include "irouts.h"
#include "irnode_t.h"
#include "irgraph_t.h"
#include "irprog_t.h"
#include "irgwalk.h"
#include "string.h"
#ifdef DEBUG_libfirm
/* Note: ir_node.out_valid and ir_graph.n_outs are only present when DEBUG_libfirm is defined */
...
...
@@ -467,7 +470,7 @@ void compute_ip_outs(void) {
}
global_count
=
n_out_edges
=
count_ip_outs
();
out_edges
=
(
ir_node
**
)
malloc
(
n_out_edges
*
sizeof
(
ir_node
*
));
out_edges
=
(
ir_node
**
)
x
malloc
(
n_out_edges
*
sizeof
(
ir_node
*
));
set_irp_ip_outedges
(
out_edges
);
set_ip_outs
();
}
...
...
ir/ana/irscc.c
View file @
6c165ecb
...
...
@@ -17,7 +17,11 @@
#include "config.h"
#endif
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#include <stdlib.h>
#include "irloop_t.h"
...
...
ir/ana/rta.c
View file @
6c165ecb
...
...
@@ -14,7 +14,7 @@
#ifdef HAVE_CONFIG_H
# include
<
config.h
>
# include
"
config.h
"
#endif
#include "rta.h"
...
...
@@ -531,6 +531,10 @@ void rta_report (void)
/*
* $Log$
* Revision 1.30 2004/12/02 16:16:11 beck
* fixed config.h include
* used xmalloc instead of malloc
*
* Revision 1.29 2004/11/11 13:28:08 goetz
* made pseudo irg aware
*
...
...
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