llvm-project/llvm/lib/Transforms/Coroutines
Brian Gesiak 83a9321f60 [Coroutines] Remove corresponding phi values when apply simplifyTerminatorLeadingToRet
Summary:
In addMustTailToCoroResumes, we set musttail on those resume instructions that are followed by a ret instruction. This is done by simplifyTerminatorLeadingToRet which replace a sequence of branches leading to a ret with a clone of the ret.

However it forgets to remove corresponding PHI values that come from basic block of replaced branch, and may cause jumpthreading pass hangs (https://bugs.llvm.org/show_bug.cgi?id=43720)

This patch fix this issue

Test Plan:
cppcoro library with O3+flto
check-llvm

Reviewers: modocache, GorNishanov, lewissbaker

Reviewed By: modocache

Subscribers: mehdi_amini, EricWF, hiraditya, dexonsmith, jfb, llvm-commits

Tags: #llvm

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

Patch by junparser (JunMa)!
2020-01-05 18:26:30 -05:00
..
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CoroCleanup.cpp [Coroutines] Rename "legacy" passes (NFC) 2020-01-01 21:41:16 -05:00
CoroEarly.cpp [Coroutines] Rename "legacy" passes (NFC) 2020-01-01 21:41:16 -05:00
CoroElide.cpp [Coroutines] Rename "legacy" passes (NFC) 2020-01-01 21:41:16 -05:00
CoroFrame.cpp [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned) 2019-09-30 13:34:44 +00:00
CoroInstr.h Add intrinsics for doing frame-bound dynamic allocations within a coroutine. 2019-08-14 03:53:40 +00:00
CoroInternal.h [Coroutines] const-ify internal helpers (NFC) 2020-01-01 21:57:49 -05:00
CoroSplit.cpp [Coroutines] Remove corresponding phi values when apply simplifyTerminatorLeadingToRet 2020-01-05 18:26:30 -05:00
Coroutines.cpp [Coroutines] const-ify internal helpers (NFC) 2020-01-01 21:57:49 -05:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00