Skip to content

Commit

Permalink
ssa: abiNamed set underlying size
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Jul 17, 2024
1 parent ffc3073 commit cf75e3e
Show file tree
Hide file tree
Showing 14 changed files with 69 additions and 61 deletions.
6 changes: 3 additions & 3 deletions cl/_testgo/equal/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
br i1 %20, label %_llgo_7, label %_llgo_8

_llgo_7: ; preds = %_llgo_6
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0)
%21 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 48, i64 0, i64 0)
store ptr %21, ptr @_llgo_main.T, align 8
br label %_llgo_8

Expand Down Expand Up @@ -749,7 +749,7 @@ _llgo_12: ; preds = %_llgo_11, %_llgo_10
br i1 %103, label %_llgo_13, label %_llgo_14

_llgo_13: ; preds = %_llgo_12
%104 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0)
%104 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0, i64 0)
store ptr %104, ptr @_llgo_main.N, align 8
br label %_llgo_14

Expand Down Expand Up @@ -897,7 +897,7 @@ declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplu

declare %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String", ptr, i64, %"github.com/goplus/llgo/internal/runtime.String", i1)

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Interface"(%"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.String", %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
4 changes: 2 additions & 2 deletions cl/_testgo/errors/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ declare ptr @"github.com/goplus/llgo/internal/runtime.AllocZ"(i64)

define void @"main.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1)
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 0, i64 1)
store ptr %0, ptr @_llgo_main.errorString, align 8
%1 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
%2 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %1, i32 0, i32 0
Expand Down Expand Up @@ -270,7 +270,7 @@ _llgo_6: ; preds = %_llgo_5, %_llgo_4
ret void
}

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
6 changes: 3 additions & 3 deletions cl/_testgo/ifaceconv/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
br i1 %160, label %_llgo_11, label %_llgo_12

_llgo_11: ; preds = %_llgo_10
%161 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 1, i64 1)
%161 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1, i64 1)
store ptr %161, ptr @_llgo_main.C1, align 8
br label %_llgo_12

Expand Down Expand Up @@ -1138,7 +1138,7 @@ _llgo_16: ; preds = %_llgo_15, %_llgo_14
br i1 %220, label %_llgo_17, label %_llgo_18

_llgo_17: ; preds = %_llgo_16
%221 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2)
%221 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 2, i64 2)
store ptr %221, ptr @_llgo_main.C2, align 8
br label %_llgo_18

Expand Down Expand Up @@ -1276,7 +1276,7 @@ declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)

declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
4 changes: 2 additions & 2 deletions cl/_testgo/ifaceprom/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ declare void @"github.com/goplus/llgo/internal/runtime.init"()

define void @"main.init$after"() {
_llgo_0:
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2)
%0 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 2, i64 2)
store ptr %0, ptr @_llgo_main.impl, align 8
%1 = load ptr, ptr @"_llgo_struct$n1H8J_3prDN3firMwPxBLVTkE5hJ9Di-AqNvaC9jczw", align 8
%2 = icmp eq ptr %1, null
Expand Down Expand Up @@ -948,7 +948,7 @@ _llgo_12: ; preds = %_llgo_11, %_llgo_10
ret void
}

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
8 changes: 4 additions & 4 deletions cl/_testgo/interface/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ _llgo_0:
br i1 %1, label %_llgo_1, label %_llgo_2

_llgo_1: ; preds = %_llgo_0
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2)
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 8, i64 2, i64 2)
call void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr %2)
store ptr %2, ptr @_llgo_main.Game1, align 8
br label %_llgo_2
Expand All @@ -278,7 +278,7 @@ _llgo_3: ; preds = %_llgo_2
%11 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %9, i32 0, i32 1
store i64 0, ptr %11, align 4
%12 = load %"github.com/goplus/llgo/internal/runtime.String", ptr %9, align 8
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 2)
%13 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0, i64 2)
%14 = call ptr @"github.com/goplus/llgo/internal/runtime.PointerTo"(ptr %13)
%15 = call %"github.com/goplus/llgo/internal/abi.StructField" @"github.com/goplus/llgo/internal/runtime.StructField"(%"github.com/goplus/llgo/internal/runtime.String" %8, ptr %14, i64 0, %"github.com/goplus/llgo/internal/runtime.String" %12, i1 true)
%16 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
Expand Down Expand Up @@ -443,7 +443,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_6
br i1 %103, label %_llgo_11, label %_llgo_12

_llgo_11: ; preds = %_llgo_10
%104 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1)
%104 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0, i64 1)
store ptr %104, ptr @_llgo_main.Game2, align 8
br label %_llgo_12

Expand Down Expand Up @@ -655,7 +655,7 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
ret void
}

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare void @"github.com/goplus/llgo/internal/runtime.SetDirectIface"(ptr)

Expand Down
16 changes: 8 additions & 8 deletions cl/_testgo/invoke/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ _llgo_0:
br i1 %1, label %_llgo_1, label %_llgo_2

_llgo_1: ; preds = %_llgo_0
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 1, i64 2)
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 1, i64 2)
store ptr %2, ptr @_llgo_main.T, align 8
br label %_llgo_2

Expand Down Expand Up @@ -909,7 +909,7 @@ _llgo_14: ; preds = %_llgo_13, %_llgo_12
br i1 %143, label %_llgo_15, label %_llgo_16

_llgo_15: ; preds = %_llgo_14
%144 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 2, i64 1, i64 1)
%144 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 2, i64 8, i64 1, i64 1)
store ptr %144, ptr @_llgo_main.T1, align 8
br label %_llgo_16

Expand Down Expand Up @@ -999,7 +999,7 @@ _llgo_20: ; preds = %_llgo_19, %_llgo_18
br i1 %189, label %_llgo_21, label %_llgo_22

_llgo_21: ; preds = %_llgo_20
%190 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 14, i64 1, i64 1)
%190 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 14, i64 8, i64 1, i64 1)
store ptr %190, ptr @_llgo_main.T2, align 8
br label %_llgo_22

Expand Down Expand Up @@ -1099,7 +1099,7 @@ _llgo_28: ; preds = %_llgo_27, %_llgo_26
br i1 %238, label %_llgo_29, label %_llgo_30

_llgo_29: ; preds = %_llgo_28
%239 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 3, i64 0, i64 1)
%239 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 3, i64 1, i64 0, i64 1)
store ptr %239, ptr @_llgo_main.T3, align 8
br label %_llgo_30

Expand Down Expand Up @@ -1178,7 +1178,7 @@ _llgo_36: ; preds = %_llgo_35, %_llgo_34
br i1 %274, label %_llgo_37, label %_llgo_38

_llgo_37: ; preds = %_llgo_36
%275 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 17, i64 1, i64 1)
%275 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 17, i64 8, i64 1, i64 1)
store ptr %275, ptr @_llgo_main.T4, align 8
br label %_llgo_38

Expand Down Expand Up @@ -1280,7 +1280,7 @@ _llgo_44: ; preds = %_llgo_43, %_llgo_42
br i1 %325, label %_llgo_45, label %_llgo_46

_llgo_45: ; preds = %_llgo_44
%326 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 1, i64 1)
%326 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 8, i64 1, i64 1)
store ptr %326, ptr @_llgo_main.T5, align 8
br label %_llgo_46

Expand Down Expand Up @@ -1403,7 +1403,7 @@ _llgo_50: ; preds = %_llgo_49, %_llgo_48
br i1 %393, label %_llgo_51, label %_llgo_52

_llgo_51: ; preds = %_llgo_50
%394 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 1, i64 1)
%394 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 24, i64 1, i64 1)
store ptr %394, ptr @_llgo_main.T6, align 8
br label %_llgo_52

Expand Down Expand Up @@ -1723,7 +1723,7 @@ _llgo_66: ; preds = %_llgo_65, %_llgo_64
ret void
}

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
10 changes: 5 additions & 5 deletions cl/_testgo/reader/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ _llgo_21: ; preds = %_llgo_20
br label %_llgo_22

_llgo_22: ; preds = %_llgo_21, %_llgo_20
%180 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 3, i64 3)
%180 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 3, i64 3)
store ptr %180, ptr @_llgo_main.nopCloserWriterTo, align 8
%181 = load ptr, ptr @"_llgo_func$06yPPin-fnDnxFKkLLcJ1GEUhIobjPimde7T_Id_hmY", align 8
%182 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
Expand Down Expand Up @@ -1849,7 +1849,7 @@ _llgo_27: ; preds = %_llgo_26
br label %_llgo_28

_llgo_28: ; preds = %_llgo_27, %_llgo_26
%361 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 2, i64 2)
%361 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 2, i64 2)
store ptr %361, ptr @_llgo_main.nopCloser, align 8
%362 = load ptr, ptr @"_llgo_struct$_3ow4zXXILqvC0WDqDRNq5DPhjE1DInJgN924VHWc2Y", align 8
%363 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
Expand Down Expand Up @@ -2075,7 +2075,7 @@ _llgo_33: ; preds = %_llgo_32
br label %_llgo_34

_llgo_34: ; preds = %_llgo_33, %_llgo_32
%496 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 10)
%496 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 32, i64 0, i64 10)
store ptr %496, ptr @_llgo_main.stringReader, align 8
%497 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
%498 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %497, i32 0, i32 0
Expand Down Expand Up @@ -2643,7 +2643,7 @@ _llgo_51: ; preds = %_llgo_50
br label %_llgo_52

_llgo_52: ; preds = %_llgo_51, %_llgo_50
%830 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 1)
%830 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 0, i64 1)
store ptr %830, ptr @_llgo_main.errorString, align 8
%831 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
%832 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %831, i32 0, i32 0
Expand Down Expand Up @@ -2790,7 +2790,7 @@ declare ptr @"github.com/goplus/llgo/internal/runtime.NewItab"(ptr, ptr)

declare ptr @"github.com/goplus/llgo/internal/runtime.Zeroinit"(ptr, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
6 changes: 3 additions & 3 deletions cl/_testgo/struczero/out.ll
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ _llgo_0:
br i1 %1, label %_llgo_1, label %_llgo_2

_llgo_1: ; preds = %_llgo_0
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 1, i64 1)
%2 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 1, i64 1)
store ptr %2, ptr @"_llgo_github.com/goplus/llgo/cl/internal/foo.Foo", align 8
br label %_llgo_2

Expand Down Expand Up @@ -262,7 +262,7 @@ _llgo_3: ; preds = %_llgo_2
br i1 %43, label %_llgo_5, label %_llgo_6

_llgo_4: ; preds = %_llgo_10, %_llgo_2
%44 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 0, i64 0)
%44 = call ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64 25, i64 16, i64 0, i64 0)
store ptr %44, ptr @_llgo_main.bar, align 8
%45 = alloca %"github.com/goplus/llgo/internal/runtime.String", align 8
%46 = getelementptr inbounds %"github.com/goplus/llgo/internal/runtime.String", ptr %45, i32 0, i32 0
Expand Down Expand Up @@ -439,7 +439,7 @@ _llgo_10: ; preds = %_llgo_9, %_llgo_8
br label %_llgo_4
}

declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64)
declare ptr @"github.com/goplus/llgo/internal/runtime.NewNamed"(i64, i64, i64, i64)

declare ptr @"github.com/goplus/llgo/internal/runtime.Struct"(%"github.com/goplus/llgo/internal/runtime.String", i64, %"github.com/goplus/llgo/internal/runtime.Slice")

Expand Down
Loading

0 comments on commit cf75e3e

Please sign in to comment.