This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Failure to apply trivial peephole optimizations
- From: Martin Buchholz <martin at xemacs dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 16 Dec 2002 16:40:37 -0800
- Subject: Re: Failure to apply trivial peephole optimizations
- References: <15866.64759.42776.797448@wobble.local><20021216202252.C4851@redhat.com>
- Reply-to: martin at xemacs dot org
>>>>> "R" == Richard Henderson <rth@redhat.com> writes:
R> On Sat, Dec 14, 2002 at 01:42:15AM -0800, Martin Buchholz wrote:
>> A trivial peephole optimizer with a two instruction window can convert
>> the sequence
>>
>> subl $40, %esp
>> movl %ebp, %esp
>> to
>> movl %ebp, %esp
R> Peephole optimization is not the issue. Policy with regards to
R> stack frame manipulation is. What we want to do is enable
R> something akin to -momit-leaf-frame-pointer by default, but at
R> present this causes regressions in the gdb testsuite, so we can't.
I hope that means:
1. Eventually uses of the special register %esp will be optimized
appropriately.
2. For other registers, stupid code like redundant stores are either
never generated or already optimized away.
Martin