comparison presen/index.html @ 76:a4d16779fd1e

modify explanation of GCC
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 03 Jan 2012 21:42:31 +0900
parents 454ddda8d306
children 2697e09f6ce9
comparison
equal deleted inserted replaced
75:454ddda8d306 76:a4d16779fd1e
237 <li class="incremental">CbCの実装においてはGeneric Tree生成部分とRTLへの変換部分に修正が加えられている。</li> 237 <li class="incremental">CbCの実装においてはGeneric Tree生成部分とRTLへの変換部分に修正が加えられている。</li>
238 <li class="incremental">Generic Tree生成部分について詳しく触れてみる。</li> 238 <li class="incremental">Generic Tree生成部分について詳しく触れてみる。</li>
239 </ul> 239 </ul>
240 </div> 240 </div>
241 <!-- PAGE --> 241 <!-- PAGE -->
242 <!--
242 <div class="slide"> 243 <div class="slide">
243 <h1>GCC:Generic Tree</h1> 244 <h1>GCC:Generic Tree</h1>
244 <li>Generic Treeではソースコードの内容が FUNCTION_TYPE, CALL_EXPR, MODIFY_EXPR 等と言った形で表される。</li> 245 <li>Generic Treeではソースコードの内容が FUNCTION_TYPE, CALL_EXPR, MODIFY_EXPR 等と言った形で表される。</li>
245 <table class="center" width=100% border=1> 246 <table class="center" width=100% border=1>
246 <tr> 247 <tr>
263 </td> 264 </td>
264 </tr> 265 </tr>
265 </table> 266 </table>
266 <p class="center"><small>Generic Treeでの表現</small></p> 267 <p class="center"><small>Generic Treeでの表現</small></p>
267 </div> 268 </div>
269 -->
268 <!-- PAGE --> 270 <!-- PAGE -->
269 <div class="slide"> 271 <div class="slide">
270 <h1>GCC:Generic Tree</h1> 272 <h1>GCC:Generic Tree</h1>
271 <li>それぞれの命令はSTATEMENT_LISTでまとめて保持される。</li> 273 <li><small>CALL_EXPRE、MODIFY_EXPR等といった表現で扱われる。</small></li>
272 <table width=100% border=1> 274 <table width=100% border=1>
273 <tr> 275 <tr>
274 <td class="center"><small>ソースコード</small></td> 276 <td class="center"><small>ソースコード</small></td>
275 <td class="center"><small>Generic Treeでの表現</small></td> 277 <td class="center"><small>Generic Treeでの表現</small></td>
276 </tr> 278 </tr>
285 return b; 287 return b;
286 } 288 }
287 </pre> 289 </pre>
288 </small> 290 </small>
289 </td> 291 </td>
290 <td> 292 <td style="margin-left:auto; margin-right:auto; text-align: center;">
291 <p class="center"> 293 <img src="./pix/STATEMENT_LIST.png" style="height: 7em;">
292 <img src="./pix/STATEMENT_LIST.png" style="height: 6em;">
293 </p>
294 </td> 294 </td>
295 </tr> 295 </tr>
296 </table> 296 </table>
297 <li class="incremental">CbCの実装においてこのGeneric Treeの生成を意識していくことになる。</li> 297 <li class="incremental">CbCの実装においてこのGeneric Treeの生成を意識していくことになる。</li>
298 </div> 298 </div>
312 <ul> 312 <ul>
313 <li>シンタックスの追加</li> 313 <li>シンタックスの追加</li>
314 <li>末尾除去:Tail Call Elimination(TCE)</li> 314 <li>末尾除去:Tail Call Elimination(TCE)</li>
315 <li>レジスタによる引数渡し(fastcall属性の付与)</li> 315 <li>レジスタによる引数渡し(fastcall属性の付与)</li>
316 <li>環境付き継続</li> 316 <li>環境付き継続</li>
317 <!--
317 <li>__rectype の実装</li> 318 <li>__rectype の実装</li>
319 -->
318 </ul> 320 </ul>
319 </div> 321 </div>
320 <!-- PAGE --> 322 <!-- PAGE -->
321 <div class="slide"> 323 <div class="slide">
322 <h1>CbCの実装:シンタックスの追加</h1> 324 <h1>CbCの実装:シンタックスの追加</h1>
1028 </ul> 1030 </ul>
1029 </ul> 1031 </ul>
1030 </div> 1032 </div>
1031 <!-- PAGE --> 1033 <!-- PAGE -->
1032 <div class="slide"> 1034 <div class="slide">
1033 <h1>CbCの機能の拡張:__rectype の実装</h1>
1034 <li>通常、関数の引数に関数ポインタを渡した際は以下の様に使われる。</li>
1035 <small>
1036 <pre>
1037 void factorial(int n, int result, void(*print)()){
1038 :
1039 (*print)(n,result,print,exit1, envp);
1040 }
1041 </pre>
1042 </small>
1043 <li>以下の様に引数に()をつけて受けてることをやめたい。</li>
1044 <small>
1045 <pre>
1046 void factorial(int n, int result, void *print){
1047 :
1048 void(*print)(n,result,print,exit1, envp);
1049 }
1050 </pre>
1051 </small>
1052 </div>
1053 <!-- PAGE -->
1054 <div class="slide">
1055 <h1>CbCの機能の拡張:__rectype の実装</h1>
1056 <li>そこで、__rectype という予約後を作り、以下の宣言を行えるようにした。</li>
1057 <pre>
1058 __code factorial(int n, int result, __rectype *print) {
1059 :
1060 goto (*print)(n,result,print,exit1, envp);
1061 }
1062 </pre>
1063 </div>
1064 <!-- PAGE -->
1065 <div class="slide">
1066 <h1>CbCの機能の拡張:selftype</h1>
1067 <h2>selftypeの実装</h2>
1068 <li>以下の宣言が行えるようにしたい。</li>
1069 <small>
1070 <pre>
1071 typedef sturct node {
1072 selftype *left;
1073 selftype *right;
1074 int num;
1075 }*NODE
1076 </pre>
1077 <p>selftype は struct node を指す。</p>
1078 </small>
1079 <ul>
1080 <li>上記の構文は実装を行う予定である。</li>
1081 </ul>
1082 </div>
1083 <!-- PAGE -->
1084 <div class="slide">
1085 <h1>Micro-Cとの比較</h1> 1035 <h1>Micro-Cとの比較</h1>
1086 <li>Micro-C,GCC-4.4とGCC-4.6のCbCコンパイラでコンパイルしたプログラムの実行の速度</li> 1036 <li>Micro-C,GCC-4.4とGCC-4.6のCbCコンパイラでコンパイルしたプログラムの実行の速度</li>
1087 <table width=100% class="center"> 1037 <table width=100% class="center">
1088 <td> 1038 <td>
1089 <img src="./pix/mac_conv.png"> 1039 <img src="./pix/mac_conv.png">
1117 </ul> 1067 </ul>
1118 <li>llvmへのCbCの実装</li> 1068 <li>llvmへのCbCの実装</li>
1119 </ul> 1069 </ul>
1120 </div> 1070 </div>
1121 <!-- PAGE --> 1071 <!-- PAGE -->
1072 <div class="slide">
1073 <h1>CbCの機能の拡張:__rectype の実装</h1>
1074 <li>通常、関数の引数に関数ポインタを渡した際は以下の様に使われる。</li>
1075 <small>
1076 <pre>
1077 void factorial(int n, int result, void(*print)()){
1078 :
1079 (*print)(n,result,print,exit1, envp);
1080 }
1081 </pre>
1082 </small>
1083 <li>以下の様に引数に()をつけて受けてることをやめたい。</li>
1084 <small>
1085 <pre>
1086 void factorial(int n, int result, void *print){
1087 :
1088 void(*print)(n,result,print,exit1, envp);
1089 }
1090 </pre>
1091 </small>
1092 </div>
1093 <!-- PAGE -->
1094 <div class="slide">
1095 <h1>CbCの機能の拡張:__rectype の実装</h1>
1096 <li>そこで、__rectype という予約後を作り、以下の宣言を行えるようにした。</li>
1097 <pre>
1098 __code factorial(int n, int result, __rectype *print) {
1099 :
1100 goto (*print)(n,result,print,exit1, envp);
1101 }
1102 </pre>
1103 </div>
1104 <!-- PAGE -->
1105 <div class="slide">
1106 <h1>CbCの機能の拡張:selftype</h1>
1107 <h2>selftypeの実装</h2>
1108 <li>以下の宣言が行えるようにしたい。</li>
1109 <small>
1110 <pre>
1111 typedef sturct node {
1112 selftype *left;
1113 selftype *right;
1114 int num;
1115 }*NODE
1116 </pre>
1117 <p>selftype は struct node を指す。</p>
1118 </small>
1119 <ul>
1120 <li>上記の構文は実装を行う予定である。</li>
1121 </ul>
1122 </div>
1123 <!-- PAGE -->
1122 </div> 1124 </div>
1123 </body> 1125 </body>
1124 </html> 1126 </html>