[PATCH] D24242: [Coroutines] Part13: Handle single edge PHINodes across suspends

Gor Nishanov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 5 18:19:39 PDT 2016


GorNishanov created this revision.
GorNishanov added a reviewer: majnemer.
GorNishanov added a subscriber: llvm-commits.
Herald added a subscriber: mehdi_amini.

If one of the uses of the value is a single edge PHINode, handle it.

Original:

    %val = something
    <suspend>   
    %p = PHINode [%val]

After Spill + Part13:

    %val = something
    %slot = gep val.spill.slot
    store %val, %slot
    <suspend>
    %p = load %slot

Plus tiny fixes/changes:
   * use correct index for coro.free in CoroCleanup
   * fixup id parameter in coro.free to allow authoring coroutine in plain C with __builtins

https://reviews.llvm.org/D24242

Files:
  lib/Transforms/Coroutines/CoroCleanup.cpp
  lib/Transforms/Coroutines/CoroEarly.cpp
  lib/Transforms/Coroutines/CoroFrame.cpp
  test/Transforms/Coroutines/phi-coro-end.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24242.70351.patch
Type: text/x-patch
Size: 4661 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160906/73cd9a49/attachment.bin>


More information about the llvm-commits mailing list