Skip to content

rts: Inlining failed warnings from Schedule.h

For a long time we have been seeing failed-inlining warnings from the RTS:

In file included from rts/Schedule.c:16:0: error:
rts/Schedule.c: In function ‘schedule’:

rts/Schedule.h:143:1: error:
     warning: inlining failed in call to ‘appendToRunQueue’: call is
unlikely and code size would grow [-Winline]
      143 | appendToRunQueue (Capability *cap, StgTSO *tso)
          | ^~~~~~~~~~~~~~~~
    |
143 | appendToRunQueue (Capability *cap, StgTSO *tso)
    | ^

rts/Schedule.c:1226:9: error:
     note: called from here
     1226 |         appendToRunQueue(cap,t);
          |         ^~~~~~~~~~~~~~~~~~~~~~~
     |
1226 |         appendToRunQueue(cap,t);
     |         ^

In file included from rts/Schedule.c:16:0: error:

rts/Schedule.h:164:1: error:
     warning: inlining failed in call to ‘pushOnRunQueue’: call is unlikely
and code size would grow [-Winline]
      164 | pushOnRunQueue (Capability *cap, StgTSO *tso)
          | ^~~~~~~~~~~~~~
    |
164 | pushOnRunQueue (Capability *cap, StgTSO *tso)
    | ^

rts/Schedule.c:1228:9: error:
     note: called from here
     1228 |         pushOnRunQueue(cap,t);
          |         ^~~~~~~~~~~~~~~~~~~~~
     |
1228 |         pushOnRunQueue(cap,t);
     |         ^
rts/Schedule.c: At top level:
cc1: warning: unrecognized command line option

These functions are fairly large, each consisting of at least three basic blocks, and consequently I doubt that inlining would be beneficial even if GCC followed our hints. I suggest that we just drop the inline declspecs from the helpers in Schedule.h.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information