[PATCH] D97673: [RFC] [[Coroutine] [Debug] Salvage dbg.value at O2

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 09:49:59 PDT 2021


aprantl added a comment.

I would recommend to pick a name for `-enhance-debug-with-coroutine ` that does not contain `debug`. The name should make clear that this changes codegen, so nobody gets the idea of turning it as part of a -g option. For example, something like `-coroutine-spill-all-locals`.



================
Comment at: llvm/lib/Transforms/Coroutines/CoroFrame.cpp:2332
 
+    if (EnhanceDebugbilityForCoroutine) {
+      SmallVector<DbgValueInst *, 16> DVIs;
----------------
Can you add a comment explaining what is being done and why?


================
Comment at: llvm/lib/Transforms/Coroutines/CoroSplit.cpp:650
 void CoroCloner::salvageDebugInfo() {
-  SmallVector<DbgDeclareInst *, 8> Worklist;
+  SmallVector<DbgVariableIntrinsic *, 8> Worklist;
   SmallDenseMap<llvm::Value *, llvm::AllocaInst *, 4> DbgPtrAllocaCache;
----------------
The changes in this file are NFC and look good.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97673/new/

https://reviews.llvm.org/D97673



More information about the llvm-commits mailing list