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, 9 Apr 2012 14:33:21 -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>
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.