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: [trunk]: Round 2 of libcall removal


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.



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