llvm-project/llvm/lib/Transforms/Coroutines
Brian Gesiak d7b68132d8 [coroutines][PR40979] Ignore unreachable uses across suspend points
Summary:
Depends on https://reviews.llvm.org/D59069.

https://bugs.llvm.org/show_bug.cgi?id=40979 describes a bug in which the
-coro-split pass would assert that a use was across a suspend point from
a definition. Normally this would mean that a value would "spill" across
a suspend point and thus need to be stored in the coroutine frame. However,
in this case the use was unreachable, and so it would not be necessary
to store the definition on the frame.

To prevent the assert, simply remove unreachable basic blocks from a
coroutine function before computing spills. This avoids the assert
reported in PR40979.

Reviewers: GorNishanov, tks2103

Reviewed By: GorNishanov

Subscribers: EricWF, jdoerfert, llvm-commits, lewissbaker

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59068

llvm-svn: 355852
2019-03-11 18:31:28 +00:00
..
CMakeLists.txt Remove trailing space in build file. 2018-04-07 03:30:28 +00:00
CoroCleanup.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
CoroEarly.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
CoroElide.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CoroFrame.cpp [opaque pointer types] Pass value type to LoadInst creation. 2019-02-01 20:44:24 +00:00
CoroInstr.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CoroInternal.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CoroSplit.cpp [coroutines][PR40979] Ignore unreachable uses across suspend points 2019-03-11 18:31:28 +00:00
Coroutines.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00