On Tue, Oct 9, 2012 at 6:10 PM, Vladimir Makarov <vmaka...@redhat.com> wrote: > On 10/08/2012 05:14 PM, Steven Bosscher wrote: >> >> On Mon, Oct 8, 2012 at 10:26 PM, Vladimir Makarov <vmaka...@redhat.com> >> wrote: >> >>> So I checked it on big file with > hundred functionson Intel machine and >>> got >>> >>> before a part of the patch implementing the insn stack as sbitmap >>> real=243.40 user=241.61 system=1.00 >>> >>> after the part of the patch: >>> real=244.89 user=243.02 system=0.96 >> >> Is that more than just noise, you think? A ~1.5s difference on ~240 >> total isn't very much. I measured the timings on my set of cc1-i >> files, and sometimes the without-patch compiler was faster by a tiny >> amount, and sometimes it was slower. Even on an average of 10 runs I >> really couldn't say that the patch was a win or loss on the whole. >> >> I measured this on a mostly idle machine at home, not gcc17, which >> seems to be even more busy than usual lately, thanks to you and me :-) >> >> > Sorry, Steven. It was a noise. I ran it again now 3 times and found that > was a noise. > > After some thinking, I realized that sbitmap is really the best > representation for this particular case. That is because at the 1st > constraint pass we have all bits are set as we process *all* insns on the > 1st pass. So sbitmap (at least before the extension and if we have pretty > compact UIDs) will be always smaller than bitmap. > > I committed the following your patch to the branch (as rev. 192264). > > And again, sorry for the false conclusions.
Btw, congratulations for all the speedups (even though they probably are noise for "regular" programs?)! I'm looking forward to the merge of LRA for x86 now. Richard. > 2012-10-09 Steven Bosscher <ste...@gcc.gnu.org> > > > * lra-int.h (lra_constraint_insn_stack_bitmap, > lra_constraint_insn_stack): Remove. > (lra_pop_insn, lra_insn_stack_length): New prototypes. > * lra.c (lra_constraint_insn_stack_bitmap): Make static sbitmap. > (lra_constraint_insn_stack): Make static. > (lra_push_insn_1): New function. > (lra_push_insn): Rewrite using lra_push_insn_1. > (lra_push_insn_and_update_insn_regno_info): Likewise. > (lra_pop_insn, lra_insn_stack_length): New functions. > * lra_constraints.c (lra_constraints): Use new interface to > insns stack instead of manipulating in-place. >