[PATCH] D31799: [coroutines] Insert spills of PHI instructions correctly
Gor Nishanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 11:05:33 PDT 2017
GorNishanov added inline comments.
================
Comment at: lib/Transforms/Coroutines/CoroFrame.cpp:441
+ InsertPt =
+ &*cast<Instruction>(E.def())->getParent()->getFirstInsertionPt();
} else {
----------------
rnk wrote:
> This will be a problem if this phi is in a catchswitch block created for MSVC EH. Is that something you worry about yet? You can make such a phi like this:
> ```
> int x = 0;
> try {
> may_throw();
> ++x;
> may_throw();
> } catch (...) {
> use_int(x);
> }
> ```
> I'm not sure what you need to do to make this a coroutine as well, but maybe you can make a test case that way.
>
> Anyway, this is totally something that doesn't need to be addressed in this change.
Thank you very much for review!
Good point about cathswitch. I'll have a fix for it in two commits. I will need to add eh aware edge splitting first.
Repository:
rL LLVM
https://reviews.llvm.org/D31799
More information about the llvm-commits
mailing list