Changed exception markings types --flo
authorFlorian Liekweg <liekweg@ipd.info.uni-karlsruhe.de>
Fri, 26 Apr 2002 14:19:23 +0000 (14:19 +0000)
committerFlorian Liekweg <liekweg@ipd.info.uni-karlsruhe.de>
Fri, 26 Apr 2002 14:19:23 +0000 (14:19 +0000)
[r387]

ir/st/Makefile.in
ir/st/exc.c
ir/st/exc.h

index 4f1d12c..49d5a9f 100644 (file)
@@ -22,7 +22,7 @@ include $(topdir)/MakeRules
 CPPFLAGS += -I$(top_srcdir)/ir/common -I$(top_srcdir)/ir/tr \
                        -I$(top_srcdir)/ir/ident  -I$(top_srcdir)/ir/adt \
                        -I$(top_srcdir)/ir/ir     -I$(top_srcdir)/ir/tv  \
-                       -I$(top_srcdir)/ir/ana
+                       -I$(top_srcdir)/ir/ana    -I$(top_srcdir)/ir/debug
 
 include $(top_srcdir)/MakeTargets
 
index 8a00173..5ef2b18 100644 (file)
 # include "exc.h"
 
 static char* exc_strings [] = {
-  "Invalid",
-  "Normal",
-  "Region Entry",
-  "Handler Entry",
+  "Invalid",                                   /* invalid */
+  "Normal",                                            /* normal */
+  "Entry",                                             /* entry to region */
+  "Exit",                                              /* exit of region */
+  "Handler",                                   /* entry to handler */
   "Cont"
 };
 
@@ -195,44 +196,6 @@ bool is_handler_block (ir_graph *graph, ir_node *block)
   return (exc_handler == get_Block_exc (block));
 }
 
-/*
- Return true iff a new exception region must be left upon exit of the
- non-exception blocks among the CFG predecessors of this block.
-
- If this block has CFG predecessors that are partly handler blocks and
- partly normal blocks, then we must return true.
-*/
-bool is_cont_entry    (ir_graph *graph, ir_node *block)
-{
-  assert (0 && "Not implemented");
-
-  if (exc_invalid == get_Block_exc (block))
-       {
-         bool has_exc = false;         /* wether we have exception cfg predecessors */
-         bool has_cfg = false;         /* wether we have normal cfg predecessors */
-
-         int i = 0;
-         int n = get_irn_arity (block);
-
-         ir_node *pred = 0;
-
-         for (i = 0; (i < n) && (!has_exc && !has_cfg); i ++)
-               {
-                 pred = get_irn_n (block, i);
-
-                 if (is_exc_jmp (pred))
-                       has_exc = true;
-                 else if (is_cfg_jmp (pred))
-                       has_cfg = true;
-               }
-
-         if (has_cfg && has_exc)
-               set_Block_exc (block, exc_cont);
-       }
-
-  return (exc_cont == get_Block_exc (block));
-}
-
 /*
   Convert a value of type exc_t to a descriptive string.
   Returns a reference to a statically allocated, constant string.
index 27d3ed8..fa7b496 100644 (file)
      $Id$
 ***/
 
+# include "irnode.h"
+
 # ifndef _EXC_H_
 # define _EXC_H_
 
-# include "irnode.h"
-
 # include "st.h"
 # include "irop.h"
 # include "irouts.h"
@@ -34,9 +34,11 @@ typedef enum {
   // must push a new exc contrext at entry of block:
   exc_region,                                  /* region entry */
 
+  // must pop current exc contrext at exit of block
+  exc_exit,                                            /* region exit */
+
   // must pop current exc contrext at entry of block
   exc_handler,                                 /* handler entry */
-  exc_cont,                                            /* cont block */
 
   exc_max                                              /* maximum value of enum for 'bounds checking' */
 } exc_t;