[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] inliner bug
From: |
John Cowan |
Subject: |
Re: [Chicken-hackers] inliner bug |
Date: |
Sun, 10 Mar 2013 19:35:46 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Felix scripsit:
> By adding the "inline" declaration, you are effectively disabling
> this size test, telling the compiler: "Inline this! Always! Now
> go and do what I command!"
That's ... just wrong. An inline declaration should be a SHOULD,
not a MUST. In particular, the compiler should at a minimum detect
that it is recursively inlining and stop. A notinline declaration,
on the other hand, must be a MUST. This is what Common Lisp says:
the compiler can always ignore an inline declaration, but a notinline
declaration is the only one (apart from a special-variable declaration,
which affects semantics) that MUST NOT be ignored.
> - disable the declaration after the current optimization pass, once
> a procedure has been inlined at all call-sites in the program (this
> may miss some call-sites in nested calls, but is better than what
> happens now, with the compiler running out of memory and all that...)
That sounds reasonable.
--
Almost all theorems are true, John Cowan <address@hidden>
but almost all proofs have bugs. http://www.ccil.org/~cowan
--Paul Pedersen