Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread David Malcolm
On Fri, 2016-03-18 at 13:20 -0600, Jeff Law wrote: > On 03/18/2016 01:16 PM, Bernd Schmidt wrote: > > On 03/18/2016 08:14 PM, Jeff Law wrote: > > > I also added a blurb to the dump file when we create these > > > equivalences > > > and included a test to verify the code fires. I verified it > > >

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Jakub Jelinek
On Fri, Mar 18, 2016 at 04:05:08PM -0400, David Malcolm wrote: > On Fri, 2016-03-18 at 13:20 -0600, Jeff Law wrote: > > On 03/18/2016 01:16 PM, Bernd Schmidt wrote: > > > On 03/18/2016 08:14 PM, Jeff Law wrote: > > > > I also added a blurb to the dump file when we create these > > > > equivalences

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Bernd Schmidt
On 03/18/2016 08:14 PM, Jeff Law wrote: I also added a blurb to the dump file when we create these equivalences and included a test to verify the code fires. I verified it fired on x86 and x86-64. It may or may not fire on other targets, so I left the test in the i386 specific subdirectory.

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Jeff Law
On 03/17/2016 12:23 PM, Bernd Schmidt wrote: On 03/17/2016 06:37 PM, Jeff Law wrote: + bitmap seen_insns; + seen_insns = BITMAP_ALLOC (NULL); You could save an allocation here by making this a bitmap_head and using bitmap_initialize. Done. + bitmap_set_bit (seen_insns, INSN_UID

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Jeff Law
On 03/17/2016 12:23 PM, Bernd Schmidt wrote: On 03/17/2016 06:37 PM, Jeff Law wrote: + bitmap seen_insns; + seen_insns = BITMAP_ALLOC (NULL); You could save an allocation here by making this a bitmap_head and using bitmap_initialize. + bitmap_set_bit (seen_insns, INSN_UID (insn)); +

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Jeff Law
On 03/17/2016 02:02 PM, Jeff Law wrote: On 03/17/2016 12:23 PM, Bernd Schmidt wrote: On 03/17/2016 06:37 PM, Jeff Law wrote: + bitmap seen_insns; + seen_insns = BITMAP_ALLOC (NULL); You could save an allocation here by making this a bitmap_head and using bitmap_initialize. +

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Bernd Schmidt
On 03/17/2016 06:37 PM, Jeff Law wrote: + bitmap seen_insns; + seen_insns = BITMAP_ALLOC (NULL); You could save an allocation here by making this a bitmap_head and using bitmap_initialize. + bitmap_set_bit (seen_insns, INSN_UID (insn)); + if (! INSN_P (insn))

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-19 Thread Jeff Law
On 03/17/2016 12:23 PM, Bernd Schmidt wrote: On 03/17/2016 06:37 PM, Jeff Law wrote: + bitmap seen_insns; + seen_insns = BITMAP_ALLOC (NULL); You could save an allocation here by making this a bitmap_head and using bitmap_initialize. I guess so, but it's one allocation per compiled

Re: [RFA][PR rtl-optimization/70263] Fix creation of new REG_EQUIV notes

2016-03-18 Thread Jeff Law
On 03/18/2016 01:16 PM, Bernd Schmidt wrote: On 03/18/2016 08:14 PM, Jeff Law wrote: I also added a blurb to the dump file when we create these equivalences and included a test to verify the code fires. I verified it fired on x86 and x86-64. It may or may not fire on other targets, so I left