[pypy-commit] extradoc extradoc: more about the example
cfbolz
noreply at buildbot.pypy.org
Sat Aug 11 00:33:46 CEST 2012
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: extradoc
Changeset: r4515:4aee3b0b93d1
Date: 2012-08-10 23:36 +0200
http://bitbucket.org/pypy/extradoc/changeset/4aee3b0b93d1/
Log: more about the example
diff --git a/talk/vmil2012/paper.tex b/talk/vmil2012/paper.tex
--- a/talk/vmil2012/paper.tex
+++ b/talk/vmil2012/paper.tex
@@ -274,7 +274,9 @@
make the example more interesting. If the loop in \lstinline{check_reduces} is
traced when \lstinline{a} is a multiple of four, the unoptimized
trace looks like in Figure~\ref{fig:unopt-trace}. The line numbers in the trace
-correspond to the line numbers in Figure~\ref{fig:trace-log}.
+correspond to the line numbers in Figure~\ref{fig:trace-log}. The resulting
+trace repeatedly halves the current value and checks whether it is equal to
+one, or odd. In either of these cases the trace is left via a guard failure.
\begin{figure}
\input{figures/unopt-log.tex}
@@ -431,11 +433,17 @@
So far no special compression is done with this information,
compared to the other source of information delayed heap stores are quite rare.
-\begin{figure}
-\includegraphics[width=0.5\textwidth]{figures/resume_data.pdf}
-\caption{The resume data for Figure~\ref{fig:trace-log}}
-\label{fig:resume-data}
-\end{figure}
+Figure~\ref{fig:trace-log} shows the optimized version of the trace in
+Figure~\ref{fig:fig:unopt-trace}. Allocation removal has removed the
+\lstinline{new} operation and other operations handling the boxes. The
+operations handle unboxed numbers now.
+
+Figure~\ref{fig:resume-data} sketches the symbolic frames of the first two
+guards in the trace. The frames for \lstinline{check_reduces} and
+\lstinline{Even.step} as well as the description of the allocation-removed
+virtual instance of \lstinline{Even} are shared between the two guards.
+
+\todo{fix labels in diagram}
% section Resume Data (end)
@@ -448,6 +456,13 @@
\section{Guards in the Backend}
\label{sec:Guards in the Backend}
+\begin{figure}
+\includegraphics[width=0.5\textwidth]{figures/resume_data.pdf}
+\caption{The resume data for Figure~\ref{fig:trace-log}}
+\label{fig:resume-data}
+\end{figure}
+
+
After optimization the resulting trace is handed to the over platform specific
backend to be compiled to machine code. The compilation phase consists of two
passes over the lists of instructions, a backwards pass to calculate live
More information about the pypy-commit
mailing list