Summary

This code will trigger an inlining loop

Metadata

Description

When compiling the following code with -O3 it will trigger an inlining loop observable with -debug i

 (define (main-loop renderer)
   (main-loop renderer))
 
 (when (zero? 0)
   (let ()
     (when #t
       (when #t
         (main-loop renderer)))))



 ...
 inlining: "(t.scm:2) main-loop" f_193 14 
 inlining: "(t.scm:2) main-loop" f_193 14 
 ...

Changes and comments

[2015-11-27 21:40:53 UTC] ckeen changed version from 4.9.x to 4.10.x

[2015-11-27 21:40:53 UTC] ckeen changed component from unknown to compiler

[2015-11-27 21:42:09 UTC] ckeen wrote:

Also -O2

[2016-08-25 20:23:24 UTC] sjamaan set difficulty to hard

[2022-10-21 16:16:09 UTC] felix changed status from new to closed

[2022-10-21 16:16:09 UTC] felix set resolution to fixed

[2022-10-21 16:16:09 UTC] felix wrote:

Seems to have been fixed a while ago:

 inlining: "(x.scm:2) main-loop" f_128 14 
 inlining: "(x.scm:2) main-loop" f_128 18 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_128 
 inlining: "(x.scm:8) main-loop" f_128 10 
 inlining: "(x.scm:2) main-loop" f_128 10 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_126 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_128 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_126 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_128 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_126 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_128 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_126 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_128 
 not inlining as unroll-limit is exceeded: "(x.scm:2) main-loop" f_128 f_126