9ab6910aad5d01394a969168c9f37deb5ec50b0c
[libfirm] / ir / st / exc.h
1 /* Copyright (c) 2002 by Universität Karlsruhe (TH).  All Rights Reserved */
2 /*
3 ** Time-stamp: <Friday, 26.07.2002 15:43:30h liekweg@i44pc11.info.uni-karlsruhe.de>
4 */
5
6 /***
7    NAME
8      exc
9    PURPOSE
10      Helper functions for exceptions
11    NOTES
12      not quite complete
13    HISTORY
14      liekweg - Mar 4, 2002: Created.
15    CVS:
16      $Id$
17 ***/
18
19 # include "irnode.h"
20
21 # ifndef _EXC_H_
22 # define _EXC_H_
23
24 # include "st.h"
25 # include "irop.h"
26 # include "irouts.h"
27
28 # include <bool.h>
29
30 typedef enum {
31   exc_invalid = 0,                                      /* not yet computed */
32   exc_normal,                                   /* normal CF */
33
34   /* must push a new exc context at entry of block: */
35   exc_region,                                   /* region entry */
36
37   /* must pop current exc context at EXIT of block */
38   exc_exit,                                             /* region exit */
39
40   /* must pop current exc context at entry of block */
41   exc_handler,                                  /* handler entry */
42
43   exc_max                                               /* maximum value of enum for 'bounds checking' */
44 } exc_t;
45
46 const char *exc_to_string (exc_t);
47
48 bool is_handler_entry (ir_graph*, ir_node*);
49 bool is_region_entry  (ir_graph*, ir_node*);
50 bool is_handler_block (ir_graph*, ir_node*);
51 bool is_cont_entry    (ir_graph*, ir_node*);
52
53
54 # endif /* def _EXC_H_ */