[PATCH] D61890: [LiveDebugValues] End variable's range with multiple locations at block entry
Nikola Prica via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 15 06:26:25 PDT 2019
NikolaPrica added a comment.
@aprantl @wolfgangp Thanks for your comments! They are really useful for me regardless of this patch being accepted or not.
Before I start addressing them I would like to get to the same point whether this is the right place to address this problem that we try to solve in D61600 <https://reviews.llvm.org/D61600>, D61940 <https://reviews.llvm.org/D61940> and here.
> would I be right in thinking that this patch is to fix the ChangingRegs behaviour that David brought up in [0]?
Yes. You are right about this. I've took his example as a second test here.
> Compiling with llvm r359863 and this patch applied, the conflicting locations of "local" in the "case 1" and default blocks don't seem to be detected, and no DBG_VALUE $noreg is produced in the function exit block, which is what I anticipated this patch would do. I haven't dug into why. As a result, the "default" location of "local" flows into the exit block due to the ChangingRegs functionality (see below).
The problem with your test case is that 2/3 incoming BB locations in the last basic block have `DBG_VALUE` for variable `local` and current code looks for intersection of all incoming blocks. With some better variables bitset operations(when this gets refactored by Adrian's suggestion) I suppose it could be handled. But nevertheless, as you mentioned, covering "case 2:" block can't be handled here.
The reason I offered this patch as a alternative to D61600 <https://reviews.llvm.org/D61600> is that it degrades some ranges when it could leave them wider (test/DebugInfo/X86/fission-ranges.ll). My first attempt to solve this problem was just to make DbgEntityHistoryCalculator close all DBG_VALUES at the end of block. I tried to find other solution (as D61600 <https://reviews.llvm.org/D61600> and this) but It seems inevitable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61890/new/
https://reviews.llvm.org/D61890
More information about the llvm-commits
mailing list