This is the mail archive of the
mailing list for the GCC project.
Re: Propagate profile counts after switch case expansion (issue5896043)
- From: Easwaran Raman <eraman at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: reply at codereview dot appspotmail dot com, gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Apr 2012 13:55:28 -0700
- Subject: Re: Propagate profile counts after switch case expansion (issue5896043)
- References: <20120323174310.64276220E1C@agni2.mtv.corp.google.com> <20120325192220.GA18490@atrey.karlin.mff.cuni.cz> <CAPK5YPY1dhsp-kFqwxp2VTR42ZLCb6BXOVqRT6FC-pFCLEMZbA@mail.gmail.com> <CAPK5YPYv6OtSG2GbHHQ7oHGGue9TRei7fPHh7mCPxhFha9-4DQ@mail.gmail.com>
On Mon, Apr 9, 2012 at 2:33 PM, Easwaran Raman <email@example.com> wrote:
> On Sun, Mar 25, 2012 at 9:40 PM, Easwaran Raman <firstname.lastname@example.org> wrote:
>> On Sun, Mar 25, 2012 at 12:22 PM, Jan Hubicka <email@example.com> wrote:
>>>> This patch propagates execution count of thee case labels of a
>>>> switch-case statement after its expansion. Bootstraps and all
>>>> tests pass. OK for trunk?
>>> while this is resonable thing to do, I belive it would make most sense
>>> to make switch lowering at gimple level: i.e. reorganize the existing
>>> code to produce gimple statement and change expansion code to produce
>>> tablejump from every gimple switch statement that was left in the
>>> This would be both cleaner and would allow gimple optimizers to improve the
>>> generated code. Incrementally it would also allow us to improve switch exansion
>>> that is quite baroque and not realy producing very good code in some common
>>> If you would be interested working on this (i.e. reorganizing the expansion
>>> code to produce gimple), I would be very happy. If not, I can review the
>>> profile updating part for mainline, since in any case this is desriable thing
>>> to do.
>> I am planning to explore improvements to switch expansion (peeling
>> some cases and using jump tables for the rest, for example) and I
>> think the reorganization you suggest is the right way to do such
>> improvements. But until I can spend time on it and get it done, I
>> would like this patch to get reviewed and checked in.