This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR middle-end/15239: Artificial limit in expand_mult
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 May 2004 13:48:22 +0930
- Subject: Re: [PATCH] PR middle-end/15239: Artificial limit in expand_mult
- References: <Pine.LNX.4.44.0405091520590.5047-100000@www.eyesopen.com>
On Sun, May 09, 2004 at 04:02:15PM -0600, Roger Sayle wrote:
> shifts used to implement multiplication by constant. This meant that
> a synthetic multiply would only be used, even if it was cheaper than
> using a multiply, if it was also cheaper than 12 additions.
>
> I believe that the original motivations for this limit may no longer
> apply, and its undesirable for the middle-end to prevent a well-tuned
> backend from generating "optimal" code. The original authors may not
You seem to be ignoring Jim's comment in the PR that the limit was
placed there to prevent code size increasing too much. Memory effects
are important in all but mickey mouse benchmark code. A cache miss may
cost you the equivalent of hundreds or thousands of instructions.
--
Alan Modra
IBM OzLabs - Linux Technology Centre