This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to improve current_function_sp_is_unchanging accuracy
- To: law at cygnus dot com
- Subject: Re: patch to improve current_function_sp_is_unchanging accuracy
- From: John Wehle <john at feith dot com>
- Date: Wed, 4 Nov 1998 23:18:10 -0500 (EST)
- cc: egcs-patches at cygnus dot com
>> * flow.c (notice_stack_pointer_modification): Ignore
>> additions or subtractions of zero.
> Why not delete such insns?
Didn't have strong feelings one way or another though I wasn't looking
to accidently break something.
> Why do we get them and how can we delete them :-)
Compiling:
int
subr1(int a, int b)
{
ga = a;
gb = b;
return subr11();
}
on the i386 yields:
;; Function subr1
...
(call_insn 18 15 20 (parallel[
(set (reg:SI 0 %eax)
(call (mem:QI (symbol_ref:SI ("subr11")) 0)
(const_int 0)))
(set (reg:SI 7 %esp)
(plus:SI (reg:SI 7 %esp)
(const_int 0)))
] ) 307 {call_value-1} (nil)
(nil)
(nil))
I suppose that maybe set_noop_p and friends in flow.c could be modified
to delete these.
-- John
-------------------------------------------------------------------------
| Feith Systems | Voice: 1-215-646-8000 | Email: john@feith.com |
| John Wehle | Fax: 1-215-540-5495 | |
-------------------------------------------------------------------------