On Mon, Mar 26, 2012 at 9:02 PM, Richard Sandiford
<rdsandif...@googlemail.com> wrote:
>>       * cse.c (cse_canonicalized_basic_blocks): New simple bitmap to
>>       tag basic blocks that have already been traversed at least once,
>>       so that all insns have been canonicalized.
>>       (cse_insn): Call canonicalize_insn only if the basic block that
>>       contains insn is visited for the first time.
>>       (cse_extended_basic_block): After visiting all insns in a basic
>>       block, mark the block in cse_canonicalized_basic_blocks.
>>       (cse_main): Setup and destroy cse_canonicalized_basic_blocks.
> OK, thanks (without the microoptimisation, as you say).

Thanks, will commit!

> Out of curiosity, do you still see this bit as useful:
>      /* We potentially will process this insn many times.  Therefore,
>         drop the REG_EQUAL note if it is equal to the SET_SRC of the
>         unique set in INSN.
>         Do not do so if the REG_EQUAL note is for a STRICT_LOW_PART,
>         because cse_insn handles those specially.  */
> ?  Does "many times" mean in CSE, or later?

It means "in CSE", yes. But with the patch to canonicalize only once,
I suppose this can go away again.
Having said that, I do believe it would be good if we avoid having
REG_EQUAL notes that are rtx_equal_p to the SET_SRC. This happens
quite frequently after CSE. I'm not sure how to clean them up.


Reply via email to