This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: new sign/zero extension elimination pass
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Tom de Vries <vries at codesourcery dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Tom de Vries <tom at codesourcery dot com>, Paolo Bonzini <bonzini at gnu dot org>, <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bernds at codesourcery dot com>
- Date: Mon, 20 Aug 2012 15:40:27 +0200
- Subject: Re: new sign/zero extension elimination pass
- References: <4CBC698B.3080204@codesourcery.com> <AANLkTinJtmMZ0vhyP0B0fSkvYuTv-3DuZr0G5WwLZx44@mail.gmail.com> <4CDCF947.1030008@codesourcery.com> <201011131050.53898.ebotcazou@adacore.com> <4FFD55B4.6060500@codesourcery.com>
On 11/07/12 12:30, Tom de Vries wrote:
> On 13/11/10 10:50, Eric Botcazou wrote:
>>> I profiled the pass on spec2000:
>>>
>>> -mabi=32 -mabi=64
>>> ee-pass (usr time): 0.70 1.16
>>> total (usr time): 919.30 879.26
>>> ee-pass (%): 0.08 0.13
>>>
>>> The pass takes 0.13% or less of the total usr runtime.
>>
>> For how many hits? What are the numbers with --param ee-max-propagate=0?
>>
>>> Is it necessary to improve the runtime of this pass?
>>
>> I've already given my opinion about the implementation. The other passes in
>> the compiler try hard not to rescan everything when a single bit changes; as
>> currently written, yours doesn't.
>>
>
> Eric,
>
> I've done the following:
> - refactored the pass such that it now scans at most twice over all
> instructions.
> - updated the patch to be applicable to current trunk
> - updated the motivating example to a more applicable one (as discussed in
> this thread), and added that one as test-case.
> - added a part in the header comment illustrating the working of the pass
> on the motivating example.
>
> bootstrapped and reg-tested on x86_64 and i686.
>
> build and reg-tested on mips, mips64, and arm.
>
> OK for trunk?
>
Eric,
does the new patch meet your concerns related to rescanning?
If so, OK for trunk?
Thanks,
- Tom
> Thanks,
> - Tom
>
> 2012-07-10 Tom de Vries <tom@codesourcery.com>
>
> * ee.c: New file.
> * tree-pass.h (pass_ee): Declare.
> * opts.c ( default_options_table): Set flag_ee at -O2.
> * timevar.def (TV_EE): New timevar.
> * common.opt (fextension-elimination): New option.
> * Makefile.in (ee.o): New rule.
> * passes.c (pass_ee): Add it.
>
> * gcc.dg/extend-1.c: New test.
> * gcc.dg/extend-2.c: Same.
> * gcc.dg/extend-2-64.c: Same.
> * gcc.dg/extend-3.c: Same.
> * gcc.dg/extend-4.c: Same.
> * gcc.dg/extend-5.c: Same.
> * gcc.target/mips/octeon-bbit-2.c: Make test more robust.
>