[Openmcl-devel] Error: Function size exceeds compiler limitation.
Ron Garret
ron at flownet.com
Thu Apr 25 07:41:42 PDT 2019
Look at the end. It’s truncated.
On Apr 25, 2019, at 7:18 AM, Andrew Shalit <alms at clozure.com> wrote:
> It’s surprising that the example Mark gave would exceed that limit. It doesn’t look like a particularly huge function.
>
> Andrew
>
>> On Apr 25, 2019, at 2:00 AM, R. Matthew Emerson <rme at acm.org> wrote:
>>
>>
>>
>>> On Apr 24, 2019, at 10:10 PM, Mark Klein <m_klein at mit.edu> wrote:
>>>
>>>
>>> My lisp code is generates a simple lambda expression that I then pass to the (compile) function. If the lambda expression is big enough (e.g. 1.6 megabytes), lisp throws the following error:
>>>
>>> > Error: Function size exceeds compiler limitation.
>>> > While executing: CCL::COMPILER-FUNCTION-OVERFLOW, in process listener(1).
>>>
>>> I guess CCL has a limit on how big an individual function it will compile. Is that limit something I can change? I don’t have an obvious way to break the lambda expression into multiple smaller ones.
>>
>> There's a limit, but it can't be trivially increased, unfortunately. I believe it has to do with the number of labels generated in intermediate code. More than 256K labels causes the error.
>>
>> -m
>>
>>
>>
>>
>>
>>>
>>> Here, FYI, is a snippet of the kind of lambda expression I’m generating. It’s just one giant nested if statement with a bunch of inequalities:
>>>
>>> (LAMBDA (CONTRACT)
>>> (DECLARE (TYPE ARRAY CONTRACT))
>>> (DECLARE (OPTIMIZE (SAFETY 0) (SPEED 3)))
>>> (LET ((V9 (CVAL CONTRACT 9))
>>> (V5 (CVAL CONTRACT 5))
>>> (V12 (CVAL CONTRACT 12))
>>> (V14 (CVAL CONTRACT 14))
>>> (V3 (CVAL CONTRACT 3))
>>> (V4 (CVAL CONTRACT 4))
>>> (V30 (CVAL CONTRACT 30))
>>> (V23 (CVAL CONTRACT 23))
>>> (V28 (CVAL CONTRACT 28))
>>> (V8 (CVAL CONTRACT 8))
>>> (V17 (CVAL CONTRACT 17))
>>> (V20 (CVAL CONTRACT 20))
>>> (V26 (CVAL CONTRACT 26))
>>> (V19 (CVAL CONTRACT 19))
>>> (V22 (CVAL CONTRACT 22))
>>> (V11 (CVAL CONTRACT 11))
>>> (V15 (CVAL CONTRACT 15))
>>> (V13 (CVAL CONTRACT 13))
>>> (V6 (CVAL CONTRACT 6))
>>> (V10 (CVAL CONTRACT 10))
>>> (V29 (CVAL CONTRACT 29))
>>> (V25 (CVAL CONTRACT 25))
>>> (V16 (CVAL CONTRACT 16))
>>> (V27 (CVAL CONTRACT 27))
>>> (V24 (CVAL CONTRACT 24))
>>> (V7 (CVAL CONTRACT 7))
>>> (V2 (CVAL CONTRACT 2))
>>> (V1 (CVAL CONTRACT 1))
>>> (V18 (CVAL CONTRACT 18))
>>> (V21 (CVAL CONTRACT 21)))
>>> (DECLARE (TYPE FIXNUM V9))
>>> (DECLARE (TYPE FIXNUM V5))
>>> (DECLARE (TYPE FIXNUM V12))
>>> (DECLARE (TYPE FIXNUM V14))
>>> (DECLARE (TYPE FIXNUM V3))
>>> (DECLARE (TYPE FIXNUM V4))
>>> (DECLARE (TYPE FIXNUM V30))
>>> (DECLARE (TYPE FIXNUM V23))
>>> (DECLARE (TYPE FIXNUM V28))
>>> (DECLARE (TYPE FIXNUM V8))
>>> (DECLARE (TYPE FIXNUM V17))
>>> (DECLARE (TYPE FIXNUM V20))
>>> (DECLARE (TYPE FIXNUM V26))
>>> (DECLARE (TYPE FIXNUM V19))
>>> (DECLARE (TYPE FIXNUM V22))
>>> (DECLARE (TYPE FIXNUM V11))
>>> (DECLARE (TYPE FIXNUM V15))
>>> (DECLARE (TYPE FIXNUM V13))
>>> (DECLARE (TYPE FIXNUM V6))
>>> (DECLARE (TYPE FIXNUM V10))
>>> (DECLARE (TYPE FIXNUM V29))
>>> (DECLARE (TYPE FIXNUM V25))
>>> (DECLARE (TYPE FIXNUM V16))
>>> (DECLARE (TYPE FIXNUM V27))
>>> (DECLARE (TYPE FIXNUM V24))
>>> (DECLARE (TYPE FIXNUM V7))
>>> (DECLARE (TYPE FIXNUM V2))
>>> (DECLARE (TYPE FIXNUM V1))
>>> (DECLARE (TYPE FIXNUM V18))
>>> (DECLARE (TYPE FIXNUM V21))
>>> (OR (IF (<= V21 10)
>>> (IF (>= V18 3)
>>> (IF (>= V1 9)
>>> (IF (>= V2 5)
>>> (IF (>= V7 8)
>>> (IF (<= V24 14)
>>> (IF
>>>
>>> ----------------------
>>> Mark Klein, PhD
>>> Principal Research Scientist
>>> Massachusetts Institute of Technology
>>> http://cci.mit.edu/klein/
>>>
>>>
>>>
>>> _______________________________________________
>>> Openmcl-devel mailing list
>>> Openmcl-devel at clozure.com
>>> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>>
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> https://lists.clozure.com/mailman/listinfo/openmcl-devel
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> https://lists.clozure.com/mailman/listinfo/openmcl-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20190425/ad589460/attachment.htm>
More information about the Openmcl-devel
mailing list