[lra] 3rd patch to speed more compilation of PR54146
Vladimir Makarov
vmakarov@redhat.com
Mon Oct 8 20:26:00 GMT 2012
On 10/08/2012 01:14 PM, Steven Bosscher wrote:
> Hello,
>
> This patch makes lra_constraint_insn_stack_bitmap an sbitmap. This
> reduces compile time by another minute or so on gcc17 for the test
> case of PR54146, and I think it's a general improvement also for less
> extreme code. For cc1-i files the compile time change tends to be a
> little less but that may just be noise.
>
> Bootstrapped&tested on x86_64-unknown-linux-gnu. OK for lra-branch?
I am not a fan of sbitmap for regular use. This patch definitely helps
for this particular test. But it might hurt performance for small
functions because
You need to allocate sbitmap (bitmap frequently uses already allocated
pool of bitmap elements), sometimes reallocate it (because new insns are
added), make it empty (zeroing), and it may hurt locality when the
corresponding set is partially sparsed (but not so sparsed as in this
case, where each bit practically requires a new bitmap element).
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
So I guess we need a combination of methods (based on sbitmap and bitmap) or some another method could work in both cases. I think it can wait the next stage.
> (This is the combined patch of all changes in my check-out of the
> lra-branch. The lra.c and lra-constraints.c bits are new, the rest was
> posted previously and is awaiting review also.)
>
>
More information about the Gcc-patches
mailing list