[PATCH] D59272: [DebugInfo] Select debug intrinsic line-numbers more carefully when promoting dbg.declare
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 10:18:33 PDT 2019
bjope added inline comments.
================
Comment at: lib/Transforms/Utils/Local.cpp:1311
+ DebugLoc NewLoc = getDebugValueLoc(DII, SI);
+
----------------
Current solution is fine with me (as it seems to be one step in the right direction).
Alternatives solutions could be:
* Let DIBuilder::insertDbgValueIntrinsic strip the line number? (that would also cover the creation of dbg.value in LoopUtils, Debugify and LLVMDIBuilder*)
* Strip line/col number already when creating dbg.declare? (or do we need it in dbg.declare)
Some additional thing in this patch could be (if this is a new rule):
* Also fix calls to DIBuilder::insertDbgValueIntrinsic in LoopUtils, Debugify and LLVMDIBuilder* the same way.
* Assert that line/col is zero in DIBuilder::insertDbgValueIntrinsic.
* Add checks in Verifier and MachineVerifier that line/col is zero for dbg.value/DBG_VALUE.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59272/new/
https://reviews.llvm.org/D59272
More information about the llvm-commits
mailing list