[PATCH] D151419: [DebugInfo][RemoveDIs] Eliminate some debug-intrinsics-affect-codegen errors

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 8 04:45:54 PDT 2023


jmorse added a comment.

Will shoe-horn in a utility for easier setDebugLoc usage in the next revision, to be clear though, the intention is to delete all this code in the future if we're living in an intrinsic-free paradise by then,

In D151419#4373747 <https://reviews.llvm.org/D151419#4373747>, @dblaikie wrote:

> I know I'm a bit of a stickler for it, but my vote would be/I'd still prefer to see test cases for these. To demonstrate the code is exercised/correct, if nothing else. I realize the chance of regressing these fixes is probably relatively small, but I've certainly come across code before and been "I'm not sure why this is here, let's remove it and see what tests fail" in an effort to understand the code.

This feeds into the other ~30 patches that will appear in this series: as it stands, for a large number of optimisation passes we don't test for the exact placement of debug intrinsics (but we should). Seeing how we're planning on changing the mechanism via which debug-info is preserved, through putting more information in iterators [0], if we went for the every-functional-change-gets-a-test approach then this would expand to fully testing debug-info in every optimisation pass.

I really want to improve the testing in this area (we've got ~130 LLVM-IR inputs that are sensitive to our changes that can be promoted into being tests) and the whole area is under-tested as it stands -- but I'd prefer to put the time into testing the later patches, instead of these specific changes where the ultimate goal is to design-out the behaviour. Ideally in ~six months any tests that would be added in this patch could be deleted!

[0] https://discourse.llvm.org/t/rfc-instruction-api-changes-needed-to-eliminate-debug-intrinsics-from-ir/68939


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151419



More information about the llvm-commits mailing list