llvm-project/llvm/lib/Transforms/Coroutines
Nikita Popov 972840aa3b [IR] Add Instruction::getInsertionPointAfterDef()
Transforms occasionally want to insert an instruction directly
after the definition point of a value. This involves quite a few
different edge cases, e.g. for phi nodes the next insertion point
is not the next instruction, and for invokes and callbrs its not
even in the same block. Additionally, the insertion point may not
exist at all if catchswitch is involved.

This adds a general Instruction::getInsertionPointAfterDef() API to
implement the necessary logic. For now it is used in two places
where this should be mostly NFC. I will follow up with additional
uses where this fixes specific bugs in the existing implementations.

Differential Revision: https://reviews.llvm.org/D129660
2022-08-31 10:50:10 +02:00
..
CMakeLists.txt [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE 2022-03-23 11:03:26 -07:00
CoroCleanup.cpp [coro async] Add missing llvm.coro.id.async intrinsic to declaresCoroCleanupIntrinsics 2022-07-19 07:25:04 -07:00
CoroConditionalWrapper.cpp [PassManager][Coroutine] Run passes under -O0 conditionally and run GlobalDCE 2022-03-23 11:03:26 -07:00
CoroEarly.cpp [Coro][Debuginfo] Add debug info to `__NoopCoro_ResumeDestroy` function 2022-08-26 05:49:52 -07:00
CoroElide.cpp [llvm] Qualify auto (NFC) 2022-08-07 23:55:27 -07:00
CoroFrame.cpp [IR] Add Instruction::getInsertionPointAfterDef() 2022-08-31 10:50:10 +02:00
CoroInstr.h [Coroutines] Offering llvm.coro.align intrinsic 2022-01-19 09:52:45 +08:00
CoroInternal.h [Coroutines] Store the index for final suspend point if there is unwind coro end 2022-08-26 14:05:46 +08:00
CoroSplit.cpp [Transforms] Qualify auto in range-based for loops (NFC) 2022-08-27 21:21:02 -07:00
Coroutines.cpp [Transforms] Qualify auto in range-based for loops (NFC) 2022-08-27 21:21:02 -07:00