summaryrefslogtreecommitdiffhomepage
path: root/ir/ana
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-02-17 07:14:48 +0100
committerMatthias Braun <matze@braunis.de>2017-02-17 08:07:41 +0100
commit06cb80c5b7f318fb1fc0caef3adcf84b9802df6c (patch)
tree72c596abcda06468ebe41d0038f520e10f19acc3 /ir/ana
parentd29ca3a0ba661b9826e126b407c1c9d6f5a81aa9 (diff)
Reorganize include directives
Diffstat (limited to 'ir/ana')
-rw-r--r--ir/ana/analyze_irg_args.c12
-rw-r--r--ir/ana/callgraph.c22
-rw-r--r--ir/ana/cdep.c13
-rw-r--r--ir/ana/cgana.c26
-rw-r--r--ir/ana/constbits.c3
-rw-r--r--ir/ana/dca.c7
-rw-r--r--ir/ana/dca.h6
-rw-r--r--ir/ana/dfs.c8
-rw-r--r--ir/ana/dfs.h1
-rw-r--r--ir/ana/dfs_t.h6
-rw-r--r--ir/ana/domfront.c6
-rw-r--r--ir/ana/execfreq.c31
-rw-r--r--ir/ana/heights.c9
-rw-r--r--ir/ana/irbackedge.c7
-rw-r--r--ir/ana/ircfscc.c12
-rw-r--r--ir/ana/irconsconfirm.c16
-rw-r--r--ir/ana/irdom.c19
-rw-r--r--ir/ana/irlivechk.c18
-rw-r--r--ir/ana/irloop.c4
-rw-r--r--ir/ana/irmemory.c21
-rw-r--r--ir/ana/irmemory_t.h3
-rw-r--r--ir/ana/irouts.c9
-rw-r--r--ir/ana/vrp.c19
23 files changed, 138 insertions, 140 deletions
diff --git a/ir/ana/analyze_irg_args.c b/ir/ana/analyze_irg_args.c
index 5c5da5c..bbd8fb1 100644
--- a/ir/ana/analyze_irg_args.c
+++ b/ir/ana/analyze_irg_args.c
@@ -8,17 +8,17 @@
* @brief read/write analyze of graph argument, which have mode reference.
* @author Beyhan Veliev
*/
-#include <stdlib.h>
+#include "analyze_irg_args.h"
-#include "irouts_t.h"
-#include "irnode_t.h"
-#include "irmode_t.h"
#include "array.h"
#include "cgana.h"
-#include "irprog.h"
#include "entity_t.h"
-#include "analyze_irg_args.h"
+#include "irmode_t.h"
+#include "irnode_t.h"
+#include "irouts_t.h"
+#include "irprog.h"
#include "util.h"
+#include <stdlib.h>
/**
* Walk recursive the successors of a graph argument
diff --git a/ir/ana/callgraph.c b/ir/ana/callgraph.c
index a6fc21a..2f4d884 100644
--- a/ir/ana/callgraph.c
+++ b/ir/ana/callgraph.c
@@ -9,25 +9,21 @@
* @author Goetz Lindenmaier
* @date 21.7.2004
*/
-#include <stdlib.h>
-
-#include "util.h"
#include "callgraph.h"
-#include "irloop_t.h"
-#include "irprog_t.h"
+#include "array.h"
+#include "cgana.h"
+#include "hashptr.h"
#include "irgraph_t.h"
+#include "irgwalk.h"
+#include "irloop_t.h"
#include "irnode_t.h"
-
-#include "cgana.h"
-
-#include "array.h"
+#include "irprog_t.h"
+#include "panic.h"
#include "pmap.h"
-#include "hashptr.h"
#include "raw_bitset.h"
-#include "panic.h"
-
-#include "irgwalk.h"
+#include "util.h"
+#include <stdlib.h>
static ir_visited_t master_cg_visited = 0;
diff --git a/ir/ana/cdep.c b/ir/ana/cdep.c
index bba58e8..714a1b1 100644
--- a/ir/ana/cdep.c
+++ b/ir/ana/cdep.c
@@ -8,18 +8,19 @@
* @brief Implementation of cdep
* @author Christoph Mallon
*/
-#include <assert.h>
-#include <stdlib.h>
+#include "cdep_t.h"
+
#include "irdom_t.h"
+#include "irdump.h"
#include "irgraph_t.h"
#include "irgwalk.h"
#include "irnode_t.h"
-#include "pmap.h"
+#include "irprintf.h"
#include "obst.h"
+#include "pmap.h"
#include "xmalloc.h"
-#include "cdep_t.h"
-#include "irprintf.h"
-#include "irdump.h"
+#include <assert.h>
+#include <stdlib.h>
typedef struct cdep_info {
pmap *cdep_map; /**< A map to find the list of all control dependence nodes for a block. */
diff --git a/ir/ana/cgana.c b/ir/ana/cgana.c
index 4968aa4..a12a4a0 100644
--- a/ir/ana/cgana.c
+++ b/ir/ana/cgana.c
@@ -17,25 +17,23 @@
* the program directly, or they are visible external.
*/
#include "cgana.h"
-#include "xmalloc.h"
-#include "irnode_t.h"
-#include "irmode_t.h"
-#include "irprog_t.h"
-#include "irgwalk.h"
+
+#include "array.h"
+#include "dbginfo_t.h"
#include "ircons.h"
+#include "irdump.h"
+#include "irflag_t.h"
#include "irgmod.h"
+#include "irgwalk.h"
+#include "irmode_t.h"
+#include "irnode_t.h"
#include "iropt.h"
-#include "irtools.h"
-
-#include "irflag_t.h"
-#include "dbginfo_t.h"
#include "iropt_dbg.h"
-
-#include "pmap.h"
-#include "array.h"
+#include "irprog_t.h"
+#include "irtools.h"
#include "panic.h"
-
-#include "irdump.h"
+#include "pmap.h"
+#include "xmalloc.h"
/* unambiguous address used as a mark. */
static void *MARK = &MARK;
diff --git a/ir/ana/constbits.c b/ir/ana/constbits.c
index 2a0328d..2fb70c9 100644
--- a/ir/ana/constbits.c
+++ b/ir/ana/constbits.c
@@ -10,14 +10,13 @@
*/
#include "constbits.h"
-#include <assert.h>
-
#include "debug.h"
#include "iredges_t.h"
#include "irgwalk.h"
#include "irnode_t.h"
#include "irnodemap.h"
#include "iropt.h"
+#include <assert.h>
#ifndef VERIFY_CONSTBITS
# ifdef DEBUG_libfirm
diff --git a/ir/ana/dca.c b/ir/ana/dca.c
index adf01e6..15a9e15 100644
--- a/ir/ana/dca.c
+++ b/ir/ana/dca.c
@@ -16,13 +16,14 @@
* for an improved Conv optimization. It also allows finding
* additional constants (vrp->z ^ vrp->o & dc == 0).
*/
+#include "dca.h"
+
#include "constbits.h"
#include "debug.h"
+#include "irgwalk.h"
#include "irnode_t.h"
-#include "tv.h"
#include "pdeq.h"
-#include "irgwalk.h"
-#include "dca.h"
+#include "tv.h"
DEBUG_ONLY(static firm_dbg_module_t *dbg;)
diff --git a/ir/ana/dca.h b/ir/ana/dca.h
index bed8410..071d774 100644
--- a/ir/ana/dca.h
+++ b/ir/ana/dca.h
@@ -1,5 +1,7 @@
-#ifndef DCA_H
-#define DCA_H
+#ifndef IR_ANA_DCA_H
+#define IR_ANA_DCA_H
+
+#include "firm_types.h"
/**
* Compute don't care bits.
diff --git a/ir/ana/dfs.c b/ir/ana/dfs.c
index 677b63d..765b923 100644
--- a/ir/ana/dfs.c
+++ b/ir/ana/dfs.c
@@ -11,19 +11,19 @@
*
* Simple depth first search on CFGs.
*/
-#include <stdlib.h>
+#include "dfs_t.h"
#define DISABLE_STATEV
-#include <assert.h>
+#include "irdom_t.h"
#include "iredges_t.h"
#include "irgraph_t.h"
#include "irprintf.h"
-#include "irdom_t.h"
#include "set.h"
#include "statev_t.h"
-#include "dfs_t.h"
#include "util.h"
+#include <assert.h>
+#include <stdlib.h>
static int cmp_edge(const void *a, const void *b, size_t sz)
{
diff --git a/ir/ana/dfs.h b/ir/ana/dfs.h
index 2508f22..f786f21 100644
--- a/ir/ana/dfs.h
+++ b/ir/ana/dfs.h
@@ -15,6 +15,7 @@
#define FIRM_ANA_DFS_H
#include "firm_types.h"
+#include <stdio.h>
typedef struct dfs_t dfs_t;
typedef struct dfs_node_t dfs_node_t;
diff --git a/ir/ana/dfs_t.h b/ir/ana/dfs_t.h
index 18e878c..13a4f2b 100644
--- a/ir/ana/dfs_t.h
+++ b/ir/ana/dfs_t.h
@@ -14,9 +14,11 @@
#ifndef FIRM_ANA_DFS_T_H
#define FIRM_ANA_DFS_T_H
-#include <stdbool.h>
-#include "hashptr.h"
#include "dfs.h"
+#include "hashptr.h"
+#include "set.h"
+#include <stdbool.h>
+#include <string.h>
#define dfs_get_n_nodes(dfs) ((dfs)->pre_num)
#define dfs_get_pre_num(dfs, node) (_dfs_get_node((dfs), (node))->pre_num)
diff --git a/ir/ana/domfront.c b/ir/ana/domfront.c
index 3bc2194..66e99e7 100644
--- a/ir/ana/domfront.c
+++ b/ir/ana/domfront.c
@@ -9,11 +9,11 @@
* @author Sebastian Hack, Daniel Grund
* @date 04.05.2005
*/
-#include "obst.h"
-#include "pmap.h"
-#include "irdom.h"
#include "array.h"
+#include "irdom.h"
#include "iredges_t.h"
+#include "obst.h"
+#include "pmap.h"
/**
* A wrapper for get_Block_idom.
diff --git a/ir/ana/execfreq.c b/ir/ana/execfreq.c
index 73ebb98..ca54c76 100644
--- a/ir/ana/execfreq.c
+++ b/ir/ana/execfreq.c
@@ -25,30 +25,27 @@
* execution frequencies). We alleviate that by adding artificial edges from
* kept blocks with a path to end.
*/
-#include <stdio.h>
-#include <string.h>
-#include <math.h>
+#include "execfreq_t.h"
+#include "dfs_t.h"
#include "gaussjordan.h"
-
-#include "set.h"
#include "hashptr.h"
-#include "dfs_t.h"
-#include "panic.h"
-#include "xmalloc.h"
-
-#include "irprog_t.h"
+#include "iredges_t.h"
#include "irgraph_t.h"
-#include "irnode_t.h"
-#include "irloop.h"
#include "irgwalk.h"
-#include "iredges_t.h"
-#include "irouts.h"
-#include "util.h"
#include "irhooks.h"
+#include "irloop.h"
+#include "irnode_t.h"
#include "irnodehashmap.h"
-
-#include "execfreq_t.h"
+#include "irouts.h"
+#include "irprog_t.h"
+#include "panic.h"
+#include "set.h"
+#include "util.h"
+#include "xmalloc.h"
+#include <math.h>
+#include <stdio.h>
+#include <string.h>
#define EPSILON 1e-5
#define UNDEF(x) (fabs(x) < EPSILON)
diff --git a/ir/ana/heights.c b/ir/ana/heights.c
index 35a25e9..d212623 100644
--- a/ir/ana/heights.c
+++ b/ir/ana/heights.c
@@ -11,16 +11,15 @@
*/
#include "heights.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdbool.h>
-
#include "irdump.h"
+#include "iredges_t.h"
#include "irgwalk.h"
#include "irnodemap.h"
-#include "iredges_t.h"
#include "list.h"
#include "util.h"
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
struct ir_heights_t {
ir_nodemap data;
diff --git a/ir/ana/irbackedge.c b/ir/ana/irbackedge.c
index 8949bbb..86ac780 100644
--- a/ir/ana/irbackedge.c
+++ b/ir/ana/irbackedge.c
@@ -9,11 +9,12 @@
* @author Goetz Lindenmaier
* @date 7.2002
*/
-#include "irnode_t.h"
-#include "irgraph_t.h"
-#include "array.h"
#include "irbackedge_t.h"
+#include "array.h"
+#include "irgraph_t.h"
+#include "irnode_t.h"
+
/*--------------------------------------------------------------------*/
/* Backedge information. */
/*--------------------------------------------------------------------*/
diff --git a/ir/ana/ircfscc.c b/ir/ana/ircfscc.c
index 126a947..7045f66 100644
--- a/ir/ana/ircfscc.c
+++ b/ir/ana/ircfscc.c
@@ -11,15 +11,15 @@
* @author Goetz Lindenmaier
* @date 7.2002
*/
-#include "irloop_t.h"
-#include "irnode_t.h"
-#include "irgraph_t.h"
#include "array.h"
-#include "pmap.h"
+#include "ircons_t.h"
+#include "irdump.h"
+#include "irgraph_t.h"
#include "irgwalk.h"
+#include "irloop_t.h"
+#include "irnode_t.h"
#include "irprog_t.h"
-#include "irdump.h"
-#include "ircons_t.h"
+#include "pmap.h"
/** The outermost graph the scc is computed for */
static ir_graph *outermost_ir_graph;
diff --git a/ir/ana/irconsconfirm.c b/ir/ana/irconsconfirm.c
index d7ced6b..cb733a1 100644
--- a/ir/ana/irconsconfirm.c
+++ b/ir/ana/irconsconfirm.c
@@ -11,18 +11,18 @@
*/
#include "irconsconfirm.h"
-#include "irgraph_t.h"
-#include "irnode_t.h"
+#include "array.h"
+#include "debug.h"
#include "ircons_t.h"
-#include "irgmod.h"
-#include "iropt_dbg.h"
#include "iredges_t.h"
-#include "irgwalk.h"
+#include "irflag.h"
+#include "irgmod.h"
#include "irgopt.h"
+#include "irgraph_t.h"
+#include "irgwalk.h"
+#include "irnode_t.h"
+#include "iropt_dbg.h"
#include "irtools.h"
-#include "array.h"
-#include "debug.h"
-#include "irflag.h"
/**
* Walker environment.
diff --git a/ir/ana/irdom.c b/ir/ana/irdom.c
index fc06aec..fe79f85 100644
--- a/ir/ana/irdom.c
+++ b/ir/ana/irdom.c
@@ -9,19 +9,18 @@
* @author Goetz Lindenmaier, Michael Beck, Rubino Geiss
* @date 2.2002
*/
-#include <string.h>
-
-#include "util.h"
-#include "irouts_t.h"
-
-#include "xmalloc.h"
-#include "irgwalk.h"
#include "irdom_t.h"
-#include "irgraph_t.h"
-#include "irnode_t.h"
-#include "ircons_t.h"
+
#include "array.h"
+#include "ircons_t.h"
#include "iredges_t.h"
+#include "irgraph_t.h"
+#include "irgwalk.h"
+#include "irnode_t.h"
+#include "irouts_t.h"
+#include "util.h"
+#include "xmalloc.h"
+#include <string.h>
static inline ir_dom_info *get_dom_info(ir_node *block)
{
diff --git a/ir/ana/irlivechk.c b/ir/ana/irlivechk.c
index 4ff738a..8f83cc9 100644
--- a/ir/ana/irlivechk.c
+++ b/ir/ana/irlivechk.c
@@ -22,25 +22,23 @@
*
* The precomputation remains valid as long as the CFG is not altered.
*/
-#include <stdio.h>
+#include "irlivechk.h"
/* statev is expensive here, only enable when needed */
#define DISABLE_STATEV
+#include "bitset.h"
#include "debug.h"
+#include "dfs_t.h"
+#include "irdom.h"
+#include "irdump.h"
+#include "iredges_t.h"
+#include "irgraph_t.h"
#include "irgraph_t.h"
#include "irnode_t.h"
#include "irnodemap.h"
-#include "iredges_t.h"
-#include "irgraph_t.h"
-#include "irdom.h"
-#include "irdump.h"
-
-#include "dfs_t.h"
-#include "bitset.h"
-#include "irlivechk.h"
-
#include "statev_t.h"
+#include <stdio.h>
typedef struct bl_info_t {
const ir_node *block; /**< The block. */
diff --git a/ir/ana/irloop.c b/ir/ana/irloop.c
index 8f1c11d..062d8d9 100644
--- a/ir/ana/irloop.c
+++ b/ir/ana/irloop.c
@@ -9,10 +9,10 @@
* @author Goetz Lindenmaier
* @date 7.2002
*/
-#include <stdlib.h>
-
#include "irloop_t.h"
+
#include "irprog_t.h"
+#include <stdlib.h>
void add_loop_son(ir_loop *loop, ir_loop *son)
{
diff --git a/ir/ana/irmemory.c b/ir/ana/irmemory.c
index 054112f..38a8491 100644
--- a/ir/ana/irmemory.c
+++ b/ir/ana/irmemory.c
@@ -9,26 +9,25 @@
* @author Michael Beck
* @date 27.12.2006
*/
-#include <stdlib.h>
-#include <stdbool.h>
+#include "irmemory_t.h"
#include "adt/pmap.h"
-#include "irnode_t.h"
-#include "irgraph_t.h"
-#include "irprog_t.h"
-#include "irmemory_t.h"
-#include "irmemory.h"
-#include "irflag.h"
+#include "debug.h"
#include "hashptr.h"
#include "irflag.h"
-#include "irouts_t.h"
+#include "irflag.h"
+#include "irgraph_t.h"
#include "irgwalk.h"
+#include "irnode_t.h"
+#include "irouts_t.h"
#include "irprintf.h"
-#include "debug.h"
+#include "irprog_t.h"
#include "panic.h"
-#include "typerep.h"
#include "type_t.h"
+#include "typerep.h"
#include "util.h"
+#include <stdbool.h>
+#include <stdlib.h>
/** The debug handle. */
DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;)
diff --git a/ir/ana/irmemory_t.h b/ir/ana/irmemory_t.h
index 8cb50d0..dedc21b 100644
--- a/ir/ana/irmemory_t.h
+++ b/ir/ana/irmemory_t.h
@@ -12,6 +12,9 @@
#ifndef FIRM_ANA_IRMEMORY_T_H
#define FIRM_ANA_IRMEMORY_T_H
+#include "irmemory.h"
+#include <stdbool.h>
+
/**
* One-time inititialization of the memory< disambiguator.
*/
diff --git a/ir/ana/irouts.c b/ir/ana/irouts.c
index b910929..5a8bc13 100644
--- a/ir/ana/irouts.c
+++ b/ir/ana/irouts.c
@@ -9,13 +9,14 @@
* @author Goetz Lindenmaier, Michael Beck
* @date 1.2002
*/
-#include "xmalloc.h"
#include "irouts_t.h"
-#include "irnode_t.h"
+
+#include "ircons.h"
#include "irgraph_t.h"
-#include "irprog_t.h"
#include "irgwalk.h"
-#include "ircons.h"
+#include "irnode_t.h"
+#include "irprog_t.h"
+#include "xmalloc.h"
unsigned get_irn_n_outs(const ir_node *node)
{
diff --git a/ir/ana/vrp.c b/ir/ana/vrp.c
index 7a74bbe..baaf2e7 100644
--- a/ir/ana/vrp.c
+++ b/ir/ana/vrp.c
@@ -9,19 +9,20 @@
* @author Jonas Fietz
*/
#include "vrp.h"
-#include "iroptimize.h"
-#include "irouts_t.h"
-#include "irgraph_t.h"
+
+#include "bitset.h"
+#include "debug.h"
+#include "iredges_t.h"
#include "irgopt.h"
+#include "irgraph_t.h"
#include "irgwalk.h"
-#include "iredges_t.h"
-#include "tv.h"
+#include "irhooks.h"
+#include "irnodemap.h"
+#include "iroptimize.h"
+#include "irouts_t.h"
#include "irprintf.h"
#include "pdeq.h"
-#include "irnodemap.h"
-#include "irhooks.h"
-#include "bitset.h"
-#include "debug.h"
+#include "tv.h"
DEBUG_ONLY(static firm_dbg_module_t *dbg;)