arvindm95 / unladen-swallow

Automatically exported from code.google.com/p/unladen-swallow
Other
0 stars 0 forks source link

Add fine-grained JIT command line options #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We should have a --jit option (approximate) that controls when and how
often the reoptimizer will run.

--jit=once will compile a function as heavily as possible the first time
it's found hot, then ignore it thereafter. This may mean that bad
predictions can't be corrected; we'll have to see.

--jit=never disables the LLVM integration, forcing all code to run through
the bytecode interpreter.

--jit=everything is equivalent to the current -L[012] options: all
functions are compiled to machine code when they are defined. As functions
are found to be hotter and hotter, they may be reoptimized.

The -O option should be extended to take numeric arguments the way gcc
does. -O[0123] will control the initial optimization used by --jit=once and
--jit=everything.

I'm open to debate on what other options --jit should support. Should
--jit=everything disable reoptimization?

Original issue reported on code.google.com by collinw on 30 May 2009 at 1:35

GoogleCodeExporter commented 8 years ago
Change sent for review.

Original comment by collinw on 10 Jun 2009 at 4:38

GoogleCodeExporter commented 8 years ago
r627 added a -j option: '-j whenhot' is the default, and will compile a 
function when
it is deemed hot. '-j never' forces all execution into the bytecode eval loop.

We still need a '-j always' option that takes over from the -L option. In this
scheme, -L2 would translate to '-j always -O2'.

Unassigning from myself since I won't work on the '-j always' immediately.

Original comment by collinw on 10 Jun 2009 at 9:35

GoogleCodeExporter commented 8 years ago
I lied; too many compile/test cycles.

r633 added -O0, -O1, -O2 flags. -j always coming soon, which will remove 
-L[012].

Original comment by collinw on 12 Jun 2009 at 6:55

GoogleCodeExporter commented 8 years ago
r635 added a '-j always' mode and removed the -L option. -L2 is now spelled '-j
always -O2'.

If anyone thinks of other modes we need, reopen this.

Original comment by collinw on 12 Jun 2009 at 9:07