This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)
On Fri, Oct 19, 2007 at 06:49:35PM +0200, Paolo Bonzini wrote:
> >Adding REG_EQUAL note was all that was needed for CSEing it, but dce.c
> >still
> >won't delete it, because it punts on all UNSPECs. The UNSPECs are really
> >necessary for the __tls_get_addr call, as the call_insn has mandatory insn
> >sequence that needs to be output there (to make TLS transitions possible).
> >
> >Say speculative moves use UNSPEC_LDS{,A}, but they certainly should be
> >dced.
>
> I would say that all non-trapping UNSPECs (not UNSPEC_VOLATILEs) should
> be DCEd. Maxim Kuvyrkov recently added a target hook to mark some
> unspecs as non-trapping, and speculative moves are exactly the once he
> needed the hook for.
I doubt the new target hook would fit into what DCE needs.
But if the only problem is with ia64's prologue_use, or that and
bundle_selector, then perhaps that
if (GET_CODE (body) == UNSPEC) return false;
could move from deletable_insn_p_1 to deletable_insn_p and
thus avoid DCE only of UNSPECs in body of the insns, while allow
it in PARALLELs.
Jakub