UnstableChanges

Summary

  1. [DebugInfo] More strict debug range for stack variables Variable's stack location can stretch longer than it should. If a variable is placed at the stack in a some nested basic block its range can be calculated to be up to the next occurrence of the variable's DBG_VALUE, or up to the end of the function, thus covering a basic blocks that should not be included in the variable’s location range. This happens because the DbgEntityHistoryCalculator ends register locations at the end of a basic block only if the variable’s location register has been changed throughout the function, which is not the case for the register used to reference stack objects. This patch also tries to produce a single value location if the location list builder managed to merge all the locations into one. Reviewers: aprantl, dstenb, jmorse Reviewed By: aprantl, dstenb, jmorse Subscribers: djtodoro, ivanbaev, asowda Tags: #debug-info Differential Revision: https://reviews.llvm.org/D61600
Revision 362923 by nikolaprica:
[DebugInfo] More strict debug range for stack variables

Variable's stack location can stretch longer than it should. If a
variable is placed at the stack in a some nested basic block its range
can be calculated to be up to the next occurrence of the variable's
DBG_VALUE, or up to the end of the function, thus covering a basic
blocks that should not be included in the variable’s location range.
This happens because the DbgEntityHistoryCalculator ends register
locations at the end of a basic block only if the variable’s location
register has been changed throughout the function, which is not the
case for the register used to reference stack objects.

This patch also tries to produce a single value location if the location
list builder managed to merge all the locations into one.

Reviewers: aprantl, dstenb, jmorse

Reviewed By: aprantl, dstenb, jmorse

Subscribers: djtodoro, ivanbaev, asowda

Tags: #debug-info

Differential Revision: https://reviews.llvm.org/D61600
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpptrunk/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpptrunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpptrunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.htrunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpptrunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
The file was modified/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.htrunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
The file was added/llvm/trunk/test/DebugInfo/MIR/X86/dbg-stack-value-range.mirtrunk/test/DebugInfo/MIR/X86/dbg-stack-value-range.mir
The file was modified/llvm/trunk/test/DebugInfo/X86/fission-ranges.lltrunk/test/DebugInfo/X86/fission-ranges.ll