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: [dataflow]: PATCH COMMITTED to fix frame pointer use in dce.


Ian Lance Taylor wrote:
> Bernd Schmidt <bernds_cb1@t-online.de> writes:
>
>   
>> Well, I appreciate that we're trying to reinvent the wheel with the
>> dataflow work, but it might sense to reuse some of the existing logic in
>> flow.c.  In particular,
>>
>>       /* If we're trying to delete a prologue or epilogue instruction
>>          that isn't flagged as possibly being dead, something is wrong.
>>          But if we are keeping the stack pointer depressed, we might well
>>          be deleting insns that are used to compute the amount to update
>>          it by, so they are fine.  */
>>       if (reload_completed
>>           && !(TREE_CODE (TREE_TYPE (current_function_decl)) ==
>> FUNCTION_TYPE
>>                 && (TYPE_RETURNS_STACK_DEPRESSED
>>                     (TREE_TYPE (current_function_decl))))
>>           && (((HAVE_epilogue || HAVE_prologue)
>>                && prologue_epilogue_contains (insn))
>>               || (HAVE_sibcall_epilogue
>>                   && sibcall_epilogue_contains (insn)))
>>           && find_reg_note (insn, REG_MAYBE_DEAD, NULL_RTX) == 0)
>>         fatal_insn ("Attempt to delete prologue/epilogue insn:", insn);
>>     
>
> I think using that predicate would be a mistake.  The dataflow branch
> is able to be significantly more aggressive than flow.c when it comes
> to deleting unused register restores in the epilogue.
>
> I agree with Richard that on IRC we agreed that the DF should just
> keep assignments to hard_frame_pointer_rtx, rather than checking
> RTX_FRAME_RELATED_P.
>
> But this is all a very very minor point, and I think it would be
> preferable to fix this up after the dataflow branch is merged.
>
> Ian
>   
I had thought that i was supposed to do both.  i will remove the code
that checks frame_related_p from dce.
kenny


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