This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/17813
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Roger Sayle <roger at eyesopen dot com>
- Date: Sun, 17 Oct 2004 15:21:13 +0200
- Subject: Re: [PATCH] Fix PR middle-end/17813
- References: <Pine.LNX.email@example.com>
> This is OK for mainline.
Thanks for the review.
> A slight improvement might be to add a new ignore_pending_stack_adjust
> function (like clear_pending_stack_adjust) that resets stack_pointer_delta
> and pending_stack_adjust to zero, and call that in emit_stack_restore.
I have 3 remarks/questions:
- what about discard_pending_stack_adjust instead? I think that "ignore"
could fool people into thinking that the stack adjustment is only temporarily
- what about changing clear_pending_stack_adjust into
maybe_discard_pending_stack_adjust? The rationale is that the typical idiom
which seems odd at best.
- I think that stack_pointer_delta should not be reset to zero for strict
correctness, and instead the same adjustment should be made in the new
function as in clear_pending_stack_adjust.
> Currently, we'll emit a "dead" stack adjustment immediately prior to
> restoring the stack pointer, and then leave it to the RTL optimizers to
> clean up. All we really need to do is flush the "memory" of the pending
This was the acknowledged strategy used in the patch. Now, after Honza's
remark, I think yours is better.