Options to disable specific optimizations in Ion?

I am curious whether there are any options for the ‘js’ to disable specific Ion
optimizations, e.g.,typing etc, for all the optimization options or not. I know there are options for some optimizations, but I am wondering whether we have full control of “all” the optimizations without actually modifying the Ion compiler source code.

Yes, there is an environment variable for each Ion phase, named JIT_OPTION_<phase_name>

Hi,

Thank you for the answer.
However, I still am curious whether the options represent “all” the optimizations.
For example, I cannot locate any options that control (optimized) types,
e.g., type-lowering and typer phases in v8.
Is there any place (document, source code) that listed out the optimization phases
that IonMonkey passes?

Thanks!

The IonMonkey pipeline is described by these 3 functions.

You will find inside it the same toogle that I mentioned previously as JIT_OPTION_<name>, used in the code as JitOptions.<name>.

We have the ApplyTypeInformation phases which is mandatory. The reason it is mandatory is that we do not materialized generic types ahead to later remove this box-unbox pairs. Instead, we use this phase to only generate these MBox and MUnbox instructions where this is necessary. As our type information is completely implicit before this phase, and that other phases expect to have coherent types. This phase is mandatory.

Thank you. Your answers really help.

So, not all options are controllable (at least only with the options passed to the js executable) as some of the phases are required to be executed, e.g., ApplyTypeInformation phases as you mentioned, if the JIT is on.

Again. this is very helpful.