mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-15 23:18:48 +00:00
Update ir examples
This commit is contained in:
@@ -51,6 +51,8 @@ init:
|
||||
%l3:i32:i
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:len
|
||||
%b0:p1:i32*:p
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -10,6 +10,9 @@ init:
|
||||
%l4:i32:j
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:row
|
||||
%b0:p1:i32:col
|
||||
%b0:p2:[5 x i32]*:a
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32*:a
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32*:a
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
ret %b0:p0:i32*
|
||||
|
||||
@@ -10,6 +10,9 @@ init:
|
||||
%l4:i32:ugly_mean
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:x
|
||||
%b0:p1:i32:y
|
||||
%b0:p2:i32:z
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -7,6 +7,8 @@ init:
|
||||
%l1:u8:j
|
||||
|
||||
block b0:
|
||||
%b0:p0:i8:i
|
||||
%b0:p1:u8:j
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
@@ -31,6 +33,8 @@ init:
|
||||
%l1:u32:j
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:i
|
||||
%b0:p1:u32:j
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32:n
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:u1 = cmp lt %b0:p0:i32 2:i32
|
||||
|
||||
@@ -10,6 +10,7 @@ init:
|
||||
%l4:i32:next_term
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -10,6 +10,7 @@ init:
|
||||
%l4:i32:next_term
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -10,6 +10,7 @@ init:
|
||||
%l4:i32:next_term
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32:n
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:u1 = cmp lt %b0:p0:i32 2:i32
|
||||
|
||||
@@ -9,6 +9,8 @@ init:
|
||||
%l3:i32:i
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:len
|
||||
%b0:p1:i32*:a
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
@@ -55,6 +57,7 @@ init:
|
||||
%l1:f64:t0
|
||||
|
||||
block b0:
|
||||
%b0:p0:f64:a
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:f64 = typecast 0:i32 to f64
|
||||
@@ -87,6 +90,8 @@ init:
|
||||
%l2:f64:t0
|
||||
|
||||
block b0:
|
||||
%b0:p0:f64:a
|
||||
%b0:p1:f64:b
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
@@ -120,6 +125,10 @@ init:
|
||||
%l3:f64:abs_tol
|
||||
|
||||
block b0:
|
||||
%b0:p0:f64:a
|
||||
%b0:p1:f64:b
|
||||
%b0:p2:f64:rel_tol
|
||||
%b0:p3:f64:abs_tol
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -8,6 +8,9 @@ init:
|
||||
%l2:i32:z
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:x
|
||||
%b0:p1:i32:y
|
||||
%b0:p2:i32:z
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -8,6 +8,8 @@ init:
|
||||
%l1:i32:j
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:i
|
||||
%b0:p1:i32:j
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -8,6 +8,9 @@ init:
|
||||
%l2:i32:k
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:i
|
||||
%b0:p1:i32:j
|
||||
%b0:p2:i32:k
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -9,6 +9,8 @@ init:
|
||||
%l3:i32:t1
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:a
|
||||
%b0:p1:i32:b
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -8,6 +8,9 @@ init:
|
||||
%l2:i32:z
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:x
|
||||
%b0:p1:i32:y
|
||||
%b0:p2:i32:z
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32*:a
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32*:a
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
ret %b0:p0:i32*
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32:x
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:x
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:i32 = add %b0:p0:i32 8:i32
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32:n
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:u1 = cmp lt %b0:p0:i32 2:i32
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
struct %t1 : { a:i8, %anon:struct %t0, c:f64 }
|
||||
struct %t0 : { b:[4 x [5 x i32]] }
|
||||
struct %t1 : { a:i8, %anon:struct %t0, c:f64 }
|
||||
|
||||
fun unit @init (i32, i32, [5 x i32]*) {
|
||||
init:
|
||||
@@ -12,6 +12,9 @@ init:
|
||||
%l4:i32:j
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:row
|
||||
%b0:p1:i32:col
|
||||
%b0:p2:[5 x i32]*:arr
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
@@ -9,6 +9,7 @@ init:
|
||||
%l1:struct Big:r
|
||||
|
||||
block b0:
|
||||
%b0:p0:struct Big:p1
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = store %b0:p0:struct Big %l1:struct Big*
|
||||
|
||||
@@ -6,6 +6,7 @@ init:
|
||||
%l0:i32:n
|
||||
|
||||
block b0:
|
||||
%b0:p0:i32:n
|
||||
%b0:i0:unit = nop
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
|
||||
Reference in New Issue
Block a user