On Sun, Oct 7, 2012 at 11:27 PM, Steven Bosscher <stevenb....@gmail.com> wrote: > On Sun, Oct 7, 2012 at 5:59 PM, Vladimir Makarov wrote: >> The following patch speeds LRA up more on PR54146. Below times for >> compilation of the test on gcc17.fsffrance.org (an AMD machine): >> >> Before: >> real=1214.71 user=1192.05 system=22.48 >> After: >> real=1144.37 user=1124.31 system=20.11 > > Hi Vlad, > > The next bottle-neck in my timings is in > lra-eliminate.c:lra_eliminate(), in this loop: > > FOR_EACH_BB (bb) > FOR_BB_INSNS_SAFE (bb, insn, temp) > { > if (bitmap_bit_p (&insns_with_changed_offsets, INSN_UID (insn))) > process_insn_for_elimination (insn, final_p); > } > > The problem is in bitmap_bit_p. Random access to a large bitmap can be > very slow. > > I'm playing with a patch to expand the insns_with_changed_offsets > bitmap to an sbitmap, and will send a patch if this works better.
Or make insns_with_changed_offsets a VEC of insns (or a pointer-set). Richard. > Ciao! > Steven