From 70e1a41b15632afd969fff7ed6100eba0be78297 Mon Sep 17 00:00:00 2001 From: azidar Date: Tue, 10 Mar 2015 18:08:07 -0700 Subject: Finished resolve genders --- TODO | 9 +- notes/annotations/hello.c | 7 ++ notes/annotations/hello.ll | 30 ++++++ spec/spec.tex | 16 ++- src/main/stanza/passes.stanza | 176 +++++++++++++++---------------- test/passes/resolve-genders/accessor.fir | 19 ++++ test/passes/resolve-genders/bulk.fir | 14 +++ test/passes/resolve-genders/gcd.fir | 52 +++++++++ test/passes/resolve-genders/ports.fir | 21 ++++ 9 files changed, 236 insertions(+), 108 deletions(-) create mode 100644 notes/annotations/hello.c create mode 100644 notes/annotations/hello.ll create mode 100644 test/passes/resolve-genders/accessor.fir create mode 100644 test/passes/resolve-genders/bulk.fir create mode 100644 test/passes/resolve-genders/gcd.fir create mode 100644 test/passes/resolve-genders/ports.fir diff --git a/TODO b/TODO index e122c35c..0f31afde 100644 --- a/TODO +++ b/TODO @@ -1,19 +1,12 @@ TODO - Figure out how types and widths propogate for all updated primops - Write infer-types pass + Figure out how widths propogate for all updated primops Remove letrec. Add to expressions: Register(input,en), ReadPort(mem,index,enable), WritePort(mem,index,enable) Add bit-reduce-and etc to primops Write pass to rename identifiers (alpha-transform) Update spec - change concrete syntactical names of structural elements - change direction names for bundle fields add new field for sequential or combinational - play with non-implicit growth - remove generics, add all combinations (adduu, addus, addss, ...) add assertions - add convert to primop - remove type from node in statement Future questions to address in spec: Introduction – motivation, and intended usage Philosophical justifications for all constructs diff --git a/notes/annotations/hello.c b/notes/annotations/hello.c new file mode 100644 index 00000000..db37785d --- /dev/null +++ b/notes/annotations/hello.c @@ -0,0 +1,7 @@ +#include + +int main (int a) { + for( int i = 0; i < a; i++) { + return printf("Hello World\n"); + } +} diff --git a/notes/annotations/hello.ll b/notes/annotations/hello.ll new file mode 100644 index 00000000..3b0381e1 --- /dev/null +++ b/notes/annotations/hello.ll @@ -0,0 +1,30 @@ +; ModuleID = 'hello.c' +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.9.0" + +@.str = private unnamed_addr constant [13 x i8] c"Hello World\0A\00", align 1 + +; Function Attrs: nounwind ssp uwtable +define i32 @main(i32 %a) #0 { + %1 = icmp sgt i32 %a, 0 + br i1 %1, label %2, label %4 + +;