[PATCH] D81939: [deadargelim] Attach dbg info to the insert/extractvalue instructions

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 14:41:33 PDT 2020


aprantl added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:973
               // return value
               V = ExtractValueInst::Create(NewCB, NewRetIdxs[Ri], "newret",
                                            InsertPt);
----------------
@vsk: would it be better style to ad-hoc create an IRBuilder with the correct debug location here?


================
Comment at: llvm/test/Transforms/DeadArgElim/multdeadretval.ll:11
+; Check that every instruction inserted by -deadargelim has a debug location.
+; DEBUG: CheckModuleDebugify: PASS
+
----------------
I think it would be much better to have a targeted check here that checks the actual instructions. Debugify is great for finding bugs, but I wouldn't recommend it for writing testcases. In this form, nothing guarantees that the code path that triggers the bugfix is still exercised by the test if the pass is modified and the test quickly looses its usefulness.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81939





More information about the llvm-commits mailing list