{"push_id":1338178338,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"018b004b7fb8e7639bd14291103e95142fd789a7","before":"90a6d48033ac10945efc382c6052f969e69f3e72","commits":[{"sha":"018b004b7fb8e7639bd14291103e95142fd789a7","author":{"name":"Gor Nishanov","email":"fb866159a74d8f9eddf569e3634ee8173b198849@gmail.com"},"message":"[coroutines] Store an address of destroy OR cleanup part in the coroutine frame.\n\nSummary:\nIf heap allocation of a coroutine is elided, we need to make sure that we will update an address stored in the coroutine frame from f.destroy to f.cleanup.\nBefore this change, CoroSplit synthesized these stores after coro.begin:\n\n```\n    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr\n    store void (%f.Frame*)* @f.destroy, void (%f.Frame*)** %destroy.addr\n\n```\n\nIn those cases where we did heap elision, but were not able to devirtualize all indirect calls, destroy call will attempt to \"free\" the coroutine frame stored on the stack. Oops.\n\nNow we use select to put an appropriate coroutine subfunction in the destroy slot. As bellow:\n\n```\n    store void (%f.Frame*)* @f.resume, void (%f.Frame*)** %resume.addr\n    %0 = select i1 %need.alloc, void (%f.Frame*)* @f.destroy, void (%f.Frame*)* @f.cleanup\n    store void (%f.Frame*)* %0, void (%f.Frame*)** %destroy.addr\n```\n\nReviewers: majnemer\n\nSubscribers: mehdi_amini, llvm-commits\n\nDifferential Revision: https://reviews.llvm.org/D25377","distinct":true,"url":"https://api.github.com/repos/llvm-project/llvm-project/commits/018b004b7fb8e7639bd14291103e95142fd789a7"}]}
{"actor":{"display_login":"chapuni"}}