Added exc.c exc.h
[libfirm] / ir / st / exc.h
1 /* Copyright (c) 2002 by Universität Karlsruhe (TH).  All Rights Reserved */
2 //
3 // Time-stamp: <02/03/22 17:03:05 liekweg>
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 # ifndef _EXC_H_
20 # define _EXC_H_
21
22 # include "irnode.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,                                  /* not yet computed */
32   exc_normal,                                   /* normal CF */
33
34   // must push a new exc contrext at entry of block:
35   exc_region,                                   /* region entry */
36
37   // must pop current exc contrext at entry of block
38   exc_handler,                                  /* handler entry */
39   exc_cont,                                             /* cont block */
40
41   exc_max                                               /* maximum value of enum for 'bounds checking' */
42 } exc_t;
43
44 const char *exc_to_string (exc_t);
45
46 bool is_handler_entry (ir_graph*, ir_node*);
47 bool is_region_entry  (ir_graph*, ir_node*);
48 bool is_handler_block (ir_graph*, ir_node*);
49 bool is_cont_entry    (ir_graph*, ir_node*);
50
51
52 # endif /* def _EXC_H_ */