Mercurial > hg > Papers > 2015 > kaito-lola
comparison presentation/presen.html @ 16:c3d20ec1ec4b
spell check
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 04 Jul 2015 23:36:52 +0900 |
parents | bbbeecda034d |
children | 889696aa5018 |
comparison
equal
deleted
inserted
replaced
15:bbbeecda034d | 16:c3d20ec1ec4b |
---|---|
419 </div> | 419 </div> |
420 | 420 |
421 <div class='slide'> | 421 <div class='slide'> |
422 <h2>Goto with environment</h2> | 422 <h2>Goto with environment</h2> |
423 <p> | 423 <p> |
424 We want provide continuation of function f. | 424 We want provide continuation of function f.<br> |
425 The continuation is not a simple code segment, | 425 The continuation is not a simple code segment,<br> |
426 because code segment has not state. | 426 because code segment has not state.<br> |
427 We represent the continuation with a code segment (__return) and a meta data segment (__environment). | 427 We represent the continuation with a code segment (__return) and a meta data segment (__environment).<br> |
428 </ul> | 428 </ul> |
429 </div> | 429 </div> |
430 | 430 |
431 <div class='slide'> | 431 <div class='slide'> |
432 <h2>Syntax of Goto with environment</h2> | 432 <h2>Syntax of Goto with environment</h2> |
478 <li>Include setjmp.h internally. | 478 <li>Include setjmp.h internally. |
479 <li>Generate C struct for saving environment. | 479 <li>Generate C struct for saving environment. |
480 <ul> | 480 <ul> |
481 <li>This struct is __environment. | 481 <li>This struct is __environment. |
482 </ul> | 482 </ul> |
483 <li>Insert setjmp in C function. | 483 <li>Insert setjmp in C function, when __return is used. |
484 <li>Generate longjmp code segment as return. | 484 <li>Generate longjmp code segment as __return. |
485 <ul> | |
486 <li>This code segment is pointed by __return. | |
487 </ul> | |
488 </ul> | 485 </ul> |
489 </div> | 486 </div> |
490 | 487 |
491 | 488 |
492 <div class='slide'> | 489 <div class='slide'> |
524 <li>In assembly code, code1 called by jmp instruction. | 521 <li>In assembly code, code1 called by jmp instruction. |
525 <li>Tail call elimination was forced. | 522 <li>Tail call elimination was forced. |
526 <li>If tail call elimination was failed, compiler output error messages. | 523 <li>If tail call elimination was failed, compiler output error messages. |
527 </ul> | 524 </ul> |
528 </div> | 525 </div> |
529 <!-- | 526 |
527 <div class='slide'> | |
528 <h2>Usage of CbC : as an instruction description</h2> | |
529 <p>CbC can be used as a hardware description language (RTL level)</p> | |
530 <ul> | |
531 <li>VU (Vector unit) in PS2 | |
532 <li>SPU in PS3 | |
533 </ul> | |
534 </div> | |
535 | |
536 <div class='slide'> | |
537 <h2>Usage of CbC : Parallel Task representation</h2> | |
538 <p>CbC can be used as a parallel programming language</p> | |
539 <ul> | |
540 <li>run on GPU or Many Core | |
541 <li>a code segment is a kernel in Open CL | |
542 <li>a code segment execution is atomic | |
543 <li>during an execution of code, data segments are owned by the code | |
544 <li>task structure is a meta data segment | |
545 <li>task manager is a meta code segment | |
546 </ul> | |
547 </div> | |
548 | |
549 <div class='slide'> | |
550 <h2>Usage of CbC : OS API description</h2> | |
551 <ul> | |
552 <li>detailed description of open/read/write/select | |
553 <li>we can implement kernel in CbC | |
554 </ul> | |
555 </div> | |
556 | |
557 <div class='slide'> | |
558 <h2>Usage of CbC : meta computation</h2> | |
559 <ul> | |
560 <li>call meta code segment during goto | |
561 <li>thread context is a meta data segment | |
562 <li>it can be seen as a monadic meta computation | |
563 </ul> | |
564 </div> | |
565 | |
566 <div class='slide'> | |
567 <h2>Usage of CbC : Model checking</h2> | |
568 <ul> | |
569 <li>call meta code segment during goto | |
570 <li>try all possible non deterministic computation | |
571 <li>keep track data segment state | |
572 <li>Do the model checking without modifying the code | |
573 <li>cf. Java Pathfinder (Model checking by replacing JVM) | |
574 </ul> | |
575 </div> | |
576 | |
577 <div class='slide'> | |
578 <h2>Conclusion</h2> | |
579 <ul> | |
580 <li>CbC compiler on LLVM and Clang is implemented. | |
581 <li>LLVM IR is not modified. | |
582 <li>goto with environment is implemented by setjmp and longjmp. | |
583 <li>Automatic prototype generating. | |
584 <li>Various application of CbC. | |
585 </ul> | |
586 </div> | |
587 | |
588 <div class='slide'> | |
589 <h2>Future works</h2> | |
590 <ul> | |
591 <li>Write operating system in CbC. | |
592 <ul> | |
593 <li>Gears OS | |
594 </ul> | |
595 <li>Meta computation syntax. | |
596 <li>More user friendly syntax. | |
597 <li>Automatic data segment generator. | |
598 <li>Signature for data segment. | |
599 <li>Dependent type and implicit parameter | |
600 </ul> | |
601 </div> | |
602 | |
603 <div class='slide'> | |
604 <h2>LLVM and Clang's intermediate representations</h2> | |
605 <table border='1' align='center' width='80%'> | |
606 <tr><td width='25%'> | |
607 Name | |
608 </td><td> | |
609 Description | |
610 </td></tr> | |
611 <tr><td> | |
612 clang AST | |
613 </td><td> | |
614 Abstract Syntax Tree. It is a representation of the structure source codes. | |
615 </td></tr> | |
616 <tr><td> | |
617 LLVM IR | |
618 </td><td> | |
619 The main intermediate representation of LLVM. It has three different forms: as an in-memory compiler IR, as an on-disk bitcode representation, and as a human readable assembly language representation. | |
620 </td></tr> | |
621 <tr><td> | |
622 SelectionDAG | |
623 </td><td> | |
624 Directed Acyclic Graph. Its nodes indicate what operation the node performs and the operands to the operation. | |
625 </td></tr> | |
626 <tr><td> | |
627 Machine Code | |
628 </td><td> | |
629 This representation is designed to support both an SSA representation for machine code, as well as register allocated, non-SSA form. | |
630 </td></tr> | |
631 <tr><td> | |
632 MC Layer | |
633 </td><td> | |
634 It is used to represent and process code at the raw machine code level. User can some kinds of file (.s, .o, .ll, a.out) by same API. | |
635 </td></tr> | |
636 </table> | |
637 </div> | |
638 | |
639 </div> <!-- presentation --> | |
530 <div class='slide'> | 640 <div class='slide'> |
531 <h2>Execution Result</h2> | 641 <h2>Execution Result</h2> |
532 <ul> | 642 <ul> |
533 <li>Conv1 program. | 643 <li>Conv1 program. |
534 <ul> | 644 <ul> |
581 <li>LLVM and Clang compilers are faster than Micro-C when optimize is enabled. | 691 <li>LLVM and Clang compilers are faster than Micro-C when optimize is enabled. |
582 <li>CbC gets benefits from LLVM optimizations. | 692 <li>CbC gets benefits from LLVM optimizations. |
583 <li>LLVM can compile CbC examples. | 693 <li>LLVM can compile CbC examples. |
584 </ul> | 694 </ul> |
585 </div> | 695 </div> |
586 --> | |
587 <div class='slide'> | |
588 <h2>Conclusion</h2> | |
589 <ul> | |
590 <li>CbC compiler on LLVM and Clang is implemented. | |
591 <li>LLVM IR is not modified. | |
592 <li>goto with environment is implemented by setjmp and longjmp. | |
593 <li>Automatic prototype generating. | |
594 </ul> | |
595 </div> | |
596 | |
597 <div class='slide'> | |
598 <h2>Future works</h2> | |
599 <ul> | |
600 <li>Write operating system in CbC. | |
601 <ul> | |
602 <li>Gears OS | |
603 </ul> | |
604 <li>Meta computation syntax. | |
605 <li>More user friendly syntax. | |
606 <li>Automatic data segment generator. | |
607 <li>Signature for data segment. | |
608 </ul> | |
609 </div> | |
610 | |
611 <div class='slide'> | |
612 <h2>LLVM and Clang's intermediate representations</h2> | |
613 <table border='1' align='center' width='80%'> | |
614 <tr><td width='25%'> | |
615 Name | |
616 </td><td> | |
617 Description | |
618 </td></tr> | |
619 <tr><td> | |
620 clang AST | |
621 </td><td> | |
622 Abstract Syntax Tree. It is a representation of the structure source codes. | |
623 </td></tr> | |
624 <tr><td> | |
625 LLVM IR | |
626 </td><td> | |
627 The main intermediate representation of LLVM. It has three different forms: as an in-memory compiler IR, as an on-disk bitcode representation, and as a human readable assembly language representation. | |
628 </td></tr> | |
629 <tr><td> | |
630 SelectionDAG | |
631 </td><td> | |
632 Directed Acyclic Graph. Its nodes indicate what operation the node performs and the operands to the operation. | |
633 </td></tr> | |
634 <tr><td> | |
635 Machine Code | |
636 </td><td> | |
637 This representation is designed to support both an SSA representation for machine code, as well as register allocated, non-SSA form. | |
638 </td></tr> | |
639 <tr><td> | |
640 MC Layer | |
641 </td><td> | |
642 It is used to represent and process code at the raw machine code level. User can some kinds of file (.s, .o, .ll, a.out) by same API. | |
643 </td></tr> | |
644 </table> | |
645 </div> | |
646 | |
647 </div> <!-- presentation --> | |
648 </body> | 696 </body> |
649 </html> | 697 </html> |