[PATCH] D101373: [DebugInfo] Drop DBG_VALUE_LISTs with an excessive number of debug operands

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 15:20:19 PDT 2021


StephenTozer added a comment.

In D101373#2720962 <https://reviews.llvm.org/D101373#2720962>, @dblaikie wrote:

> Oh, right. I just realized this test doesn't have to be especially realistic because it's only about the length of the expression - not how we got such a long expression in the first place?
>
> So perhaps we could include a comment describing the real-ish situation, but then make the test case really simple/obvious? - it doesn't need any IR instructions really, and can have an expression that's simple/uninteresting in some way? Like adding together the constant 1 repeatedly?

Yes, that would work - I've checked that as well, and there can be an LL test case of just over 30 lines (although to be more specific, they have to be different constants - identical values will be coalesced just above the assert in question). One thing is that I suspect we might have change it back to the register form in the future however; on the topic of reducing the size of expressions, DIExpression optimization has come up before. The simplest forms of this to implement would be removal of no-ops subexpressions (like "multiply by 1), and simplifying constant subexpressions. This would cause an issue with the test later on, at which point we'd revert back to the test currently in this patch.

That being said, we don't have to bend over backwards to accomodate future potential changes; I can just add a note to the test pointing to this review to ensure that if it breaks later as the result of such a change being added, whoever picks it up doesn't have to go back to square 1 on finding a reproducer.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101373



More information about the llvm-commits mailing list