Skip to content

Commit

Permalink
Inline CSE fig.
Browse files Browse the repository at this point in the history
  • Loading branch information
sudonatalie committed Jun 7, 2017
1 parent bce29d0 commit 97b4981
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Chapters/RelatedWork.lhs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ The GHC compilation process consists of translating Haskell code into a second-o

The syntax of the Core intermediate language of Haskell is very similar to Treeless, with expressions consisting mainly of $\lambda$ abstractions, |let| bindings, |case| expressions, constructors, literals and function applications, much like Agda's Treeless syntax.% outlined in Figure~\ref{code:TTerm}.

CSE is implemented in GHC with a single recursive traversal of the Core program. For each expression, its subexpressions are first transformed, then it is determined whether the whole transformed expression has occurred already \citep{Chitil-1998}. An example of this is shown in Figure~\ref{code:cse_haskell}.
CSE is implemented in GHC with a single recursive traversal of the Core program. For each expression, its subexpressions are first transformed, then it is determined whether the whole transformed expression has occurred already \citep{Chitil-1998}.

\begin{figure}[h]
Given the expression:

|let x = 3 in let y = 2+3 in 2+3+4|
Expand All @@ -28,10 +27,6 @@ and then the recursive transformation produces:

|let x = 3 in let y = 2+x in 2+x+4|

\caption{Common subexpression elimination transformation in Haskell \citep{Chitil-1998}.}
\label{code:cse_haskell}
\end{figure}

\section{Let-floating}
\label{sec:let_floating}

Expand Down

0 comments on commit 97b4981

Please sign in to comment.