[PATCH] D11180: Fixed debug info generation for function static variables, typedef, and records

Amjad Aboud amjad.aboud at intel.com
Tue Jul 14 01:47:48 PDT 2015


aaboud created this revision.
aaboud added a reviewer: dblaikie.
aaboud added subscribers: friss, probinson, llvm-commits.
aaboud set the repository for this revision to rL LLVM.

A Fix for Bugs PR19238 & PR24008.
This patch introduces an improvement to "D9758", which did not consider optimized code (especially inline).

Changes include:
-------------------
1. Storing regular basic block scope into the scope map.
    There are 3 kinds of lexical blocks: regular, abstract, and inline, where the first two have no more than one instance.

2. Function static variable are marked either as concrete or abstract.
    Abstract variable have only general attributes (no location) and is located in an abstract lexical scope.
    Concrete variable have only location and reference to "abstract_origin" variable (if available, otherwise the general attributes).
    Unfortunately, this change does not handle function static variable that is not defined in a lexical block, but directly in the function scope. These variables are created once as concrete in the "regular" function scope entry.

3. It is now possible to create basic block entry directly from the metadata.
    This is needed for lexical blocks that contains type declaration but does not have code associated with them or when the type is being created before the lexical block is. In these cases the lexical block created is considered a "regular" and thus is added to the scope map.

4. Two more LIT test to cover the optimized code, one for inline and another for PR24008

Repository:
  rL LLVM

http://reviews.llvm.org/D11180

Files:
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/CodeGen/AsmPrinter/DwarfDebug.h
  lib/CodeGen/AsmPrinter/DwarfUnit.cpp
  lib/CodeGen/AsmPrinter/DwarfUnit.h
  test/DebugInfo/X86/PR24008.ll
  test/DebugInfo/X86/lexical-block-inline.ll
  test/DebugInfo/X86/lexical-block.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11180.29652.patch
Type: text/x-patch
Size: 41992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150714/df9d8110/attachment.bin>


More information about the llvm-commits mailing list