Skip to content
  1. Oct 01, 2013
    • Manman Ren's avatar
      Debug Info: remove duplication of DIEs when a DIE is part of the type system · 8990d7ee
      Manman Ren authored
      and it is shared across CUs.
      
      We add a few maps in DwarfDebug to map MDNodes for the type system to the
      corresponding DIEs: MDTypeNodeToDieMap, MDSPNodeToDieMap, and
      MDStaticMemberNodeToDieMap. These DIEs can be shared across CUs, that is why we
      keep the maps in DwarfDebug instead of CompileUnit.
      
      Sometimes, when we try to add an attribute to a DIE, the DIE is not yet added
      to its owner yet, so we don't know whether we should use ref_addr or ref4.
      We create a worklist that will be processed during finalization to add
      attributes with the correct form (ref_addr or ref4).
      
      We add addDIEEntry to DwarfDebug to be a wrapper around DIE->addValue. It checks
      whether we know the correct form, if not, we update the worklist
      (DIEEntryWorklist).
      
      A testing case is added to show that we only create a single DIE for a type
      MDNode and we use ref_addr to refer to the type DIE.
      
      llvm-svn: 191792
      8990d7ee
    • Eric Christopher's avatar
      Add the DW_AT_GNU_ranges_base attribute if we've emitted any ranges · 9a08f9e5
      Eric Christopher authored
      into the debug_ranges section.
      
      llvm-svn: 191721
      9a08f9e5
    • Eric Christopher's avatar
      Update comments. · 1d06eb5d
      Eric Christopher authored
      llvm-svn: 191720
      1d06eb5d
    • Eric Christopher's avatar
      The DW_AT_GNU_pubnames/pubtypes attributes are actually form · 39eebfad
      Eric Christopher authored
      SEC_OFFSET from the beginning of the section so go ahead and emit
      a label at the beginning of each one.
      
      llvm-svn: 191710
      39eebfad
  2. Sep 28, 2013
  3. Sep 26, 2013
  4. Sep 24, 2013
  5. Sep 23, 2013
    • Eric Christopher's avatar
      Handle gnu pubtypes sections: · 261d2343
      Eric Christopher authored
      a) Make sure we are emitting the correct section in our section labels
      when we begin the module.
      b) Make sure we are emitting the correct pubtypes section in the
      presence of gnu pubtypes.
      c) For C++ struct, union, class, and enumeration types are default
      external.
      
      llvm-svn: 191225
      261d2343
    • Richard Mitton's avatar
      Fixed debug_aranges handling for common symbols. · 089ed89e
      Richard Mitton authored
      The size of common symbols is now tracked correctly, so they can be listed in the arange section without needing knowledge of other following symbols.
      
      .comm (and .lcomm) do not indicate to the system assembler any particular section to use, so we have to treat them as having no section.
      
      Test case update to account for this.
      
      llvm-svn: 191210
      089ed89e
  6. Sep 21, 2013
  7. Sep 20, 2013
  8. Sep 19, 2013
  9. Sep 16, 2013
  10. Sep 13, 2013
  11. Sep 12, 2013
    • Joey Gouly's avatar
      Add an instruction deprecation feature to TableGen. · 0e76fa7d
      Joey Gouly authored
      The 'Deprecated' class allows you to specify a SubtargetFeature that the
      instruction is deprecated on.
      
      The 'ComplexDeprecationPredicate' class allows you to define a custom
      predicate that is called to check for deprecation.
      For example:
        ComplexDeprecationPredicate<"MCR">
      
      would mean you would have to define the following function:
        bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI,
                                   std::string &Info)
      
      Which returns 'false' for not deprecated, and 'true' for deprecated
      and store the warning message in 'Info'.
      
      The MCTargetAsmParser constructor was chaned to take an extra argument of
      the MCInstrInfo class, so out-of-tree targets will need to be changed.
      
      llvm-svn: 190598
      0e76fa7d
  12. Sep 11, 2013
  13. Sep 10, 2013
    • Eric Christopher's avatar
      Hoist section call out of loop. · 13b99d2a
      Eric Christopher authored
      llvm-svn: 190440
      13b99d2a
    • Manman Ren's avatar
      Debug Info: create scope children DIEs when the scope DIE is not null. · 2312ed35
      Manman Ren authored
      We try to create the scope children DIEs after we create the scope DIE. But
      to avoid emitting empty lexical block DIE, we first check whether a scope
      DIE is going to be null, then create the scope children if it is not null.
      From the number of children, we decide whether to actually create the scope DIE.
      
      This patch also removes an early exit which checks for a special condition.
      It also removes deletion of un-used children DIEs that are generated
      because we used to generate children DIEs before the scope DIE.
      
      Deletion of un-used children DIEs may cause problem because we sometimes keep
      created DIEs in a member variable of a CU.
      
      llvm-svn: 190421
      2312ed35
    • Manman Ren's avatar
      Debug Info: define a DIRef template. · 34b3dcc3
      Manman Ren authored
      Specialize the constructors for DIRef<DIScope> and DIRef<DIType> to make sure
      the Value is indeed a scope ref and a type ref.
      
      Use DIScopeRef for DIScope::getContext and DIType::getContext and use DITypeRef
      for getContainingType and getClassType.
      
      DIScope::generateRef now returns a DIScopeRef instead of a "Value *" for
      readability and type safety.
      
      llvm-svn: 190418
      34b3dcc3
    • Manman Ren's avatar
      Debug Info: move DIScope::getContext back from DwarfDebug. · de897a36
      Manman Ren authored
      This partially reverts r190330. DIScope::getContext now returns DIScopeRef
      instead of DIScope. We construct a DIScopeRef from DIScope when we are
      dealing with subprogram, lexical block or name space.
      
      llvm-svn: 190362
      de897a36
  14. Sep 09, 2013
    • Eric Christopher's avatar
      Always add global names. We're adding them in the rest of the code · ba506db4
      Eric Christopher authored
      as well as types.
      
      No functional change as they're not emitted unless the option
      is true anyhow.
      
      llvm-svn: 190346
      ba506db4
    • Eric Christopher's avatar
      Rename for consistency. · 5f93bb92
      Eric Christopher authored
      llvm-svn: 190345
      5f93bb92
    • Manman Ren's avatar
      Debug Info: Use DIScopeRef for DIType::getContext. · 116868ea
      Manman Ren authored
          
      In DIBuilder, the context field of a TAG_member is updated to use the
      scope reference. Verifier is updated accordingly.
          
      DebugInfoFinder now needs to generate a type identifier map to have
      access to the actual scope. Same applies for BreakpointPrinter.
          
      processModule of DebugInfoFinder is called during initialization phase
      of the verifier to make sure the type identifier map is constructed early
      enough.
          
      We are now able to unique a simple class as demonstrated by the added
      testing case.
      
      llvm-svn: 190334
      116868ea
    • Manman Ren's avatar
      Debug Info: move DIScope::getContext to DwarfDebug. · 33796c5e
      Manman Ren authored
          
      DIScope::getContext is a wrapper function that calls the specific getContext
      method on each subclass. When we switch DIType::getContext to return DIScopeRef
      instead of DIScope, DIScope::getContext can no longer return a DIScope without
      a type identifier map.
          
      DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
      to have easy access to the type identifier map.
      
      llvm-svn: 190330
      33796c5e
    • Manman Ren's avatar
      Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug. · 3eb9dffc
      Manman Ren authored
      This helper function needs the type identifier map when we switch
      DIType::getContext to return DIScopeRef instead of DIScope.
      
      Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
      to have easy access to the map.
      
      llvm-svn: 190325
      3eb9dffc
    • Manman Ren's avatar
      Debug Info: Rename DITypeRef to DIScopeRef. · 856191b0
      Manman Ren authored
      A reference to a scope is more general than a reference to a type since
      DIType is a subclass of DIScope.
      
      A reference to a type can be either an identifier for the type or
      the DIType itself, while a reference to a scope can be either an
      identifier for the type (when the scope is indeed a type) or the
      DIScope itself. A reference to a type and a reference to a scope
      will be resolved in the same way. The only difference is in the
      verifier when a field is a reference to a type (i.e. the containing
      type field of a DICompositeType) or a field is a reference to a scope
      (i.e. the context field of a DIType).
      
      This is to get ready for switching DIType::getContext to return
      DIScopeRef instead of DIScope.
      
      Tighten up isTypeRef and isScopeRef to make sure the identifier is not
      empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef.
      
      llvm-svn: 190322
      856191b0
Loading