{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/15369","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/15369/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/15369/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/15369/events","html_url":"https://github.com/JuliaLang/julia/issues/15369","id":138719540,"number":15369,"title":"Very inefficient GC frame generation","user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/codegen","name":"codegen","color":"d4c5f9"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/GC","name":"GC","color":"009800"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/performance","name":"performance","color":"d7e102"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/regression","name":"regression","color":"ff2510"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-05T20:47:03Z","updated_at":"2016-06-09T18:09:05Z","closed_at":null,"body":"After codegen_rewrite2, codegen is not able to reuse GC frame slots in the same basic block anymore, for both jlcall buffer and (especially) temporaries.\r\n\r\nTesting with the following simple functions\r\n```jl\r\njulia> @noinline g1(a, b) = nothing\r\ng1 (generic function with 1 method)\r\n\r\njulia> @noinline g2(a...) = nothing\r\ng2 (generic function with 1 method)\r\n\r\njulia> function f1()\r\n           g1(Ref(1), Ref(2))\r\n           g1(Ref(1), Ref(2))\r\n       end\r\nf1 (generic function with 1 method)\r\n\r\njulia> function f2()\r\n           g2(Ref(1), Ref(2))\r\n           g2(Ref(1), Ref(2))\r\n       end\r\nf2 (generic function with 1 method)\r\n```\r\n\r\nOn 2bb94d6 (juliabox version, before jn/codegen_rewrite2 and after jb/functions so that the jlcall convention is the same with current master). `f1()` and `f2()` both generate only 2 gc frame slots (note that we emit the temporary directly into the jlcall frame in `f2()` and the jlcall frames are always reused).\r\n```ll\r\ndefine void @julia_f1_23552() #0 {\r\ntop:                                                                             \r\n  %0 = alloca [4 x %jl_value_t*], align 8                                        \r\n  %.sub = getelementptr inbounds [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 \r\n0, i64 0                                                                         \r\n  %1 = getelementptr [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 0, i64 2    \r\n  %2 = bitcast [4 x %jl_value_t*]* %0 to i64*                                    \r\n  store i64 4, i64* %2, align 8                                                  \r\n  %3 = getelementptr [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 0, i64 1    \r\n  %4 = load i64, i64* bitcast ([80040 x i8*]* @jl_tls_states to i64*), align 8   \r\n  %5 = bitcast %jl_value_t** %3 to i64*                                          \r\n  store i64 %4, i64* %5, align 8                                                 \r\n  store %jl_value_t** %.sub, %jl_value_t*** bitcast ([80040 x i8*]* @jl_tls_state\r\ns to %jl_value_t***), align 8                                                    \r\n  store %jl_value_t* null, %jl_value_t** %1, align 8                             \r\n  %6 = getelementptr [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 0, i64 3    \r\n  store %jl_value_t* null, %jl_value_t** %6, align 8                             \r\n  %7 = call %jl_value_t* @jl_gc_alloc_1w()                                       \r\n  %8 = getelementptr inbounds %jl_value_t, %jl_value_t* %7, i64 -1, i32 0        \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %8, align 8                                                                    \r\n  store %jl_value_t* %7, %jl_value_t** %1, align 8                               \r\n  %9 = load i64, i64* inttoptr (i64 139617449926784 to i64*), align 128          \r\n  %10 = bitcast %jl_value_t* %7 to i64*                                          \r\n  store i64 %9, i64* %10, align 16                                               \r\n  store %jl_value_t* %7, %jl_value_t** %1, align 8                               \r\n  %11 = call %jl_value_t* @jl_gc_alloc_1w()                                      \r\n  %12 = getelementptr inbounds %jl_value_t, %jl_value_t* %11, i64 -1, i32 0      \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %12, align 8                                                                   \r\n  store %jl_value_t* %11, %jl_value_t** %6, align 8                              \r\n  %13 = load i64, i64* inttoptr (i64 139617449926832 to i64*), align 16          \r\n  %14 = bitcast %jl_value_t* %11 to i64*                                         \r\n  store i64 %13, i64* %14, align 16                                              \r\n  store %jl_value_t* %11, %jl_value_t** %6, align 8                              \r\n  call void @julia_g1_23553(%jl_value_t* %7, %jl_value_t* %11) #0                \r\n  %15 = call %jl_value_t* @jl_gc_alloc_1w()                                      \r\n  %16 = getelementptr inbounds %jl_value_t, %jl_value_t* %15, i64 -1, i32 0      \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %16, align 8                                                                   \r\n  store %jl_value_t* %15, %jl_value_t** %1, align 8                              \r\n  %17 = load i64, i64* inttoptr (i64 139617449926784 to i64*), align 128         \r\n  %18 = bitcast %jl_value_t* %15 to i64*                                         \r\n  store i64 %17, i64* %18, align 16                                              \r\n  store %jl_value_t* %15, %jl_value_t** %1, align 8                              \r\n  %19 = call %jl_value_t* @jl_gc_alloc_1w()                                      \r\n  %20 = getelementptr inbounds %jl_value_t, %jl_value_t* %19, i64 -1, i32 0      \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %20, align 8                                                                   \r\n  store %jl_value_t* %19, %jl_value_t** %6, align 8                              \r\n  %21 = load i64, i64* inttoptr (i64 139617449926832 to i64*), align 16          \r\n  %22 = bitcast %jl_value_t* %19 to i64*                                         \r\n  store i64 %21, i64* %22, align 16                                              \r\n  store %jl_value_t* %19, %jl_value_t** %6, align 8                              \r\n  call void @julia_g1_23553(%jl_value_t* %15, %jl_value_t* %19) #0               \r\n  %23 = load i64, i64* %5, align 8                                               \r\n  store i64 %23, i64* bitcast ([80040 x i8*]* @jl_tls_states to i64*), align 8   \r\n  ret void                                                                       \r\n}                                                                                \r\n                                                                                 \r\ndefine void @julia_f2_23557() #0 {                                             \r\ntop:                                                                             \r\n  %0 = alloca [4 x %jl_value_t*], align 8                                        \r\n  %.sub = getelementptr inbounds [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 \r\n0, i64 0                                                                         \r\n  %1 = getelementptr [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 0, i64 2    \r\n  %2 = bitcast [4 x %jl_value_t*]* %0 to i64*                                    \r\n  store i64 4, i64* %2, align 8                                                  \r\n  %3 = getelementptr [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 0, i64 1    \r\n  %4 = load i64, i64* bitcast ([80040 x i8*]* @jl_tls_states to i64*), align 8   \r\n  %5 = bitcast %jl_value_t** %3 to i64*                                          \r\n  store i64 %4, i64* %5, align 8                                                 \r\n  store %jl_value_t** %.sub, %jl_value_t*** bitcast ([80040 x i8*]* @jl_tls_state\r\ns to %jl_value_t***), align 8                                                    \r\n  store %jl_value_t* null, %jl_value_t** %1, align 8                             \r\n  %6 = getelementptr [4 x %jl_value_t*], [4 x %jl_value_t*]* %0, i64 0, i64 3    \r\n  store %jl_value_t* null, %jl_value_t** %6, align 8                             \r\n  %7 = call %jl_value_t* @jl_gc_alloc_1w()                                       \r\n  %8 = getelementptr inbounds %jl_value_t, %jl_value_t* %7, i64 -1, i32 0        \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %8, align 8                                                                    \r\n  store %jl_value_t* %7, %jl_value_t** %1, align 8                               \r\n  %9 = load i64, i64* inttoptr (i64 139617449926784 to i64*), align 128          \r\n  %10 = bitcast %jl_value_t* %7 to i64*                                          \r\n  store i64 %9, i64* %10, align 16                                               \r\n  store %jl_value_t* %7, %jl_value_t** %1, align 8                               \r\n  %11 = call %jl_value_t* @jl_gc_alloc_1w()                                      \r\n  %12 = getelementptr inbounds %jl_value_t, %jl_value_t* %11, i64 -1, i32 0      \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %12, align 8                                                                   \r\n  store %jl_value_t* %11, %jl_value_t** %6, align 8                              \r\n  %13 = load i64, i64* inttoptr (i64 139617449926832 to i64*), align 16          \r\n  %14 = bitcast %jl_value_t* %11 to i64*                                         \r\n  store i64 %13, i64* %14, align 16                                              \r\n  store %jl_value_t* %11, %jl_value_t** %6, align 8                              \r\n  %15 = call %jl_value_t* @julia_g2_23558(%jl_value_t* inttoptr (i64 139617449836\r\n992 to %jl_value_t*), %jl_value_t** %1, i32 2)                                   \r\n  %16 = call %jl_value_t* @jl_gc_alloc_1w()                                      \r\n  %17 = getelementptr inbounds %jl_value_t, %jl_value_t* %16, i64 -1, i32 0      \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %17, align 8                                                                   \r\n  store %jl_value_t* %16, %jl_value_t** %1, align 8                              \r\n  %18 = load i64, i64* inttoptr (i64 139617449926784 to i64*), align 128         \r\n  %19 = bitcast %jl_value_t* %16 to i64*                                         \r\n  store i64 %18, i64* %19, align 16                                              \r\n  store %jl_value_t* %16, %jl_value_t** %1, align 8                              \r\n  %20 = call %jl_value_t* @jl_gc_alloc_1w()                                      \r\n  %21 = getelementptr inbounds %jl_value_t, %jl_value_t* %20, i64 -1, i32 0      \r\n  store %jl_value_t* inttoptr (i64 139617450557648 to %jl_value_t*), %jl_value_t*\r\n* %21, align 8                                                                   \r\n  store %jl_value_t* %20, %jl_value_t** %6, align 8                              \r\n  %22 = load i64, i64* inttoptr (i64 139617449926832 to i64*), align 16          \r\n  %23 = bitcast %jl_value_t* %20 to i64*                                         \r\n  store i64 %22, i64* %23, align 16                                              \r\n  store %jl_value_t* %20, %jl_value_t** %6, align 8                              \r\n  %24 = call %jl_value_t* @julia_g2_23558(%jl_value_t* inttoptr (i64 139617449836\r\n992 to %jl_value_t*), %jl_value_t** %1, i32 2)                                   \r\n  %25 = load i64, i64* %5, align 8                                               \r\n  store i64 %25, i64* bitcast ([80040 x i8*]* @jl_tls_states to i64*), align 8   \r\n  ret void                                                                       \r\n}\r\n```\r\n\r\nAnd on current master it generates 4 (4 temporaries) and 8 (4 temporaries and 2 * 2 jlcall frames without any reuse...)\r\n```ll\r\ndefine void @julia_f1_22963() #0 {\r\ntop:\r\n  %0 = alloca [6 x %jl_value_t*], align 8\r\n  %.sub = getelementptr inbounds [6 x %jl_value_t*], [6 x %jl_value_t*]* %0, i64 0, i64 0\r\n  %1 = getelementptr [6 x %jl_value_t*], [6 x %jl_value_t*]* %0, i64 0, i64 2\r\n  store %jl_value_t* null, %jl_value_t** %1, align 8\r\n  %2 = getelementptr [6 x %jl_value_t*], [6 x %jl_value_t*]* %0, i64 0, i64 3\r\n  store %jl_value_t* null, %jl_value_t** %2, align 8\r\n  %3 = getelementptr [6 x %jl_value_t*], [6 x %jl_value_t*]* %0, i64 0, i64 4\r\n  store %jl_value_t* null, %jl_value_t** %3, align 8\r\n  %4 = getelementptr [6 x %jl_value_t*], [6 x %jl_value_t*]* %0, i64 0, i64 5\r\n  store %jl_value_t* null, %jl_value_t** %4, align 8\r\n  %5 = bitcast [6 x %jl_value_t*]* %0 to i64*\r\n  store i64 8, i64* %5, align 8\r\n  %6 = getelementptr [6 x %jl_value_t*], [6 x %jl_value_t*]* %0, i64 0, i64 1\r\n  %7 = load i64, i64* bitcast (%jl_value_t*** @jl_tls_states to i64*), align 8\r\n  %8 = bitcast %jl_value_t** %6 to i64*\r\n  store i64 %7, i64* %8, align 8\r\n  store %jl_value_t** %.sub, %jl_value_t*** @jl_tls_states, align 8\r\n  %9 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %9, %jl_value_t** %1, align 8\r\n  %10 = getelementptr inbounds %jl_value_t, %jl_value_t* %9, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %10, align 8\r\n  %11 = bitcast %jl_value_t* %9 to i64*\r\n  store i64 1, i64* %11, align 16\r\n  %12 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %12, %jl_value_t** %2, align 8\r\n  %13 = getelementptr inbounds %jl_value_t, %jl_value_t* %12, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %13, align 8\r\n  %14 = bitcast %jl_value_t* %12 to i64*\r\n  store i64 2, i64* %14, align 16\r\n  call void @julia_g1_22964(%jl_value_t* %9, %jl_value_t* %12) #0\r\n  %15 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %15, %jl_value_t** %3, align 8\r\n  %16 = getelementptr inbounds %jl_value_t, %jl_value_t* %15, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %16, align 8\r\n  %17 = bitcast %jl_value_t* %15 to i64*\r\n  store i64 1, i64* %17, align 16\r\n  %18 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %18, %jl_value_t** %4, align 8\r\n  %19 = getelementptr inbounds %jl_value_t, %jl_value_t* %18, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %19, align 8\r\n  %20 = bitcast %jl_value_t* %18 to i64*\r\n  store i64 2, i64* %20, align 16\r\n  call void @julia_g1_22964(%jl_value_t* %15, %jl_value_t* %18) #0\r\n  %21 = load i64, i64* %8, align 8\r\n  store i64 %21, i64* bitcast (%jl_value_t*** @jl_tls_states to i64*), align 8\r\n  ret void\r\n}\r\n\r\njulia> @code_llvm f2()\r\n\r\ndefine void @julia_f2_22968() #0 {\r\ntop:\r\n  %0 = alloca [10 x %jl_value_t*], align 8\r\n  %.sub = getelementptr inbounds [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 0\r\n  %1 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 2\r\n  %2 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 6\r\n  %3 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 8\r\n  store %jl_value_t* null, %jl_value_t** %1, align 8\r\n  %4 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 3\r\n  store %jl_value_t* null, %jl_value_t** %4, align 8\r\n  %5 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 4\r\n  store %jl_value_t* null, %jl_value_t** %5, align 8\r\n  %6 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 5\r\n  store %jl_value_t* null, %jl_value_t** %6, align 8\r\n  store %jl_value_t* null, %jl_value_t** %2, align 8\r\n  %7 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 7\r\n  store %jl_value_t* null, %jl_value_t** %7, align 8\r\n  store %jl_value_t* null, %jl_value_t** %3, align 8\r\n  %8 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 9\r\n  store %jl_value_t* null, %jl_value_t** %8, align 8\r\n  %9 = bitcast [10 x %jl_value_t*]* %0 to i64*\r\n  store i64 16, i64* %9, align 8\r\n  %10 = getelementptr [10 x %jl_value_t*], [10 x %jl_value_t*]* %0, i64 0, i64 1\r\n  %11 = load i64, i64* bitcast (%jl_value_t*** @jl_tls_states to i64*), align 8\r\n  %12 = bitcast %jl_value_t** %10 to i64*\r\n  store i64 %11, i64* %12, align 8\r\n  store %jl_value_t** %.sub, %jl_value_t*** @jl_tls_states, align 8\r\n  %13 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %13, %jl_value_t** %1, align 8\r\n  %14 = getelementptr inbounds %jl_value_t, %jl_value_t* %13, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %14, align 8\r\n  %15 = bitcast %jl_value_t* %13 to i64*\r\n  store i64 1, i64* %15, align 16\r\n  %16 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %16, %jl_value_t** %4, align 8\r\n  %17 = getelementptr inbounds %jl_value_t, %jl_value_t* %16, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %17, align 8\r\n  %18 = bitcast %jl_value_t* %16 to i64*\r\n  store i64 2, i64* %18, align 16\r\n  store %jl_value_t* %13, %jl_value_t** %3, align 8\r\n  store %jl_value_t* %16, %jl_value_t** %8, align 8\r\n  %19 = call %jl_value_t* @julia_g2_22969(%jl_value_t* inttoptr (i64 139780292051200 to %jl_value_t*), %jl_value_t** %3, i32 2)\r\n  %20 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %20, %jl_value_t** %5, align 8\r\n  %21 = getelementptr inbounds %jl_value_t, %jl_value_t* %20, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %21, align 8\r\n  %22 = bitcast %jl_value_t* %20 to i64*\r\n  store i64 1, i64* %22, align 16\r\n  %23 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %23, %jl_value_t** %6, align 8\r\n  %24 = getelementptr inbounds %jl_value_t, %jl_value_t* %23, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %24, align 8\r\n  %25 = bitcast %jl_value_t* %23 to i64*\r\n  store i64 2, i64* %25, align 16\r\n  store %jl_value_t* %20, %jl_value_t** %2, align 8\r\n  store %jl_value_t* %23, %jl_value_t** %7, align 8\r\n  %26 = call %jl_value_t* @julia_g2_22969(%jl_value_t* inttoptr (i64 139780292051200 to %jl_value_t*), %jl_value_t** %2, i32 2)\r\n  %27 = load i64, i64* %12, align 8\r\n  store i64 %27, i64* bitcast (%jl_value_t*** @jl_tls_states to i64*), align 8\r\n  ret void\r\n}\r\n```\r\n\r\nAdding a useless branch that can be constant folded by llvm (but not type inference) causes the jlcall buffer to be reused but not the temporaries.\r\n```jl\r\njulia> function f3()\r\n           g2(Ref(1), Ref(2))\r\n           1 == 1 ? 1 : 1\r\n           g2(Ref(1), Ref(2))\r\n       end\r\nf3 (generic function with 1 method)\r\n```\r\n```ll\r\ndefine void @julia_f3_22983() #0 {\r\ntop:\r\n  %0 = alloca [8 x %jl_value_t*], align 8\r\n  %.sub = getelementptr inbounds [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 0\r\n  %1 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 2\r\n  %2 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 6\r\n  store %jl_value_t* null, %jl_value_t** %1, align 8\r\n  %3 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 3\r\n  store %jl_value_t* null, %jl_value_t** %3, align 8\r\n  %4 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 4\r\n  store %jl_value_t* null, %jl_value_t** %4, align 8\r\n  %5 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 5\r\n  store %jl_value_t* null, %jl_value_t** %5, align 8\r\n  store %jl_value_t* null, %jl_value_t** %2, align 8\r\n  %6 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 7\r\n  store %jl_value_t* null, %jl_value_t** %6, align 8\r\n  %7 = bitcast [8 x %jl_value_t*]* %0 to i64*\r\n  store i64 12, i64* %7, align 8\r\n  %8 = getelementptr [8 x %jl_value_t*], [8 x %jl_value_t*]* %0, i64 0, i64 1\r\n  %9 = load i64, i64* bitcast (%jl_value_t*** @jl_tls_states to i64*), align 8\r\n  %10 = bitcast %jl_value_t** %8 to i64*\r\n  store i64 %9, i64* %10, align 8\r\n  store %jl_value_t** %.sub, %jl_value_t*** @jl_tls_states, align 8\r\n  %11 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %11, %jl_value_t** %1, align 8\r\n  %12 = getelementptr inbounds %jl_value_t, %jl_value_t* %11, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %12, align 8\r\n  %13 = bitcast %jl_value_t* %11 to i64*\r\n  store i64 1, i64* %13, align 16\r\n  %14 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %14, %jl_value_t** %3, align 8\r\n  %15 = getelementptr inbounds %jl_value_t, %jl_value_t* %14, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %15, align 8\r\n  %16 = bitcast %jl_value_t* %14 to i64*\r\n  store i64 2, i64* %16, align 16\r\n  store %jl_value_t* %11, %jl_value_t** %2, align 8\r\n  store %jl_value_t* %14, %jl_value_t** %6, align 8\r\n  %17 = call %jl_value_t* @julia_g2_22969(%jl_value_t* inttoptr (i64 139780292051200 to %jl_value_t*), %jl_value_t** %2, i32 2)\r\n  %18 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %18, %jl_value_t** %4, align 8\r\n  %19 = getelementptr inbounds %jl_value_t, %jl_value_t* %18, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %19, align 8\r\n  %20 = bitcast %jl_value_t* %18 to i64*\r\n  store i64 1, i64* %20, align 16\r\n  %21 = call %jl_value_t* @jl_gc_alloc_1w()\r\n  store %jl_value_t* %21, %jl_value_t** %5, align 8\r\n  %22 = getelementptr inbounds %jl_value_t, %jl_value_t* %21, i64 -1, i32 0\r\n  store %jl_value_t* inttoptr (i64 139780294998144 to %jl_value_t*), %jl_value_t** %22, align 8\r\n  %23 = bitcast %jl_value_t* %21 to i64*\r\n  store i64 2, i64* %23, align 16\r\n  store %jl_value_t* %18, %jl_value_t** %2, align 8\r\n  store %jl_value_t* %21, %jl_value_t** %6, align 8\r\n  %24 = call %jl_value_t* @julia_g2_22969(%jl_value_t* inttoptr (i64 139780292051200 to %jl_value_t*), %jl_value_t** %2, i32 2)\r\n  %25 = load i64, i64* %10, align 8\r\n  store i64 %25, i64* bitcast (%jl_value_t*** @jl_tls_states to i64*), align 8\r\n  ret void\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/224979211","html_url":"https://github.com/JuliaLang/julia/issues/15369#issuecomment-224979211","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/15369","id":224979211,"user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T18:09:05Z","updated_at":"2016-06-09T18:09:05Z","body":"It depends. Once someone starts to work on this, we can make a check list of the cases in this issue or open new ones if necessary."}}
{"actor":{"display_login":"yuyichao"}}