This is the mail archive of the
mailing list for the GCC project.
Re: What do do with the exceptional case of expand_case for SJLJ exceptions
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Henderson <rth at redhat dot com>, Richard Guenther <richard dot guenther at gmail dot com>, GCC Mailing List <gcc at gcc dot gnu dot org>
- Date: Sat, 12 May 2012 15:55:49 +0200
- Subject: Re: What do do with the exceptional case of expand_case for SJLJ exceptions
- References: <CABu31nMg0zBJCN2-jSfM_C8SOnPoOJyGBvJqu_=B=a53eOD0email@example.com> <CAFiYyc1g2h_CtkWQYLtU=+RCz26XWH5VLTmELG0hgxoVzaWEqw@mail.gmail.com> <20120418103928.GB5160@atrey.karlin.mff.cuni.cz> <4F8EB726.firstname.lastname@example.org> <CABu31nPAyy98Lnhkypu1UxXN5wm+XkKq8f+CZVhGWQA7UbV-GA@mail.gmail.com> <20120512134912.GA24922@kam.mff.cuni.cz>
On Sat, May 12, 2012 at 3:49 PM, Jan Hubicka <email@example.com> wrote:
>> On Wed, Apr 18, 2012 at 2:44 PM, Richard Henderson <firstname.lastname@example.org> wrote:
>> > On 04/18/2012 05:39 AM, Jan Hubicka wrote:
>> >> 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)
>> > If you can find a clean way of separating sjlj expansion from dw2 expansion,
>> > please do. ?But there's a lot of code shared between the two. ?I see nothing
>> > wrong with always expanding via tablejump.
>> In that case, would something like the following patch be acceptable?
>> I have verified that all targets that always set
>> TARGET_EXCEPT_UNWIND_INFO define casesi and/or tablejump.
>> ? ? ? ? * toplev.c (process_options): Fail for sjlj exceptions if the
>> target machine
>> ? ? ? ? has no casesi insn and no tablejump insn.
> Isn't SJLJ used by default for Ada on all targets?
Would that make a difference for whether this patch is OK or not?
I also have no problems leaving the switch expanding code in stmt.c,
and just adding new code for switch lowering as a GIMPLE pass. That
way (of least resistance) SJLJ exception dispatches can continue to be
expanded as decision trees. Just tell me what you want.