------- Comment #18 from jakub at gcc dot gnu dot org 2007-10-28 20:20 ------- Created an attachment (id=14429) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14429&action=view) rws_insn.patch
Just a side note. Maintaining the rws_insn array seems to be horribly expensive to me, and for each regno only one bit is actually used just to check one gcc_assert and only two regnos are actually checked in some other code. So memsetting and maintaining a 1604 bytes long array all the time seems to be an overkill - a bitmap can do just fine or, if we just remove that gcc_assert when not ENABLE_CHECKING, we need just 2 bits altogether instead of those 1604 bytes. Doesn't help much on this testcase (as it is not addressing the algorithmic issue), but is already noticeable. scheduling 2 : 10.60 (88%) usr 0.00 ( 0%) sys 10.60 (88%) wall 1970 kB (15%) ggc went down to scheduling 2 : 8.99 (86%) usr 0.01 (50%) sys 9.00 (86%) wall 1970 kB (15%) ggc with this patch and --enable-checking=release, so about 14% speedup in wall time for the whole compilation of this file. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33922