This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR middle-end/15239: Artificial limit in expand_mult


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]