[llvm] [DebugInfo] Set all dbg.value intrinsics to be tail-calls (PR #73661)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 04:03:07 PST 2023


================
@@ -988,9 +988,11 @@ Instruction *DIBuilder::insertDbgValueIntrinsic(Value *V,
                                                 DIExpression *Expr,
                                                 const DILocation *DL,
                                                 Instruction *InsertBefore) {
-  return insertDbgValueIntrinsic(
+  Instruction *DVI = insertDbgValueIntrinsic(
       V, VarInfo, Expr, DL, InsertBefore ? InsertBefore->getParent() : nullptr,
       InsertBefore);
+  cast<CallInst>(DVI)->setTailCall();
----------------
jmorse wrote:

Probably in the long term (if dbg.values had a long term), however I think that's common between all DbgVariableIntrinsics, thus including dbg.declare too, which I don't want to get into at this stage.

https://github.com/llvm/llvm-project/pull/73661


More information about the llvm-commits mailing list