If you know Ruby more than you know LLVM and want to see a practical example, I gave a talk about the same idea in the context of Ruby http://chrisseaton.com/rubytruffle/deoptimizing/
Check Widening in LLVM
11–13 of 13 posts
Re: Check Widening in LLVM
#12Why "discard the current runtime frame, and resume execution in the interpreter" rather than jump into a compiled but unoptimized version of the function?
You could do the latter too, and that's what V8 does for example (at least until they roll out the interpreter).
Yup. The "obvious" downside to that is that you'll burn CPU cycles and memory by generating and keeping around a slow-but-correct compile for every function.
Re: Check Widening in LLVM
#13Earlier quoted context omitted.
You could do the latter too, and that's what V8 does for example (at least until they roll out the interpreter).
Yup. The "obvious" downside to that is that you'll burn CPU cycles and memory by generating and keeping around a slow-but-correct compile for every function.
[deleted]