# HG changeset patch # User Kaito Tokumori # Date 1436018454 -32400 # Node ID b9179e9084d95ea6c32b4e1d0a3f7f4c86d05746 # Parent 607acd92b8ebe0eb5ef4eda8e1dedae0520a43dd spell check diff -r 607acd92b8eb -r b9179e9084d9 presentation/presen.html --- a/presentation/presen.html Sat Jul 04 22:52:09 2015 +0900 +++ b/presentation/presen.html Sat Jul 04 23:00:54 2015 +0900 @@ -2,7 +2,7 @@ - Presen + Presentation @@ -73,7 +73,7 @@

Objective

-

New programing units

+

New programming units

It is easy to divide or combine.

@@ -157,7 +157,7 @@
  • Basic syntax is the same as the C, except __code and goto.
  • __code is a type of code segment
  • Code segments end with parameterized goto. -
  • Data segments are inplemented as C structures. +
  • Data segments are implemented as C structures. @@ -233,7 +233,7 @@
  • AST : Abstract Syntax Tree (C++ object)
  • LLVM IR is Intermediate Representation (bit code).
  • Clang translate C/C++/Obj-C into LLVM IR. -
  • SelectionDAG : Codegenerator internal +
  • SelectionDAG : Code generator internal
  • Machine Code : LLVM Machine code
    @@ -252,11 +252,11 @@

    CbC implementation strategy

      -
    • define special type __coee for code segments -
    • no code segment prototyping (othewise it beomes quite messy ) +
    • define special type __code for code segments +
    • no code segment prototyping (otherwise it becomes quite messy )
    • code segments are implemented as tail call force functions -
    • Do not modify IR (Intermidiate representations ) -
    • goto statement is actualy a function call with following return statement
      +
    • Do not modify IR (Intermediate representations ) +
    • goto statement is actually a function call with following return statement
      goto f() --> { f() ; return; }
    • allow mixing code segments and normal function calls ( goto with environment )
    @@ -268,7 +268,7 @@
  • Intermediate Representation (bit code).
  • Three forms: in-memory IR, bitcode stream, human readable language.
  • it has precise type, data size, alignment -
  • funcion call flags : tail, fastcc, cc10, cc11, erlang, ghc +
  • function call flags : tail, fastcc, cc10, cc11, Erlang, ghc @@ -290,7 +290,7 @@ @@ -302,7 +302,7 @@
  • In CbC, programmer write a lot of code segments.
  • Automatically prototype declarator support it. -
  • If the declaration was not found, search definision and generate declaration. +
  • If the declaration was not found, search definition and generate declaration.
    • Of course you can write declaration yourself too.
    @@ -310,7 +310,7 @@
  • original input code - Clang genarates it internaly + Clang generates it internally
    @@ -347,7 +347,7 @@
             
    original input code - Clang genarates it + Clang generates it
    @@ -369,7 +369,7 @@
     
           

    Forcing Tail Call Elimination

    -

    Tail call flang is set in CodeGen.

    +

    Tail call flag is set in CodeGen.

    Ensure TCE in SelectionDAGISel.

    @@ -392,7 +392,7 @@
    • Set tail flag at the code segments call.
    • Tailcallopt path is enabled in the compiler. -
    • The caller and calle's calling conventions must be the same and their types should be cc10, cc11 or fastcc. +
    • The caller and callee's calling conventions must be the same and their types should be cc10, cc11 or fastcc.
    • Return value type has to be the same as the caller's.
    @@ -411,7 +411,7 @@

    goto a code segment from a normal C function

      -
    • Assume we have code segment g and normal funciton f +
    • Assume we have code segment g and normal function f
    • simply goto g() in C function f()
    • goto g() never returns to function f
    @@ -435,7 +435,7 @@
    • Use new keywords __return and __environment.
    • __return is a code segment pointer for C functions. -
    • __environment is a envitonment for C functions. +
    • __environment is a environment for C functions.
    • Code1 use a continuation with environments to return main function.
    @@ -466,7 +466,7 @@

    Implementation of goto with environment

    Several ways to implementation
      -
    • setmp/longjmp (LLVM) +
    • setjmp/longjmp (LLVM)
    • nested function closure with thread safe variable (GCC)
    • direct manipulation of frame pointer and return value (Micro-C)
    @@ -603,18 +603,18 @@
  • Meta computation syntax.
  • More user friendly syntax. -
  • Automitic data segment generator. +
  • Automatic data segment generator.
  • Signature for data segment.
    -

    LLVM and Clang's intermidiate representations

    +

    LLVM and Clang's intermediate representations

    Name - Desctiption + Description
    clang AST @@ -624,7 +624,7 @@
    LLVM IR - The main intermidiate representation of LLVM. It has three diffirent forms: as an in-memory compiler IR, as an on-disk bitcode representation, and as a human readable assembly language representation. + 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.
    SelectionDAG