graalvm / sulong

Obsolete repository. Moved to oracle/graal.
Other
628 stars 63 forks source link

Add On-Stack Replacement for Sulong. #859

Open rmosaner opened 6 years ago

rmosaner commented 6 years ago

This PR adds On-Stack Replacement (OSR) for Sulong.

Based on the block based structure of LLVM IR bitcodes, loops are detected and for each loop a new node is created, which conforms to Truffle interface for loop nodes and replaces the basic block which was identified as the header of the loop.

Thus, Graal can replace loops during (interpreted) execution with optimized (compiled) versions, yielding a faster warmup. However, due to additional nodes, peak performance can be negatively affected.

Parameters (with default values) for playing around with OSR: