This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [trunk]: Round 2 of libcall removal
- From: Kenneth Zadeck <zadeck at naturalbridge dot com>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org, Steven Bosscher <stevenb dot gcc at gmail dot com>, Ian Lance Taylor <iant at google dot com>
- Date: Sat, 03 May 2008 16:32:48 -0400
- Subject: Re: [trunk]: Round 2 of libcall removal
- References: <4819D06C.9030309@naturalbridge.com> <200805031815.39207.ebotcazou@libertysurf.fr>
Eric,
there is another patch that i have in the queue where i clean up the
handling of pure and const functions. In that patch, i get rid of all
of this, and the only thing that is left is the code that follows this
stanza that looks like:
/* If this was a CONST function, it is now PURE since
it now reads memory. */
if (flags & ECF_CONST)
{
flags &= ~ECF_CONST;
flags |= ECF_PURE;
}
Note that the above code is actually dead on the trunk even though it is
actually correct. I went back and looked at the history, and the all
of the code below was added to fix some place where flow was not
properly keeping track of things. Since things are being properly
tracked now by df, and the other patch will hopefully go in first, your
comment should be moot.
Kenny
@@ -3464,15 +3373,7 @@ emit_library_call_value_1 (int retval, r
int must_copy
= !reference_callee_copied (&args_so_far, mode, NULL_TREE, 1);
- /* loop.c won't look at CALL_INSN_FUNCTION_USAGE of const/pure
- functions, so we have to pretend this isn't such a function. */
- if (flags & ECF_LIBCALL_BLOCK)
- {
- rtx insns = get_insns ();
- end_sequence ();
- emit_insn (insns);
- }
- flags &= ~(ECF_CONST | ECF_PURE | ECF_LIBCALL_BLOCK);
+ flags &= ~(ECF_CONST | ECF_PURE);
/* If this was a CONST function, it is now PURE since
it now reads memory. */
Here we still need the comment (probably with a ???) until after we are sure
that loop.c was the only problematic pass.