From 3ebbfe137807678843976f6ffe3b9d93a4233519 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 7 Dec 2016 23:34:06 +0100 Subject: Minor improvements --- thesis/reg-alloc.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thesis/reg-alloc.tex b/thesis/reg-alloc.tex index 711e94f..0fc764e 100644 --- a/thesis/reg-alloc.tex +++ b/thesis/reg-alloc.tex @@ -33,7 +33,7 @@ ( 14930,Heap ctr.) ( 9413,A3) }; - \draw ($({axis cs:100000,S0})-(0,1.6em)$) -- ($({axis cs:100000,A3})+(0,1.6em)$); + \draw ($({axis cs:85000,S0})-(0,2em)$) -- ($({axis cs:85000,A3})+(0,2em)$); \end{axis} \end{tikzpicture} \subcaption{In the Clean compiler} @@ -66,7 +66,7 @@ ( 2,B3) ( 0,B4) }; - \draw ($({axis cs:150,S0})-(0,1.6em)$) -- ($({axis cs:150,A3})+(0,1.6em)$); + \draw ($({axis cs:155,S0})-(0,2em)$) -- ($({axis cs:155,A3})+(0,2em)$); \end{axis} \end{tikzpicture} \subcaption{In the RTS\label{fig:reg-usage:rts}} @@ -153,7 +153,7 @@ In \cref{fig:reg-usage}, we count for each register the number of instructions i When a register is used multiple times in the same instruction, this counts as one occurrence. The vertical line at indicates the number of occurrences that a variable should have to justify putting it in the lower registers, if we were to put the most-used variables in the lower registers - (e.g., there are eight registers with over 100,000 occurrences in the Clean compiler). + (e.g., there are eight registers with over 85,000 occurrences in the Clean compiler). The RTS shows an entirely different pattern (\cref{fig:reg-usage:rts}), because many registers have another meaning in the RTS than in generated code. @@ -164,7 +164,7 @@ For small programs it may not be negligible, \subsection{Optimisation} \label{sec:reg-alloc:optimisation} -\Cref{fig:reg-usage} suggests that we put all variables that occur more than 100,000 times in the low registers. +\Cref{fig:reg-usage} suggests that we put all variables that occur more than 85,000 times in the low registers. However, the B-stack pointer has to be SP: the B- and C-stacks are combined into one (an optimisation suggested early on by \cite{execspecs} \todo{exact ref.}) -- cgit v1.2.3