[llvm] 2d03787 - [Coroutines] Don't re-materialize for debug instructions
Chuanqi Xu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 22:52:40 PDT 2022
Author: Chuanqi Xu
Date: 2022-05-06T13:52:19+08:00
New Revision: 2d037873a35798319c51c1acf222efc483b34776
URL: https://github.com/llvm/llvm-project/commit/2d037873a35798319c51c1acf222efc483b34776
DIFF: https://github.com/llvm/llvm-project/commit/2d037873a35798319c51c1acf222efc483b34776.diff
LOG: [Coroutines] Don't re-materialize for debug instructions
Re-materialize for debug instructions would cause a different code
generated if we enabled `-g`. This is bad. So we disable to
re-materialize for debug instructions.
Added:
Modified:
llvm/lib/Transforms/Coroutines/CoroFrame.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
index 9bfcfd9a7011b..871a565edde25 100644
--- a/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+++ b/llvm/lib/Transforms/Coroutines/CoroFrame.cpp
@@ -2671,13 +2671,6 @@ void coro::buildCoroutineFrame(Function &F, Shape &Shape) {
for (User *U : I.users())
if (Checker.isDefinitionAcrossSuspend(I, U))
Spills[&I].push_back(cast<Instruction>(U));
-
- // Manually add dbg.value metadata uses of I.
- SmallVector<DbgValueInst *, 16> DVIs;
- findDbgValues(DVIs, &I);
- for (auto *DVI : DVIs)
- if (Checker.isDefinitionAcrossSuspend(I, DVI))
- Spills[&I].push_back(DVI);
}
if (Spills.empty())
More information about the llvm-commits
mailing list