This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Unshare insns after splitting


Steven Bosscher <stevenb.gcc@gmail.com> writes:

> +  /* Cleanup the USED bits in TRIAL, so that we can unshare the insns
> +     generated by a splitter.  */
> +  reset_used_flags (PATTERN (trial));
> +  reset_used_flags (REG_NOTES (trial));
> +  set_used_flags (PATTERN (trial));
> +  set_used_flags (REG_NOTES (trial));

I don't see any reason to reset the used flags before you set them.  I
also don't see any reason to mess with TRIAL at all.  If the split
succeeds, we will delete TRIAL.

> +  /* We will be adding the new sequence to the function.  The splitters
> +     may have introduced invalid RTL sharing, so unshare the sequence now.  */
> +  unshare_all_rtl_in_chain (seq);

This bit is OK.  I don't think you need anything else.  Let me know if
I'm wrong.

Thanks.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]