mraleph / irhydra

Tool for displaying IR used by V8 and Dart VM optimizing compilers
Apache License 2.0
433 stars 32 forks source link

Add a description to all instructions #35

Closed ooflorent closed 9 years ago

ooflorent commented 9 years ago

Currently the only instructions with a description are: Change, CheckMaps and Deoptimize. Adding a description to all instructions (or the commonest) would be a great improvement to understand the IR.

mraleph commented 9 years ago

There are many instructions to document and most of them have self explanatory naming. If you have examples of unclearly named instructions please post them here.

On Fri, Jan 9, 2015, 14:28 Florent Cailhol notifications@github.com wrote:

Currently the only instructions with a description are: Change, CheckMaps and Deoptimize. Adding a description to all instructions (or the commonest) would be a great improvement to understand the IR.

— Reply to this email directly or view it on GitHub https://github.com/mraleph/irhydra/issues/35.

ooflorent commented 9 years ago

Everything related to Osr:

What is changes[*] after CallWithDescriptor?

mraleph commented 9 years ago

Will add. Here is explanation:

OSR stands for on stack replacement a process when a version of the code for a running function is replaced by a different version of the code (e.g. optimized) while the function is still running (is on the stack). OSR is used to optimize functions with long running loops while these loops are still running.

OsrEntry and UnknownOSRValue are HIR instructions that are used to represent OSR entry in the control flow graph (UnknownOSRValue evaluates to a value that was in the given place in the environment when OSR happens).

In general you don't need to concern yourself with semantics of these instructions - they are implementation detail of OSR mechanism.

changes[*] means changes[everything] - that is has arbitrary side effects compiler can't reason about.