-
Notifications
You must be signed in to change notification settings - Fork 4
/
main.tex
309 lines (264 loc) · 9.85 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
\documentclass[
%draft% uncomment to activate draft mode (see preamble/proofs)
]{article}
% preamble -- do not rearrange order of \includes
%\include{classoptions}
%\include{pagesize}
%\include{packages}
%\include{encoding}
%\include{fonts}
%\include{ToC}
%\include{contributor}
%\include{copyright}
%\include{bibtex}
%\include{environments}
%\include{sectionoptions}
%\include{headerfooter}
%\include{footnoteformat}
%\include{codesnipets}
%\include{proofs}
\usepackage{hyperref}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
pdftitle={Overleaf Example},
pdfpagemode=FullScreen,
}
\usepackage{amsmath} % for align
\usepackage{subcaption}
\captionsetup{compatibility=false}
\usepackage{algorithm}% http://ctan.org/pkg/algorithms
\usepackage{algpseudocode}% http://ctan.org/pkg/algorithmicx
\usepackage[style=numeric,sorting=none]{biblatex}
\addbibresource{main.bib} %Import the bibliography file
\usepackage{tikz}
\usepackage{graphicx}
\usepackage[export]{adjustbox}
\usepackage{caption}
\usepackage{amssymb}
\usepackage{float}
% \usepackage{subfig}
\usepackage{placeins}
\usepackage{listings}
\lstset{
basicstyle=\ttfamily,
mathescape
}
%\usepackage{minted}
\usetikzlibrary{shapes}
\usetikzlibrary {positioning}
\usetikzlibrary{chains}
\usetikzlibrary{fit}
\usetikzlibrary{chains,shadows.blur}
\usepackage{geometry}
\usepackage{array}
\usepackage{hyperref}
\usepackage{indentfirst}
\usepackage{pdfpages}
\hypersetup{
colorlinks=true,
linkcolor=magenta,
filecolor=cyan,
urlcolor=blue,
}
\graphicspath{ {./images/} }
\usepackage{listings}
\usepackage{xcolor}
\usepackage[autosize]{dot2texi}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\usepackage{tcolorbox}
\newtcolorbox{note}[1]{colback=red!5!white,colframe=red!75!black,fonttitle=\bfseries,title=#1}
\newtcolorbox{definition}[1]{colback=blue!5!white,colframe=blue!75!black,fonttitle=\bfseries,title=#1}
\lstdefinestyle{mystyle}{
% backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\newtcolorbox{proof}[1]{colback=white,colframe=gray,fonttitle=\bfseries,title=#1}
\newtcolorbox{question}[1]{colback=white,colframe=gray,fonttitle=\bfseries,title=#1}
% \usepackage[margin=1in]{geometry}
% \usepackage[T1]{fontenc}
% \usepackage{lmodern}
% \usepackage{mathtools,amssymb}
% \usepackage{graphicx}
% \usepackage{color}
% \usepackage{tikz}
% \usetikzlibrary{positioning}
% \usepackage{microtype}
% \usepackage{hyperref}
% \newcommand{\TODO}[1]{{\color{red}\textit{todo:} #1}}
% % problem and problempart environments.
% % \begin{problem}
% % ...
% % \begin{problempart}
% % ...
% % \end{problempart}
% % \begin{problempart}
% % ...
% % \end{problempart}
% % \end{problem}
% \newcounter{problem}
% \providecommand*{\problemname}{Problem}
% \renewcommand{\theproblem}{\arabic{problem}}
% \newcounter{problempart}[problem]
% \providecommand*{\problempartname}{Problem}
% \renewcommand{\theproblempart}{\arabic{problem}\alph{problempart}}
% \newenvironment{problem}[1][Problem]{\begin{trivlist}%
% \item[\hskip\labelsep {\bfseries #1}~{\bfseries \refstepcounter{problem}\arabic{problem}\label{prob:\theproblem}.}]%
% \addcontentsline{toc}{section}{\protect\numberline{\theproblem} Problem \theproblem}}%
% {\end{trivlist}}
% \newenvironment{problempart}[1][Part]{\begin{trivlist}%
% \item[\hskip\labelsep {\bfseries #1}~{\bfseries \refstepcounter{problempart}\alph{problempart}\label{prob:\theproblempart}.}]%
% \addcontentsline{toc}{subsection}{\protect\numberline{\alph{problempart}} Part \alph{problempart}}}%
% {\end{trivlist}}
% \newcommand{\outs}{\ensuremath{\textsc{out}}}
% \newcommand{\ins}{\ensuremath{\textsc{in}}}
% \newcommand{\exit}{\ensuremath{\textsc{exit}}}
% \newcommand{\entry}{\ensuremath{\textsc{entry}}}
\usepackage{lmodern}
\usepackage{enumitem}
\usepackage{mathtools,amssymb}
\usepackage{graphicx}
\usepackage{color}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{microtype}
% \usepackage[colorlinks]{hyperref}
\newcommand{\TODO}[1]{{\color{red}\textit{todo:} #1}}
\tikzset{
placeholder/.style={text width=6em, font=\mathstrut},
bb/.style={draw, align=center, placeholder},
every label/.style={font=\small}}
\newcounter{problem}
\providecommand*{\problemname}{Problem}
\renewcommand{\theproblem}{\arabic{problem}}
\newcounter{problempart}[problem]
\providecommand*{\problempartname}{Problem}
\renewcommand{\theproblempart}{\arabic{problem}\alph{problempart}}
\newenvironment{problem}[1][Problem]{\begin{trivlist}%
\item[\hskip\labelsep {\bfseries #1}~{\bfseries \refstepcounter{problem}\arabic{problem}\label{prob:\theproblem}.}]%
\addcontentsline{toc}{subsection}{\protect\numberline{\theproblem} Problem \theproblem}}%
{\end{trivlist}}
\newenvironment{problempart}[1][Part]{\begin{trivlist}%
\item[\hskip\labelsep {\bfseries #1}~{\bfseries \refstepcounter{problempart}\alph{problempart}\label{prob:\theproblempart}.}]%
\addcontentsline{toc}{subsubsection}{\protect\numberline{\alph{problempart}} Part \alph{problempart}}}%
{\end{trivlist}}
\newcommand{\outs}{\ensuremath{\textsc{out}}}
\newcommand{\ins}{\ensuremath{\textsc{in}}}
\newcommand{\exit}{\ensuremath{\textsc{exit}}}
\newcommand{\entry}{\ensuremath{\textsc{entry}}}
\tikzset{
placeholder/.style={text width=6em, font=\mathstrut},
bb/.style={draw, align=center, placeholder},
every label/.style={font=\small}}
% \lstset{style=mystyle}
% \lstset{ %
% language=Octave, % the language of the code
% basicstyle=\footnotesize, % the size of the fonts that are used for the code
% numbers=left, % where to put the line-numbers
% numberstyle=\tiny\color{gray}, % the style that is used for the line-numbers
% stepnumber=2, % the step between two line-numbers. If it's 1, each line
% % will be numbered
% numbersep=5pt, % how far the line-numbers are from the code
% backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
% showspaces=false, % show spaces adding particular underscores
% showstringspaces=false, % underline spaces within strings
% showtabs=false, % show tabs within strings adding particular underscores
% frame=single, % adds a frame around the code
% rulecolor=\color{black}, % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. commens (green here))
% tabsize=2, % sets default tabsize to 2 spaces
% captionpos=b, % sets the caption-position to bottom
% breaklines=true, % sets automatic line breaking
% breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
% title=\lstname, % show the filename of files included with \lstinputlisting;
% % also try caption instead of title
% keywordstyle=\color{blue}, % keyword style
% commentstyle=\color{dkgreen}, % comment style
% stringstyle=\color{mauve}, % string literal style
% escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
% morekeywords={*,...} % if you want to add more keywords to the set
% }
% define issue details
\title{Compiler Optimization Notes}
\newcommand\thejournalsubtitle{Notes for the Compiler Optimization Techniques}
\newcommand\thevolume{}
\newcommand\theseason{May}
\newcommand\theyear{2022}
\newcommand\theissue{\thejournal \ \thevolume \ (\theyear)}
\newcommand\generaleditor{}
\newcommand\associateeditor{}
\sloppy
\newcommand\thewebsite{https://github.com/liusy58/CompilerNotes}
\begin{document}
\sloppy % preferences more space between words over overrunning margins
\lefthyphenmin=3 % suppresses hyphenation after only 1 or 2 characters
% NB: You will need to repeat \lefthyphenmin in the text if you use \selectlanguage
%\include{editorialboard}
%\include{titlepage}
%\include{colofon}
\pagenumbering{roman}
%\tableofcontents
\thispagestyle{empty}
\maketitle
\tableofcontents
% \include{essays/preface}
\pagenumbering{arabic}
% \input{Foundations-of-Dataflow.tex}
% \input{More Examples of Data Flow Analysis}
\input{LocalOptimizations.tex}
\input{IntroToDFA.tex}
\input{Reaching Definitions.tex}
\input{Live Variabl Analysis.tex}
\input{Available Expressions Analysis.tex}
\input{Constant Propagation.tex}
\input{Foundations of Data Flow Analysis.tex}
\input{Introduction To SSA}
\input{SSA-Style Optimizations.tex}
\input{LLVMProj.tex}
\input{LICM.tex}
\input{SR.tex}
\input{PRE.tex}
\input{LCM.tex}
\input{AnotherLCM.tex}
\input{RA.tex}
\input{PA.tex}
\input{RegAlloc.tex}
\input{LS.tex}
\input{SoftwarePipe.tex}
\input{Dynamic Code Optimization.tex}
\input{DSL.tex}
\input{MHO.tex}
\input{DataPrefetching.tex}
\input{Parallelism and Dependence Theory.tex}
\input{TLS.tex}
\input{PGO.tex}
\input{Concurrent.tex}
\input{CPP.tex}
\input{C++11MemoryModel.tex}
\input{Dependence Analysis.tex}
\input{Alias Analysis.tex}
\input{EarlyOpts.tex}
\input{LLVMInst.tex}
\newpage
\printbibliography
\end{document}