Displaying 1 result from an estimated 1 matches for "coroutine_size".
2011 Aug 06
2
[LLVMdev] Order of code generation
...outine_make be generated _before_ the ret.
However, it seems that the corresponding EmitInstrWithCustomInserter is
being called /after/ the RET instruction has already been emitted.
The LLVM code I'm trying to compile is this (coroutine_make is an
intrinsic I've added):
declare i32 @llvm.coroutine_size()
declare void @llvm.coroutine_make(i64 *, i64 *, i8 *, i32)
define i64 * @foo() {
%a = call i32 @llvm.coroutine_size()
%b = alloca i64, i32 %a
%func = bitcast i64* () * @foo to i64 *
call void @llvm.coroutine_make(i64 * %b, i64 * %func, i8 * null, i32 20)
ret i64 *%b
}
What a...