authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-03 16:30:59-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-03-03 16:30:59-05:00
log1c244d34b3c80149b83ce974b1c81e66890ed123
tree57bcdfb54a8c126d2ede9c08ebecc0d1aa4fed79
parent56645c1701b321e9da807dcbf7b8d61e0fc53117
parent101b7745c4da1fdf0ebe723710fe8b195013fc0e

Merge branch 'master' into llvm6


2 files changed, 5 insertions(+), 11 deletions(-)

src/codegen.cpp+4
......@@ -489,6 +489,10 @@ static LLVMValueRef fn_llvm_value(CodeGen *g, FnTableEntry *fn_table_entry) {
489489 } else {
490490 LLVMSetFunctionCallConv(fn_table_entry->llvm_value, get_llvm_cc(g, fn_type->data.fn.fn_type_id.cc));
491491 }
492 if (fn_type->data.fn.fn_type_id.cc == CallingConventionAsync) {
493 addLLVMFnAttr(fn_table_entry->llvm_value, "optnone");
494 addLLVMFnAttr(fn_table_entry->llvm_value, "noinline");
495 }
492496
493497 bool want_cold = fn_table_entry->is_cold || fn_type->data.fn.fn_type_id.cc == CallingConventionCold;
494498 if (want_cold) {
test/behavior.zig+1-11
......@@ -13,6 +13,7 @@ comptime {
1313 _ = @import("cases/bugs/656.zig");
1414 _ = @import("cases/cast.zig");
1515 _ = @import("cases/const_slice_child.zig");
16 _ = @import("cases/coroutines.zig");
1617 _ = @import("cases/defer.zig");
1718 _ = @import("cases/enum.zig");
1819 _ = @import("cases/enum_with_members.zig");
......@@ -49,15 +50,4 @@ comptime {
4950 _ = @import("cases/var_args.zig");
5051 _ = @import("cases/void.zig");
5152 _ = @import("cases/while.zig");
52
53
54 // LLVM 5.0.1, 6.0.0, and trunk crash when attempting to optimize coroutine code.
55 // So, Zig does not support ReleaseFast or ReleaseSafe for coroutines yet.
56 // Luckily, Clang users are running into the same crashes, so folks from the LLVM
57 // community are working on fixes. If we're really lucky they'll be fixed in 6.0.1.
58 // Otherwise we can hope for 7.0.0.
59 if (builtin.mode == builtin.Mode.Debug) {
60 _ = @import("cases/coroutines.zig");
61 }
62
6353}