[PATCH] D89711: [Coroutine] Prevent value reusing across coroutine suspensions in EarlyCSE and GVN

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 19 10:49:45 PDT 2020


rjmccall added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2141
       return processAssumeIntrinsic(IntrinsicI);
+    if (IntrinsicI->getIntrinsicID() == Intrinsic::coro_suspend) {
+      // Prevent value reusing across coroutine suspensions. Values
----------------
Different coroutine lowerings use different suspend instructions.  Can you write this (and similar conditions elsewhere in the patch) so that it'll apply in any lowering?  Maybe add a `canSuspendCoroutine` method to `IntrinsicInst`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89711/new/

https://reviews.llvm.org/D89711



More information about the llvm-commits mailing list