This is the mail archive of the gcc@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: What do do with the exceptional case of expand_case for SJLJ exceptions


> > What is the reason why lowering for SJLJ exceptions is not done in GIMPLE?
> 
> Because it completely wrecks loops because we factor the SJLJ site,
> thus
> 
> fn ()
> {
> ...
>   for (;;)
>     {
>        try { X } catch { Y }
>     }
> 
> becomes
> 
> fn ()
> {
>    if (setjmp ())
>      {
>         switch (...)
>            ... goto L;
>      }
>    for (;;)
>      {
>         X;
>         L:
>           Y;
>      }

Well, if SJLJ lowering happens as gimple pass somewhere near the end of gimple
queue, this should not be problem at all. (and implementation would be cleaner)

Honza


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