[PATCH] D82129: [DebugInfo] Drop location ranges for variables which exist entirely outside the variable's scope
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 10:12:58 PDT 2020
probinson added a comment.
This patch depends on the ranges for all scopes to be (reasonably) correct, but I think there's one modified test where that's not the case; a variable location is dropped because (AFAICT looking at the equivalent DWARF output) its containing scope isn't pointing to the right instructions.
If we take the stance that these cases are bugs, then this analysis is better off done in a verifier, so we can find and fix those cases, rather than papering over compiler bugs.
I might be wrong about that test, and maybe we aren't going to take that stance, but I thought it was worth bringing up here.
================
Comment at: llvm/test/DebugInfo/COFF/register-variables.ll:111
+; OBJ: Flags [ (0x100)
+; OBJ: IsOptimizedOut (0x100)
; OBJ: ]
----------------
I believe this one is being marked as OptimizedOut because the containing scope is pointing to the wrong instructions. The variable's instruction range looks not unreasonable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82129/new/
https://reviews.llvm.org/D82129
More information about the llvm-commits
mailing list