forked from OSchip/llvm-project
274bcbc139
For the following motivating example bool c(); void f(); bool start() { bool result = c(); if (!c()) { result = false; goto exit; } f(); result = true; exit: return result; } we would previously generate a single DW_AT_const_value(1) because only the DBG_VALUE in the second-to-last basic block survived codegen. This patch improves the heuristic used to determine when a DBG_VALUE is available at the beginning of its variable's enclosing lexical scope: - Stop giving singular constants blanket permission to take over the entire scope. There is still a special case for constants in the function prologue that we also miight want to retire later. - Use the lexical scope information to determine available-at-entry instead of proximity to the function prologue. After this patch we generate a location list with a more accurate narrower availability for the constant true value. As a pleasant side effect, we also generate inline locations instead of location lists where a loacation covers the entire range of the enclosing lexical scope. Measured on compiling llc with four targets this doesn't have an effect on compile time and reduces the size of the debug info for llc by ~600K. rdar://problem/30286912 llvm-svn: 305599 |
||
---|---|---|
.. | ||
ARMException.cpp | ||
AddressPool.cpp | ||
AddressPool.h | ||
AsmPrinter.cpp | ||
AsmPrinterDwarf.cpp | ||
AsmPrinterHandler.h | ||
AsmPrinterInlineAsm.cpp | ||
ByteStreamer.h | ||
CMakeLists.txt | ||
CodeViewDebug.cpp | ||
CodeViewDebug.h | ||
DIE.cpp | ||
DIEHash.cpp | ||
DIEHash.h | ||
DIEHashAttributes.def | ||
DbgValueHistoryCalculator.cpp | ||
DbgValueHistoryCalculator.h | ||
DebugHandlerBase.cpp | ||
DebugHandlerBase.h | ||
DebugLocEntry.h | ||
DebugLocStream.cpp | ||
DebugLocStream.h | ||
DwarfAccelTable.cpp | ||
DwarfAccelTable.h | ||
DwarfCFIException.cpp | ||
DwarfCompileUnit.cpp | ||
DwarfCompileUnit.h | ||
DwarfDebug.cpp | ||
DwarfDebug.h | ||
DwarfException.h | ||
DwarfExpression.cpp | ||
DwarfExpression.h | ||
DwarfFile.cpp | ||
DwarfFile.h | ||
DwarfStringPool.cpp | ||
DwarfStringPool.h | ||
DwarfUnit.cpp | ||
DwarfUnit.h | ||
EHStreamer.cpp | ||
EHStreamer.h | ||
ErlangGCPrinter.cpp | ||
LLVMBuild.txt | ||
OcamlGCPrinter.cpp | ||
WinException.cpp | ||
WinException.h |