Restart LLVM IR SSA generation

This is the third go and I'm going for it!
This commit is contained in:
gingerBill
2016-07-30 00:17:13 +01:00
parent 32ab8fcf99
commit 776dc0e8f1
20 changed files with 1843 additions and 507 deletions
+4
View File
@@ -0,0 +1,4 @@
int main() {
float a = 0.5;
return 0;
}
+16
View File
@@ -0,0 +1,16 @@
define void @main() {
entry:
%0 = alloca i64, align 8
store i64 zeroinitializer, i64* %0
store i64 137, i64* %0
%1 = load i64, i64* %0
add i64 1, %1
store i64 %2, i64* %0
%3 = alloca float, align 4
store float zeroinitializer, float* %3
store float 0x3f8147ae00000000, float* %3
%4 = load float, float* %3
fadd float %4, 0x3f7d70a400000000
store float %5, float* %3
ret void
}
+8 -3
View File
@@ -1,6 +1,11 @@
type Vec2: struct { x, y: f32 }
main :: proc() {
// x : string;
// x = "Hello";
x : int;
x = 137;
x = 1 + x;
y : f32;
y = 1.01;
y = y + 0.99;
}