This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] exception handling in gimple


Hi,

On Wed, 2 Sep 2009, Richard Henderson wrote:

> So this is well beyond the WIP stage, and I'd like to get some real 
> feedback on it.

[still reading patch linearly, skipping the two large files :) ]

I think this (tree-cfg.c):

-  /* OpenMP directives alter control flow.  */
-  if (is_gimple_omp (t))
-    return true;
+    case GIMPLE_EH_DISPATCH:
+      /* EH_DISPATCH branches to the individual catch handlers at
+        this level of a try or allowed-exceptions region.  It can
+        fallthru to the next statement as well.  */
+      return true;
+
+    case GIMPLE_OMP_PARALLEL:
... and all other GIMPLE_OMP_ stuff explicitely listed ...

is better done like:

switch (code) {
  case call: ...
  case dispatch: ...
  default:
    if (is_gimple_omp (t))
      ...
    else
      break;
}

If we have a nice predicate already we should use it to reduce maintenance 
costs.


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]