[PATCH] D91722: [DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 02:55:45 PDT 2021


StephenTozer added a comment.

In D91722#2781128 <https://reviews.llvm.org/D91722#2781128>, @wenlei wrote:

> We're seeing a pathological case with 36ec97f76ac0d8be76fb16ac521f55126766267d <https://reviews.llvm.org/rG36ec97f76ac0d8be76fb16ac521f55126766267d> (3rd Reapply "[DebugInfo] Use variadic debug values to salvage BinOps and GEP instrs with non-const operands).

I didn't encounter any such cases while testing this patch, but it's certainly possible for it to occur. Personally, I think the best approach for this is to impose a limit on the number of args that can be added to a DIArgList by salvaging - it's clear that it is not feasible to salvage everywhere we possibly can. I think that a max of 32 is probably a reasonable amount, but if you have a reproducer for this issue I can do some performance testing myself to more accurately determine a sensible limit.

I do believe that InstCombine also has a problem with massively inflating the number of debug intrinsics in a function; the slowdown factor you're seeing is probably the product of these two factors.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91722



More information about the llvm-commits mailing list