summaryrefslogtreecommitdiffhomepage
path: root/ir/be/beutil.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-03-10 18:25:21 +0100
committerMatthias Braun <matze@braunis.de>2010-03-10 18:25:21 +0100
commit7c36344d22a7c306a4e216f135c974bdb9f6b943 (patch)
treecf08cc3e447a6b85337dd2e58ceb70006eaa4955 /ir/be/beutil.c
parentea75e9d38674b468f602a0699fb64b9c01254797 (diff)
- fix most of the -Wunreachable-code and -Wlogical-op warnings
- rework ir_phase API (sorry for mixing these 2 things into 1 commit) [r27285]
Diffstat (limited to 'ir/be/beutil.c')
-rw-r--r--ir/be/beutil.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ir/be/beutil.c b/ir/be/beutil.c
index 621da7d..6e6abf2 100644
--- a/ir/be/beutil.c
+++ b/ir/be/beutil.c
@@ -38,7 +38,7 @@
#include "irgopt.h"
#include "irtools.h"
#include "irprintf.h"
-#include "iredges.h"
+#include "iredges_t.h"
#include "beutil.h"
#include "besched.h"
@@ -191,3 +191,10 @@ ir_node **be_get_cfgpostorder(ir_graph *irg)
return list;
}
+
+ir_node *get_first_block_succ(const ir_node *block)
+{
+ const ir_edge_t *edge = get_irn_out_edge_first_kind(block, EDGE_KIND_BLOCK);
+ assert(edge != NULL);
+ return get_edge_src_irn(edge);
+}