[PATCH] D38140: [DebugInfo] Do not extend range for physreg in LiveDebugVariables

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 27 02:18:01 PDT 2017


bjope added a comment.

In https://reviews.llvm.org/D38140#881660, @aprantl wrote:

> live-debug-variables happens so late in the pipeline that in practice checking for dwarfdump output hasn't caused much churn in the testsuite. I would prefer a `-filetype=obj -start-before=greedy | llvm-dwarfdump- test` over one that checks DEBUG output (which will only be tested by bots that build with assertions enabled).


This patch is to make sure that the output from the virtregrewriter is correct (i.e. the input to later passes such as LiveDebugValues and DwarfDebug). I want to do the checks as early as possible to catch faults in virtregrewriter without the risk of later passes hiding the fault.
My feeling is that the DBG_VALUE handling in the backend is quite unstable today. I think we need to define what the expectation is from each pass. Unless we start adding test cases to verify how each pass is handling DBG_VALUEs it will become hard to make things better.

One idea is to remove the CHECKDBG checks again in https://reviews.llvm.org/D38229 (and by that loosing some kind if regression tests on how LiveDebugVariables is calculating slot index ranges for physical registers). If https://reviews.llvm.org/D38229 had been pushed before this patch,. then this patch would become a bugfix and I would probably have settled with only adding the CHECKMIR checks.
Or maybe I need to write a class test for LiveDebugVariables.


https://reviews.llvm.org/D38140





More information about the llvm-commits mailing list