Hi, Chris:

   There may be many defence line fail.  I remember one of such defence line
is the combination of CFG representation and DCE.

   I remember in wopt/preopt, the catch clause is represented something like
this:

  block 0: alternative entry
  block 1: the block holding the statements of the the catch clause.
  ...

 In DCE, all entries (Note, PU with catch caluse will have more than one
entries) will be mark live. That is why the dead code cannot be eliminated.

  While the fix is concentually simple, in practice it could be much harder
because the CFG implementation is bit messy.

  Any idear how to deal with the more general case (not specific to
open64/path64 and its variant)? How to delete the first and 3rd catch
clause. Are you aware of a compiler that is able to handle that?

  try {
    .. the stmts only throw object of type T
  } catch (T1...) {
       // this should be dead
  } catch (T)
      // this should *NOT* be deleted
   } catch (...) {
     // this should be deleted as well.
   }


2011/6/8 Christopher Bergström <cbergst...@pathscale.com>

> Hi
>
> Our cc1plus42 frontend deletes __rw_destroy instance because it can
> prove that catch block is never executed, but catch block itself is
> not deleted.  Is this a bug in openCC as well and if not any
> recommendations on best way to fix it?
>
> test.cxx
> -----------
>
> static void foo() {}
>
> int main() {
>    try {
>    }
>    catch(...) {
>        foo();
>    }
>    return 0;
> }
>
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Open64-devel mailing list
> Open64-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/open64-devel
>
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to