this is for holding javascript data
Camil Demetrescu edited osr-llvm.tex
over 8 years ago
Commit id: 2621df0776de8eb6b83652b44cc673deee273806
deletions | additions
diff --git a/osr-llvm.tex b/osr-llvm.tex
index a80bc0b..f9bd0fa 100644
--- a/osr-llvm.tex
+++ b/osr-llvm.tex
...
%\subsection{Example}
In this section we discuss how to implement the OSR approach of \mysection\ref{se:overview} in LLVM. Our discussion is based on a simple example that illustrates a profile-driven optimization scenario. We start from a simple base function ({\tt isord}) that checks whether an array of numbers is ordered according to some criterion specified by a comparator, as shown in \myfigure\ref{fi:isord-example}. Our goal is to instrument {\tt isort} so that, whenever the number of iterations of {\tt isord} exceeds a certain threshold, control is dynamically diverted to a faster version generated on the fly by inlining the comparator.
The IR code shown in this section has been generated with \osrkit, an LLVM-based library we
prototyped. \osrkit\ was designed to support VM builders
perform in performing OSR instrumentation of IR code\footnote{Virtual register names and labels in the LLVM-produced IR code shown in this paper have been refactored to make the code more readable.}.
%To explain how the OSR approach of \mysection\ref{se:overview} can be implemented in LLVM, we consider the simple example of \myfigure\ref{fi:isord-example}. Function {\tt isord} checks whether an array of numbers is ordered according to some criterion specified by a comparator.