mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
all: drop support for LLVM 10
This commit is contained in:
committed by
Ron Evans
parent
afd49e7cdd
commit
90076f9401
Vendored
+11
-11
@@ -6,21 +6,21 @@ target triple = "armv7m-none-eabi"
|
||||
declare nonnull i8* @runtime.alloc(i32)
|
||||
|
||||
define void @testInt() {
|
||||
%stackalloc.alloca = alloca [1 x i32]
|
||||
store [1 x i32] zeroinitializer, [1 x i32]* %stackalloc.alloca
|
||||
%stackalloc.alloca = alloca [1 x i32], align 4
|
||||
store [1 x i32] zeroinitializer, [1 x i32]* %stackalloc.alloca, align 4
|
||||
%stackalloc = bitcast [1 x i32]* %stackalloc.alloca to i32*
|
||||
store i32 5, i32* %stackalloc
|
||||
store i32 5, i32* %stackalloc, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
define i16 @testArray() {
|
||||
%stackalloc.alloca = alloca [2 x i32]
|
||||
store [2 x i32] zeroinitializer, [2 x i32]* %stackalloc.alloca
|
||||
%stackalloc.alloca = alloca [2 x i32], align 4
|
||||
store [2 x i32] zeroinitializer, [2 x i32]* %stackalloc.alloca, align 4
|
||||
%stackalloc = bitcast [2 x i32]* %stackalloc.alloca to i16*
|
||||
%1 = getelementptr i16, i16* %stackalloc, i32 1
|
||||
store i16 5, i16* %1
|
||||
store i16 5, i16* %1, align 2
|
||||
%2 = getelementptr i16, i16* %stackalloc, i32 2
|
||||
%3 = load i16, i16* %2
|
||||
%3 = load i16, i16* %2, align 2
|
||||
ret i16 %3
|
||||
}
|
||||
|
||||
@@ -39,8 +39,8 @@ define void @testEscapingCall2() {
|
||||
}
|
||||
|
||||
define void @testNonEscapingCall() {
|
||||
%stackalloc.alloca = alloca [1 x i32]
|
||||
store [1 x i32] zeroinitializer, [1 x i32]* %stackalloc.alloca
|
||||
%stackalloc.alloca = alloca [1 x i32], align 4
|
||||
store [1 x i32] zeroinitializer, [1 x i32]* %stackalloc.alloca, align 4
|
||||
%stackalloc = bitcast [1 x i32]* %stackalloc.alloca to i32*
|
||||
%1 = call i32* @noescapeIntPtr(i32* %stackalloc)
|
||||
ret void
|
||||
@@ -54,11 +54,11 @@ define i32* @testEscapingReturn() {
|
||||
|
||||
define void @testNonEscapingLoop() {
|
||||
entry:
|
||||
%stackalloc.alloca = alloca [1 x i32]
|
||||
%stackalloc.alloca = alloca [1 x i32], align 4
|
||||
br label %loop
|
||||
|
||||
loop: ; preds = %loop, %entry
|
||||
store [1 x i32] zeroinitializer, [1 x i32]* %stackalloc.alloca
|
||||
store [1 x i32] zeroinitializer, [1 x i32]* %stackalloc.alloca, align 4
|
||||
%stackalloc = bitcast [1 x i32]* %stackalloc.alloca to i32*
|
||||
%0 = call i32* @noescapeIntPtr(i32* %stackalloc)
|
||||
%1 = icmp eq i32* null, %0
|
||||
|
||||
Vendored
+8
-8
@@ -14,18 +14,18 @@ target triple = "wasm32-unknown-unknown-wasm"
|
||||
@runtime.trackedGlobalsBitmap.1 = internal global [1 x i8] c"\09"
|
||||
|
||||
define void @main() {
|
||||
%1 = load i32, i32* @globalInt
|
||||
%2 = load %runtime._string, %runtime._string* getelementptr inbounds ({ %runtime._string, %runtime._interface }, { %runtime._string, %runtime._interface }* @tinygo.trackedGlobals, i32 0, i32 0)
|
||||
%3 = load %runtime._interface, %runtime._interface* getelementptr inbounds ({ %runtime._string, %runtime._interface }, { %runtime._string, %runtime._interface }* @tinygo.trackedGlobals, i32 0, i32 1)
|
||||
%4 = load %runtime._string, %runtime._string* @constString
|
||||
%5 = load %runtime._interface, %runtime._interface* @constInterface
|
||||
%1 = load i32, i32* @globalInt, align 4
|
||||
%2 = load %runtime._string, %runtime._string* getelementptr inbounds ({ %runtime._string, %runtime._interface }, { %runtime._string, %runtime._interface }* @tinygo.trackedGlobals, i32 0, i32 0), align 4
|
||||
%3 = load %runtime._interface, %runtime._interface* getelementptr inbounds ({ %runtime._string, %runtime._interface }, { %runtime._string, %runtime._interface }* @tinygo.trackedGlobals, i32 0, i32 1), align 4
|
||||
%4 = load %runtime._string, %runtime._string* @constString, align 4
|
||||
%5 = load %runtime._interface, %runtime._interface* @constInterface, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @runtime.markGlobals() {
|
||||
%1 = load i32, i32* @runtime.trackedGlobalsStart
|
||||
%2 = load i32, i32* @runtime.trackedGlobalsLength
|
||||
%1 = load i32, i32* @runtime.trackedGlobalsStart, align 4
|
||||
%2 = load i32, i32* @runtime.trackedGlobalsLength, align 4
|
||||
%3 = getelementptr inbounds [0 x i8], [0 x i8]* bitcast ([1 x i8]* @runtime.trackedGlobalsBitmap.1 to [0 x i8]*), i32 0, i32 0
|
||||
%4 = load i8, i8* %3
|
||||
%4 = load i8, i8* %3, align 1
|
||||
ret void
|
||||
}
|
||||
|
||||
+50
-50
@@ -15,44 +15,44 @@ define i8* @getPointer() {
|
||||
}
|
||||
|
||||
define i8* @needsStackSlots() {
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8* }
|
||||
store { %runtime.stackChainObject*, i32, i8* } { %runtime.stackChainObject* null, i32 1, i8* null }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8* }, align 8
|
||||
store { %runtime.stackChainObject*, i32, i8* } { %runtime.stackChainObject* null, i32 1, i8* null }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject, align 4
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%2 = getelementptr { %runtime.stackChainObject*, i32, i8* }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject, i32 0, i32 0
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2, align 4
|
||||
%3 = bitcast { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject to %runtime.stackChainObject*
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%ptr = call i8* @runtime.alloc(i32 4)
|
||||
%4 = getelementptr { %runtime.stackChainObject*, i32, i8* }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject, i32 0, i32 2
|
||||
store i8* %ptr, i8** %4
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store i8* %ptr, i8** %4, align 4
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
call void @someArbitraryFunction()
|
||||
%val = load i8, i8* @someGlobal
|
||||
%val = load i8, i8* @someGlobal, align 1
|
||||
ret i8* %ptr
|
||||
}
|
||||
|
||||
define i8* @needsStackSlots2() {
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }
|
||||
store { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* } { %runtime.stackChainObject* null, i32 5, i8* null, i8* null, i8* null, i8* null, i8* null }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, align 8
|
||||
store { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* } { %runtime.stackChainObject* null, i32 5, i8* null, i8* null, i8* null, i8* null, i8* null }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, align 4
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%2 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 0
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2, align 4
|
||||
%3 = bitcast { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject to %runtime.stackChainObject*
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%ptr1 = call i8* @getPointer()
|
||||
%4 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 4
|
||||
store i8* %ptr1, i8** %4
|
||||
store i8* %ptr1, i8** %4, align 4
|
||||
%5 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 3
|
||||
store i8* %ptr1, i8** %5
|
||||
store i8* %ptr1, i8** %5, align 4
|
||||
%6 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 2
|
||||
store i8* %ptr1, i8** %6
|
||||
store i8* %ptr1, i8** %6, align 4
|
||||
%ptr2 = getelementptr i8, i8* @someGlobal, i32 0
|
||||
%7 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 5
|
||||
store i8* %ptr2, i8** %7
|
||||
store i8* %ptr2, i8** %7, align 4
|
||||
%unused = call i8* @runtime.alloc(i32 4)
|
||||
%8 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 6
|
||||
store i8* %unused, i8** %8
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store i8* %unused, i8** %8, align 4
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
ret i8* %ptr1
|
||||
}
|
||||
|
||||
@@ -62,79 +62,79 @@ define i8* @noAllocatingFunction() {
|
||||
}
|
||||
|
||||
define i8* @fibNext(i8* %x, i8* %y) {
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8* }
|
||||
store { %runtime.stackChainObject*, i32, i8* } { %runtime.stackChainObject* null, i32 1, i8* null }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8* }, align 8
|
||||
store { %runtime.stackChainObject*, i32, i8* } { %runtime.stackChainObject* null, i32 1, i8* null }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject, align 4
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%2 = getelementptr { %runtime.stackChainObject*, i32, i8* }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject, i32 0, i32 0
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2, align 4
|
||||
%3 = bitcast { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject to %runtime.stackChainObject*
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
%x.val = load i8, i8* %x
|
||||
%y.val = load i8, i8* %y
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%x.val = load i8, i8* %x, align 1
|
||||
%y.val = load i8, i8* %y, align 1
|
||||
%out.val = add i8 %x.val, %y.val
|
||||
%out.alloc = call i8* @runtime.alloc(i32 1)
|
||||
%4 = getelementptr { %runtime.stackChainObject*, i32, i8* }, { %runtime.stackChainObject*, i32, i8* }* %gc.stackobject, i32 0, i32 2
|
||||
store i8* %out.alloc, i8** %4
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store i8 %out.val, i8* %out.alloc
|
||||
store i8* %out.alloc, i8** %4, align 4
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
store i8 %out.val, i8* %out.alloc, align 1
|
||||
ret i8* %out.alloc
|
||||
}
|
||||
|
||||
define i8* @allocLoop() {
|
||||
entry:
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }
|
||||
store { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* } { %runtime.stackChainObject* null, i32 5, i8* null, i8* null, i8* null, i8* null, i8* null }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject
|
||||
%0 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, align 8
|
||||
store { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* } { %runtime.stackChainObject* null, i32 5, i8* null, i8* null, i8* null, i8* null, i8* null }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, align 4
|
||||
%0 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%1 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 0
|
||||
store %runtime.stackChainObject* %0, %runtime.stackChainObject** %1
|
||||
store %runtime.stackChainObject* %0, %runtime.stackChainObject** %1, align 4
|
||||
%2 = bitcast { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject to %runtime.stackChainObject*
|
||||
store %runtime.stackChainObject* %2, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store %runtime.stackChainObject* %2, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%entry.x = call i8* @runtime.alloc(i32 1)
|
||||
%3 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 2
|
||||
store i8* %entry.x, i8** %3
|
||||
store i8* %entry.x, i8** %3, align 4
|
||||
%entry.y = call i8* @runtime.alloc(i32 1)
|
||||
%4 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 3
|
||||
store i8* %entry.y, i8** %4
|
||||
store i8 1, i8* %entry.y
|
||||
store i8* %entry.y, i8** %4, align 4
|
||||
store i8 1, i8* %entry.y, align 1
|
||||
br label %loop
|
||||
|
||||
loop: ; preds = %loop, %entry
|
||||
%prev.y = phi i8* [ %entry.y, %entry ], [ %prev.x, %loop ]
|
||||
%prev.x = phi i8* [ %entry.x, %entry ], [ %next.x, %loop ]
|
||||
%5 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 5
|
||||
store i8* %prev.y, i8** %5
|
||||
store i8* %prev.y, i8** %5, align 4
|
||||
%6 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 4
|
||||
store i8* %prev.x, i8** %6
|
||||
store i8* %prev.x, i8** %6, align 4
|
||||
%next.x = call i8* @fibNext(i8* %prev.x, i8* %prev.y)
|
||||
%7 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8*, i8*, i8*, i8* }* %gc.stackobject, i32 0, i32 6
|
||||
store i8* %next.x, i8** %7
|
||||
%next.x.val = load i8, i8* %next.x
|
||||
store i8* %next.x, i8** %7, align 4
|
||||
%next.x.val = load i8, i8* %next.x, align 1
|
||||
%loop.done = icmp ult i8 40, %next.x.val
|
||||
br i1 %loop.done, label %end, label %loop
|
||||
|
||||
end: ; preds = %loop
|
||||
store %runtime.stackChainObject* %0, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store %runtime.stackChainObject* %0, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
ret i8* %next.x
|
||||
}
|
||||
|
||||
declare [32 x i8]* @arrayAlloc()
|
||||
|
||||
define void @testGEPBitcast() {
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8*, i8* }
|
||||
store { %runtime.stackChainObject*, i32, i8*, i8* } { %runtime.stackChainObject* null, i32 2, i8* null, i8* null }, { %runtime.stackChainObject*, i32, i8*, i8* }* %gc.stackobject
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
%gc.stackobject = alloca { %runtime.stackChainObject*, i32, i8*, i8* }, align 8
|
||||
store { %runtime.stackChainObject*, i32, i8*, i8* } { %runtime.stackChainObject* null, i32 2, i8* null, i8* null }, { %runtime.stackChainObject*, i32, i8*, i8* }* %gc.stackobject, align 4
|
||||
%1 = load %runtime.stackChainObject*, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%2 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8* }* %gc.stackobject, i32 0, i32 0
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** %2, align 4
|
||||
%3 = bitcast { %runtime.stackChainObject*, i32, i8*, i8* }* %gc.stackobject to %runtime.stackChainObject*
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store %runtime.stackChainObject* %3, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
%arr = call [32 x i8]* @arrayAlloc()
|
||||
%arr.bitcast = getelementptr [32 x i8], [32 x i8]* %arr, i32 0, i32 0
|
||||
%4 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8* }* %gc.stackobject, i32 0, i32 2
|
||||
store i8* %arr.bitcast, i8** %4
|
||||
store i8* %arr.bitcast, i8** %4, align 4
|
||||
%other = call i8* @runtime.alloc(i32 1)
|
||||
%5 = getelementptr { %runtime.stackChainObject*, i32, i8*, i8* }, { %runtime.stackChainObject*, i32, i8*, i8* }* %gc.stackobject, i32 0, i32 3
|
||||
store i8* %other, i8** %5
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart
|
||||
store i8* %other, i8** %5, align 4
|
||||
store %runtime.stackChainObject* %1, %runtime.stackChainObject** @runtime.stackChainStart, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
Vendored
+4
-4
@@ -17,14 +17,14 @@ define void @testUnused() {
|
||||
|
||||
define i32 @testReadonly() {
|
||||
%map = call %runtime.hashmap* @runtime.hashmapMake(i8 4, i8 4, i32 0)
|
||||
%hashmap.value = alloca i32
|
||||
store i32 42, i32* %hashmap.value
|
||||
%hashmap.value = alloca i32, align 4
|
||||
store i32 42, i32* %hashmap.value, align 4
|
||||
%hashmap.value.bitcast = bitcast i32* %hashmap.value to i8*
|
||||
call void @runtime.hashmapStringSet(%runtime.hashmap* %map, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @answer, i32 0, i32 0), i32 6, i8* %hashmap.value.bitcast)
|
||||
%hashmap.value2 = alloca i32
|
||||
%hashmap.value2 = alloca i32, align 4
|
||||
%hashmap.value2.bitcast = bitcast i32* %hashmap.value2 to i8*
|
||||
%commaOk = call i1 @runtime.hashmapStringGet(%runtime.hashmap* %map, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @answer, i32 0, i32 0), i32 6, i8* %hashmap.value2.bitcast)
|
||||
%loadedValue = load i32, i32* %hashmap.value2
|
||||
%loadedValue = load i32, i32* %hashmap.value2, align 4
|
||||
ret i32 %loadedValue
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -11,7 +11,7 @@ declare void @"internal/task.start"(i32, i8*, i32)
|
||||
|
||||
define void @Reset_Handler() {
|
||||
entry:
|
||||
%stacksize1 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @"internal/task.stackSizes", i32 0, i32 0)
|
||||
%stacksize1 = load i32, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @"internal/task.stackSizes", i32 0, i32 0), align 4
|
||||
call void @"internal/task.start"(i32 ptrtoint (void (i8*)* @"runtime.run$1$gowrapper" to i32), i8* undef, i32 %stacksize1)
|
||||
ret void
|
||||
}
|
||||
|
||||
Vendored
+9
-9
@@ -4,24 +4,24 @@ target triple = "wasm32-unknown-unknown-wasm"
|
||||
declare i64 @"externalCall$i64wrap"(i8*, i32, i64)
|
||||
|
||||
define internal i64 @testCall(i8* %ptr, i32 %len, i64 %foo) {
|
||||
%i64asptr = alloca i64
|
||||
%i64asptr1 = alloca i64
|
||||
store i64 %foo, i64* %i64asptr1
|
||||
%i64asptr = alloca i64, align 8
|
||||
%i64asptr1 = alloca i64, align 8
|
||||
store i64 %foo, i64* %i64asptr1, align 8
|
||||
call void @externalCall(i64* %i64asptr, i8* %ptr, i32 %len, i64* %i64asptr1)
|
||||
%retval = load i64, i64* %i64asptr
|
||||
%retval = load i64, i64* %i64asptr, align 8
|
||||
ret i64 %retval
|
||||
}
|
||||
|
||||
define internal i64 @testCallNonEntry(i8* %ptr, i32 %len) {
|
||||
entry:
|
||||
%i64asptr = alloca i64
|
||||
%i64asptr1 = alloca i64
|
||||
%i64asptr = alloca i64, align 8
|
||||
%i64asptr1 = alloca i64, align 8
|
||||
br label %bb1
|
||||
|
||||
bb1: ; preds = %entry
|
||||
store i64 3, i64* %i64asptr1
|
||||
store i64 3, i64* %i64asptr1, align 8
|
||||
call void @externalCall(i64* %i64asptr, i8* %ptr, i32 %len, i64* %i64asptr1)
|
||||
%retval = load i64, i64* %i64asptr
|
||||
%retval = load i64, i64* %i64asptr, align 8
|
||||
ret i64 %retval
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ declare void @externalCall(i64*, i8*, i32, i64*)
|
||||
|
||||
define void @exportedFunction(i64* %0) {
|
||||
entry:
|
||||
%i64 = load i64, i64* %0
|
||||
%i64 = load i64, i64* %0, align 8
|
||||
call void @"exportedFunction$i64wrap"(i64 %i64)
|
||||
ret void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user