lkml.org 
[lkml]   [2000]   [Jan]   [30]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 29 Jan 2000 16:55:08 -0800
From"Jeffrey B. Siegal" <>
SubjectRe: Code optimization <LEA Instruction>
owner-linux-kernel-digest@vger.rutgers.edu wrote:
> On Crusoe I guess the cost of redundant instructions is not so
> significant once they've been through a translation pass, but for those
> instruction streams getting interpreted, and for the speed of
> translation itself, it still makes sense to keep the number of
> instructions (and their size) to a minimum.

Which, interestingly, suggests that -Os (or something like it) is what you
want.

> I wouldn't be surprised if inlining is less important.  Crusoe is a sort
> of JIT and would seem well placed to auto-inline things in the
> appropriate, dynamically determined manner.

Inlining can be important to allow cascading optimizations, as in:

int do_it(mode, arg1, arg2, arg3)
{
  switch(mode) {
  case 1:
     ... break;
  case 2:
     ... break;
  ...
  }
}
int 
fun(args)
{
  ...
  a = do_it(1, arg1, arg2, arg3)
  ...
}
On the other hand, inlining, as a tradeoff of size for speed, might actually
be bad (the out-of-line function can get translated once, but inline it needs
to get translated at each call-site).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [from the cache]
©2003-2008