This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/31889] compiler misses opportunity to combine multiple identical function return paths
- From: "raeburn at raeburn dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2007 21:25:34 -0000
- Subject: [Bug rtl-optimization/31889] compiler misses opportunity to combine multiple identical function return paths
- References: <bug-31889-11337@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from raeburn at raeburn dot org 2007-05-10 22:25 -------
Subject: Re: compiler misses opportunity to combine multiple identical
function return paths
On May 10, 2007, at 2:13, steven at gcc dot gnu dot org wrote:
> ------- Comment #2 from steven at gcc dot gnu dot org 2007-05-10
> 07:13 -------
> Try compiling with "--param min-crossjump-insns=1". I'm curious to
> hear if
> that fixes this problem for you.
Yes, with that option, the second path loads the pointer to the
string to be displayed, and jumps to the puts call. Actually, it
does for both versions of the code, the hairier form and the simpler
form, which were producing different (but functionally equivalent)
less-optimal code before.
Ken
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31889