[all-commits] [llvm/llvm-project] 9d1cb1: [Coroutines] Ignore instructions more aggressively...
Hans via All-commits
all-commits at lists.llvm.org
Wed Mar 20 06:52:07 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9d1cb18d19862fc0627e4a56e1e491a498e84c71
https://github.com/llvm/llvm-project/commit/9d1cb18d19862fc0627e4a56e1e491a498e84c71
Author: Hans <hans at hanshq.net>
Date: 2024-03-20 (Wed, 20 Mar 2024)
Changed paths:
A clang/test/CodeGenCoroutines/coro-symmetric-transfer-04.cpp
M llvm/lib/Transforms/Coroutines/CoroSplit.cpp
M llvm/test/Transforms/Coroutines/coro-split-musttail7.ll
Log Message:
-----------
[Coroutines] Ignore instructions more aggressively in addMustTailToCoroResumes() (#85271)
The old code used isInstructionTriviallyDead() and removed instructions
when walking the path from a resume call to function return to check if
the call is in tail position.
However, since the code was walking forwards it was not able to get past
instructions such as:
%gep = getelementptr inbounds i64, ptr %alloc.var, i32 0
%foo = ptrtoint ptr %gep to i64
This patch instead ignores such instructions as long as their values are
not needed. This enables the code to emit tail calls in more situations.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list