mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 23:48:48 +00:00
Update skeleton
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
fun *i32 @foo {
|
||||
fun *i32 @foo (*i32) {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
@@ -14,7 +14,7 @@ block b1:
|
||||
ret undef:*i32
|
||||
}
|
||||
|
||||
fun i32 @main {
|
||||
fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
@@ -34,12 +34,12 @@ block b2:
|
||||
br %b2:i1:u1, b3(), b5()
|
||||
|
||||
block b3:
|
||||
%b3:i0:*i32 = getelementptr %l0 offset 0
|
||||
%b3:i1:*i32 = call @foo(%b3:i0:*i32)
|
||||
%b3:i0:*i32 = getelementptr %l0:*[10 x i32] offset 0:i32
|
||||
%b3:i1:*i32 = call @foo:*[ret:*i32 params:(*i32)](%b3:i0:*i32)
|
||||
%b3:i2:i32 = load %l1:*i32
|
||||
%b3:i3:i64 = typecast %b3:i2:i32 to i64
|
||||
%b3:i4:i64 = mul %b3:i3:i64 4:i64
|
||||
%b3:i5:*i32 = getelementptr %b3:i1 offset %b3:i4
|
||||
%b3:i5:*i32 = getelementptr %b3:i1:*i32 offset %b3:i4:i64
|
||||
%b3:i6:i32 = load %l1:*i32
|
||||
%b3:i7:unit = store %b3:i6:i32 %b3:i5:*i32
|
||||
j b4()
|
||||
@@ -51,10 +51,10 @@ block b4:
|
||||
j b2()
|
||||
|
||||
block b5:
|
||||
%b5:i0:*i32 = getelementptr %l0 offset 0
|
||||
%b5:i0:*i32 = getelementptr %l0:*[10 x i32] offset 0:i32
|
||||
%b5:i1:i64 = typecast 5:i32 to i64
|
||||
%b5:i2:i64 = mul %b5:i1:i64 4:i64
|
||||
%b5:i3:*i32 = getelementptr %b5:i0 offset %b5:i2
|
||||
%b5:i3:*i32 = getelementptr %b5:i0:*i32 offset %b5:i2:i64
|
||||
%b5:i4:i32 = load %b5:i3:*i32
|
||||
%b5:i5:u1 = cmp eq %b5:i4:i32 5:i32
|
||||
%b5:i6:i32 = typecast %b5:i5:u1 to i32
|
||||
|
||||
Reference in New Issue
Block a user