[PATCH] D46184: [BranchFolding] Salvage DBG_VALUE instructions from empty blocks

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 09:31:30 PDT 2018


bjope added a comment.

In https://reviews.llvm.org/D46184#1081160, @aprantl wrote:

> Have you thought about just changing the scheduling of the LiveDebugValues pass to run earlier instead? Would that be an overall improvement?


Not more than mentioned in the summary:
 "A future solution, to handle more situations, could perhaps be to run the LiveDebugValues pass before branch folding?"

I think it would be an interesting thing to test. Does anybody know if there are some known restrictions, explaining why the LiveDebugValues pass is run so late today?

I see one potential risk with populating the code with lots of DBG_VALUE instructions not really related to the preceeding MI.
Currently a DBG_VALUE basically follows the preceeding MI around when scheduling in our out-of-tree VLIW-scheduler (I think it is quite similar with the in-tree MIScheduler). So if there are lots of DBG_VALUE instructions that aren't describing what happened in the preceeding instruction, then the result after scheduling will be bad. So scheduling is a major problem for us when it comes to debug-info. We do MI scheduling late in the pipeline, including VLIW bundling and we haven't yet found a way to teach the scheduler how to handle debug-info properly, while still ignoring debug-info since the codegen should be the same with and without debug-info.


Repository:
  rL LLVM

https://reviews.llvm.org/D46184





More information about the llvm-commits mailing list