annotate cfopm.tex @ 22:26e2376219e0

fixxxxxx
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Sun, 05 Jul 2015 03:21:54 +0900
parents e13520c327f1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 \documentclass[conference]{IEEEtran}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 \usepackage[cmex10]{amsmath}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 \usepackage{url}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 \usepackage{listings}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 \usepackage[dvipdfmx]{graphicx}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 \lstset{
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 frame=single,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 keepspaces=true,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 stringstyle={\ttfamily},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 commentstyle={\ttfamily},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 identifierstyle={\ttfamily},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 keywordstyle={\ttfamily},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 basicstyle={\ttfamily},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 breaklines=true,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 xleftmargin=0zw,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 xrightmargin=0zw,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 framerule=.2pt,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 columns=[l]{fullflexible},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 numbers=left,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 stepnumber=1,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 numberstyle={\scriptsize},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 numbersep=1em,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 language=c,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 tabsize=4,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 lineskip=-0.5zw,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 escapechar={@},
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 \ifCLASSINFOpdf
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 % \usepackage[pdftex]{graphicx}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 % declare the path(s) where your graphic files are
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 % \graphicspath{{../pdf/}{../jpeg/}}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 % and their extensions so you won't have to specify these with
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 % every instance of \includegraphics
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 \else
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 % will default to the driver specified in the system graphics.cfg if no
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 % driver is specified.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 % \usepackage[dvips]{graphicx}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 % declare the path(s) where your graphic files are
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 % \graphicspath{{../eps/}}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 % and their extensions so you won't have to specify these with
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 % every instance of \includegraphics
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 % \DeclareGraphicsExtensions{.eps}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 \fi
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 % correct bad hyphenation here
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 \hyphenation{op-tical net-works semi-conduc-tor}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 \begin{document}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 %
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 % paper title
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 % Titles are generally capitalized except for words such as a, an, and, as,
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 % at, but, by, for, in, nor, of, on, or, the, to and up, which are usually
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 % not capitalized unless they are the first or last word of the title.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 % Linebreaks \\ can be used within to get better formatting as desired.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 % Do not put math or special symbols in the title.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 \title{Implementing Continuation based language in LLVM and Clang}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 % author names and affiliations
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 % use a multiple column layout for up to three different
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 % affiliations
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 \author{
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 \IEEEauthorblockN{Kaito TOKUMORI}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 \IEEEauthorblockA{University of the Ryukyus \\ Email: kaito@cr.ie.u-ryukyu.ac.jp}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 \and
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 \IEEEauthorblockN{Shinji KONO}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 \IEEEauthorblockA{University of the Ryukyus \\ Email: kono@ie.u-ryukyu.ac.jp}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 % make the title area
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 \maketitle
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 % As a general rule, do not put math, special symbols or citations
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 % in the abstract
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 \begin{abstract}
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
83 The programming paradigm which use data segments and code segments
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
84 are proposed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
85 This paradigm uses Continuation based C (CbC),
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
86 which a slight modified C language.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
87 Code segments are units of calculation and
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
88 Data segments are sets of typed data.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
89 We use these segments as units of computation and meta computation.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
90 In this paper we show the implementation of CbC on LLVM and Clang 3.7.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 \end{abstract}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 % no keywords
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 % For peer review papers, you can put extra information on the cover
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 % page as needed:
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 % \ifCLASSOPTIONpeerreview
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 % \begin{center} \bfseries EDICS Category: 3-BBND \end{center}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 % \fi
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 %
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 % For peerreview papers, this IEEEtran command inserts a page break and
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 % creates the second title. It will be ignored for other modes.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 \IEEEpeerreviewmaketitle
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 \section{A Practical Continuation based Language}
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
109 The proposed units of programming are named code segments and data segments.
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
110 Code segments are units of calculation which have no state.
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
111 Data segments are sets of typed data.
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
112 Code segments are connected to data segments by a meta data segment called a context.
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
113 After the execution of a code segment and its context, the next code segment (continuation) is executed.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114
3
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
115 Continuation based C (CbC) \cite{DBLP:journals/corr/abs-1109-4048}, hereafter referred to as CbC, is a slight modified C which supports code segments. It is compatible with C and has continuation as a goto statement.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
117 Code segments and data segments are low level enough to represent computational details,
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
118 and are architecture independent. They can be used as architecture independent assemblers.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
120 % CbC has stand alone compiler and GCC version. Here we report new partial implementation of CbC compiler based on LLVM and Clang 3.7.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
121 CbC was first implemented on micro-C one path compiler.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
122 GCC based CbC compiler is developed in 2008\cite{DBLP:journals/corr/abs-1109-4048}.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
123 GCC is GNU Compiler Collection \cite{gcc}.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
124 In GCC version, nested function is used to implement goto with environment in 2011\cite{CbC2011}.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
125 In this study, we report a latest CbC compiler which is implemented
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
126 in LLVM and Clang 3.7.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
127
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
128 \verb+C--+ \cite{cminusminus} is also known as a lower level language of C. It has precise type specification and goto statement with parameters.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
129 CbC introduces \verb+__code++ type for code segment which makes clear separation of functions and code segments.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131 \section{Continuation based C}
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
132 CbC's basic programming unit is the code segment. These are not subroutines, but they look like functions because they take input and produce output. Both input and output should be data segments. Table \ref{src:example} details the definition of the data segment.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 \begin{table}[html]
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 \begin{lstlisting}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 __code f(Allocate allocate){
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 allocate.size = 0;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 goto g(allocate);
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141 // data segment definition
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 // (generated automatically)
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 union Data {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144 struct Allocate {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 long size;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 } allocate;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 };
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 \end{lstlisting}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 \caption{CbC Example}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 \label{src:example}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 \end{table}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
153 In this example, the code segment {\bf f} takes the input data segment {\bf allocate} (allocate is the data segments identifier) and sends f's output to the code segment {\bf g}. The CbC compiler generates the data segment definition automatically, so writing it is unnecessary. There is no return from code segment {\bf g}. {\bf G} should call another continuation using {\bf goto}. Code segments have input data segments and output data segments. Data segments have two kind of dependency with code segments.
3
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
154 First, Code segments access the contents of data segments using field names. So data segments should have the named fields.
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
155 The second dependency is a data dependency, that is all input data segments should be ready before their execution.
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
156
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 \begin{figure}[htp]
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 \begin{center}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 \scalebox{0.5}{\includegraphics{fig/csds.pdf}}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 \end{center}
1
97e85476344e fix typos
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
161 \caption{Code Segments and Data Segments on CbC}
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 \label{fig:csds}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 \end{figure}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
165 Shifting completely, from C to CbC is unnecessary as in CbC we can go to code segments from C functions and call C functions in code segments The latter is straightforward but the former needs further extensions.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 \begin{table}[html]
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 \begin{lstlisting}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169 int main() {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 goto hello("Hello World\n", __return, __environment);
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 __code hello(char *s, __code(*ret)(int, void*), void *env) {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 printf(s);
3
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
175 goto (*ret)(123);
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 \end{lstlisting}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 \caption{Call C Functions in a Code Segment}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 \label{src:example}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 \end{table}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181
3
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
182 In this hello world example, the environment of {\bf main}() and its continuation is kept in the variable {\bf \_\_environment}. The environment and the continuation can be accessed using {\bf \_\_environment} and {\bf \_\_return}.The arbitrary mixing of code segments and functions is allowed. The continuation of a {\bf goto} statement never returns to the original function, but goes to the caller or the original function. In that case, it returns the result 123 to the operating system. This continuation is called {\bf goto with environment}.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
183
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 \section{LLVM and Clang}
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
185 The LLVM Project is a collection of modular and reusable compilers and tool chain technologies, and the LLVM Core libraries provide a modern source and target independent optimizer, along with code generation support for many popular CPUs. Clang is an LLVM native C/C++/Objective-C compiler. Figure \ref{fig:structure} shows Clang and LLVM's compilation flow.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 \begin{figure}[htp]
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 \begin{center}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
189 \scalebox{0.25}{\includegraphics{fig/clang_llvm_structure.pdf}}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
190 \end{center}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
191 \caption{LLVM and Clang structure}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
192 \label{fig:structure}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 \end{figure}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
195 LLVM has an intermediate representation which is called LLVM IR\cite{LLVMIR}. This part remains unmodified so that the optimization part does not need to be modified.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 \section{Implementation in LLVM and Clang}
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
198 The CbC compiler is implemented in LLVM and Clang using the following ideas.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 \begin{itemize}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 \item Code segments are implemented by C functions.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202 \item Transition is implemented by forced tail call.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 \item Goto with environment is implemented by setjmp and longjmp.
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 \end{itemize}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
206 {\bf \_\_code} is implemented as a new type keyword in LLVM and Clang. {\bf \_\_code} is similar to an attribute of a function, which means that the function can only be called in tail call elimination. Because of this implementation, code segments can actually be called as C function calls.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
208 Forcing a tail call requires many conditions be met. For example, there should not be a statement after a tail call, the caller and callee's calling conventions must be the same and their types should be cc10, cc11 or fastcc and the callee's return value type has to be the same as the caller's.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
210 All code segments have the void return type and writing statements after continuation is not allowed. As a result, type problems and after statement problems are solved.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
211
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
212 Tail call elimination passes are enabled in {\bf BackendUtil.cpp}. In Clang, when the optimization level is two or more, tail call elimination passing is enable. Here it has been modified to be enabled anytime, however if the optimization level is one or less, tail call elimination passes only work for code segments.
3
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
213 A calling convention problem was also solved. fastcc was selected for a code segment's calling convention. In Clang, calling conventions are managed by the CGFunctionInfo class and its information is set in {\bf CGCall.ccp} ( a part of CodeGen ), which is where code segments calling conventions were set to fastcc.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
214
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
215 Goto with environment is implemented by code rearranging. If the {\bf \_\_environment} or {\bf \_\_return} is declared, the CbC compiler rearranges the code for goto with environment. Setjmp and longjmp are used to do this. setjmp to save the environment before continuation and longjmp to restore it.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
216
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 \section{Result}
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
218 Table \ref{src:example} shows the benchmark program.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
219
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
220 \begin{table}[html]
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 \begin{lstlisting}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 int f0(int i) {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
223 int k,j;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
224 k = 3+i;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 j = g0(i+3);
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 return k+4+j;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
228
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
229 int g0(int i) {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
230 return h0(i+4)+i;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
231 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
232
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
233 int h0(int i) {
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
234 return i+4;
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
235 }
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
236 \end{lstlisting}
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
237 \caption{benchmark program in C}
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
238 \label{src:example}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
239 \end{table}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
240
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
241 Fig.\ref{src:example} is a normal C program. We can rewrite this program into CbC in several way, \verb+conv1,conv2,conv3+.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
242 Basicaly function call is emulated by goto statement with explicit stack. \verb+conv2,conv3+ uses extra
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
243 argument to eliminate these stacks.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
244 The CbC \verb+conv3+ source is shown in fig.\ref{src:cbc}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
245 Using this benchmark, function call overhead become visible.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
246 In order to see the overhead, inline function expansion is prohibited.
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
247 The benchmark results are shown in TABLE \ref{result}.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
248
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
249 \begin{table}[html]
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
250 \begin{lstlisting}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
251
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
252 struct cont_interface { // General Return Continuation
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
253 __code (*ret)();
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
254 };
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
255
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
256 __code f2_1(int i,char *sp) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
257 int k,j;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
258 k = 3+i;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
259 goto g2_1(k,i+3,sp);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
260 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
261
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
262 __code g2_1(int k,int i,char *sp) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
263 goto h2_11(k,i+4,sp);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
264 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
265
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
266 __code h2_1_1(int i,int k,int j,char *sp) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
267 goto f2_0_1(k,i+j,sp);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
268 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
269
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
270 __code h2_11(int i,int k,char *sp) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
271 goto h2_1_1(i,k,i+4,sp);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
272 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
273
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
274 __code f2_0_1(int k,int j,char *sp) {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
275 goto (( (struct cont_interface *)sp)->ret)(k+4+j,sp);
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
276 }
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
277
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
278 \end{lstlisting}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
279 \caption{benchmark program conv3 in CbC}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
280 \label{src:cbc}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
281 \end{table}
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
282
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 \begin{table}[htpb]
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 \centering
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 \begin{tabular}{|l|r|r|r|} \hline
7
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 3
diff changeset
286 & conv1 & conv2 & conv3 \\ \hline
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
287 Micro-C & 6.875 & 2.4562 & 3.105 \\ \hline
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
288 GCC -O2 & 2.9438 & 0.955 & 1.265 \\ \hline
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
289 LLVM/clang -O0 & 5.835 & 4.1887 & 5.0625 \\ \hline
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
290 LLVM/clang -O2 & 3.3875 & 2.29 & 2.5087 \\ \hline
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
291 \end{tabular}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
292 \caption{Execution time(s)}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
293 \label{result}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
294 \end{table}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
295
3
c50a033e6635 create presentation slide
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
296 LLVM and Clang compilers are faster than Micro-C when optimization is enabled. This means CbC get benefits from LLVM optimizations. The LLVM and Clang complier is slower than GCC, but GCC cannot compile safely without optimization. This means LLVM can compile more reliably than GCC.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
297
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
298 \section{Conclusion}
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
299 This Continuation based language has been designed and implemented for practical use. CbC has been partially implemented using LLVM and Clang 3.7.
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
300 CbC can use LLVM's optimization. LLVM IR was not modified to implement CbC's compiler.
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
301
2
771136eae970 proofread
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
302 In the future, data segments, meta code segments and meta data segments for meta computation will be designed and implemented.
18
e13520c327f1 add repository references
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
303 \nocite{opac-b1092711, LLVMIR, LLVM, clang, repo}
0
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
304 \bibliographystyle{IEEEtran}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
305 \bibliography{IEEEabrv,reference}
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
306
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
307
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
308
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
309 % that's all folks
c0d36568602d 1st commit
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
310 \end{document}