This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: sibcall fixup
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Subject: Re: sibcall fixup
- From: Richard Henderson <rth at redhat dot com>
- Date: Mon, 19 Feb 2001 01:00:35 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- References: <10102190324.AA16037@vlsi1.ultra.nyu.edu>
On Sun, Feb 18, 2001 at 10:24:58PM -0500, Richard Kenner wrote:
> I really don't understand why code of the form:
[ multiple ifs ]
> is *ever* better than
[ one huge if ]
> no matter *how* many conditions there are or how complex they are.
>
> Can you explain?
Easily.
You can step through the former in a debugger a piece at a time. The
later becomes one statement, such that "step" or "next" (depending on
how many embedded function calls actually get invoked) takes you directly
to the "then" or "else" statement.
Moreover, the former is demonstrably easier to understand and maintain.
Look, for instance, at the garbage that cluttered jump.c before I
deleted 3/4 of it in favour of ifcvt. Look at the horrors that still
haunt push_reload.
r~