mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
transform: wasm-abi: create temporary allocas in the entry block
This avoids problems with goroutines in WebAssembly, and is generally a
good thing. It fixes some cases of the following problem:
LLVM ERROR: Coroutines cannot handle non static allocas yet
This commit is contained in:
committed by
Ron Evans
parent
4d79d473c4
commit
519adf3aef
Vendored
+2
-2
@@ -14,11 +14,11 @@ define internal i64 @testCall(i8* %ptr, i32 %len, i64 %foo) {
|
||||
|
||||
define internal i64 @testCallNonEntry(i8* %ptr, i32 %len) {
|
||||
entry:
|
||||
%i64asptr = alloca i64
|
||||
%i64asptr1 = alloca i64
|
||||
br label %bb1
|
||||
|
||||
bb1: ; preds = %entry
|
||||
%i64asptr = alloca i64
|
||||
%i64asptr1 = alloca i64
|
||||
store i64 3, i64* %i64asptr1
|
||||
call void @externalCall(i64* %i64asptr, i8* %ptr, i32 %len, i64* %i64asptr1)
|
||||
%retval = load i64, i64* %i64asptr
|
||||
|
||||
Reference in New Issue
Block a user