source: proto/pablo/src/compiler/ReadMe.txt @ 2658

Last change on this file since 2658 was 2658, checked in by ksherdy, 7 years ago

Shortened variable names for sanity.

File size: 2.7 KB
Line 
1Implementation Changes
2
31. Split CarryIntro visitor into two vistor passes.
4   If, While, Body. Add Carry Calls.
5           
6           Pablo 'if'
7               
8       Parallel bit stream language construct --> Block-at-a-time implementation.
9   
10           if(C) { S* } --> if (C || any_carry(base,count)) { S* } else { enqueue_dequeue(base, count) }
11           
12           Pablo 'while'
13           
14       while(C) { S* } --> if (C || any_carry(base, count))
15                           {
16                             S*
17                             while(C) {
18                               S*
19                             }
20                           }
21                           else
22                           {
23                             enqueue_dequeue(base, count)
24                           } 
25                                   
26       Pablo 'body'
27       
28       (ii) Translate carry generating built-in operations.
29
30Todo List
31
321. Support negative numbers.
332. Fix indentation. Nested if's etc.   
34//3. simd::constant<1>(0) <-- if CarryQ ignore
35//4. Add assert compiler.
36//5. Add SIMD register dump.
37//6. if stream_function.carry_count > 0:
38//       node.body += [mkCallStmt('carryQ.CarryQ_Adjust', [ast.Num(stream_function.carry_count)])]
39
40Current Compiler Design Issues
41 
421. Replace all occurrences of X.getCPPCode() with a generic getCode call
43   that is configurable based on the target back-end. e.g. C macro syntax
44   versus C++ template syntax etc.
45 
46   Done.
47   
482. Divide the compiler into phases to promote the decoupling of visitor passes.
49   (a) Analysis phases - Gather information and populate symbol table information.
50   
51   (b) AST augmenting / altering phases that alter the PABLO AST in a
52       target back-end independent fashion.
53   
54   (c) Code generation phases. Dependent on the target language and hardware.
55
56   (d) Name Visitors SomeNameVisitor, InnerSomeNameVisitor; and Name SomeNameXFormer, InnerSomeNameXFormer.
57
58   Work in progress.
59   
603. Visitor dependency. Tree XFormation, e.g. carry counter depends on
61   'Advance(x)' function name and argument count.
62   
63   Done.
64   
654. Boolean OR, Boolean AND. Pablo may require a boolean type as well as binary and boolean
66   AND,OR operators.
67
68   Options:
69   
70   Restricted compiler operator.
71   Add to Pablo language, poor choice.
72   Boolean type.
73   String value produced for evaluation as a function name within 'if' tests.
74
75   I believe the following the correct block-at-a-time implementation. This avoids the
76   introduction of a Boolean type to the Pablo language.
77
78   --> if((bitblock::any(C | CarryQ.CarryTest(base,count))
79   
80   Done.
81
825. Verify function call expressions versus function call Stmts. Go over code
83   generation scheme.
84         
85   Pending.     
Note: See TracBrowser for help on using the repository browser.