[llvm] [Coroutines] Only rematerialize when operands are available after the suspend (PR #209195)
Christian Ulmann via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 19 23:44:24 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;
----------------
Dinistro wrote:
This avoided the creation of a few redundant RematGraphs, but creating them vs. performing the scan is only a mild difference. I thus removed the scan from here for simplicity.
https://github.com/llvm/llvm-project/pull/209195
More information about the llvm-commits
mailing list