This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Unshare insns after splitting
- From: Ian Lance Taylor <iant at google dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com, Kenneth Zadeck <zadeck at naturalbridge dot com>
- Date: 30 Apr 2007 15:34:43 -0700
- Subject: Re: [patch] Unshare insns after splitting
- References: <200704291703.54999.steven@gcc.gnu.org>
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