[llvm] [Coroutines] Only rematerialize when operands are available after the suspend (PR #209195)
Weibo He via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 17 04:59:18 PDT 2026
================
@@ -316,9 +405,13 @@ void coro::doRematerializations(
// See if there are materializable instructions across suspend points
// We record these as the starting point to also identify materializable
// defs of uses in these operations
+ SmallDenseMap<Value *, bool> AvailMemo;
for (Instruction &I : instructions(F)) {
if (!IsMaterializable(I))
continue;
+ if (!allOperandsAvailableAfterSuspend(I, IsMaterializable, Checker,
+ AvailMemo))
+ continue;
----------------
NewSigma wrote:
`allOperandsAvailableAfterSuspend` is expensive. Do we need to traverse operands if the instruction does not cross suspending points?
https://github.com/llvm/llvm-project/pull/209195
More information about the llvm-commits
mailing list