Skip to content
  1. Oct 30, 2013
  2. Oct 29, 2013
    • Manman Ren's avatar
      Debug Info: support for DW_FORM_ref_addr. · ce20d460
      Manman Ren authored
      To support ref_addr, we calculate the section offset of a DIE (i.e. offset
      of a DIE from beginning of the debug info section). The Offset field in DIE
      is currently CU-relative. To calculate the section offset, we add a
      DebugInfoOffset field in CompileUnit to store the offset of a CU from beginning
      of the debug info section. We set the value in DwarfUnits::computeSizeAndOffset
      for each CompileUnit.
      
      A helper function DIE::getCompileUnit is added to return the CU DIE that
      the input DIE belongs to. We also add a map CUDieMap in DwarfDebug to help
      finding the CU for a given CU DIE.
      
      For a cross-referenced DIE, we first find the CU DIE it belongs to with
      getCompileUnit, then we use CUDieMap to get the corresponding CU for the CU DIE.
      Adding the section offset of the CU with the CU-relative offset of a DIE gives
      us the seciton offset of the DIE.
      
      We correctly emit ref_addr with relocation using EmitLabelPlusOffset when
      doesDwarfUseRelocationsAcrossSections is true.
      
      This commit handles the emission of DW_FORM_ref_addr when we have an attribute
      with FORM_ref_addr. A follow-on patch will start using ref_addr when adding a
      DIEEntry. This commit will be tested and verified in the follow-on patch.
      
      Reviewed off-list by Eric, Thanks.
      
      llvm-svn: 193658
      ce20d460
    • Manman Ren's avatar
      Debug Info: instead of calling addToContextOwner which constructs the context · f4c339e0
      Manman Ren authored
      after the DIE creation, we construct the context first.
      
      Ensure that we create the context before we create a type so that we can add
      the newly created type to the parent. Remove last use of addToContextOwner
      now that it's not needed.
      
      We use createAndAddDIE to wrap around "new DIE(". Now all shareable DIEs
      should be added to their parents right after the creation.
      
      Reviewed off-list by Eric, Thanks.
      
      llvm-svn: 193657
      f4c339e0
    • Josh Magee's avatar
      [stackprotector] Update the StackProtector pass to perform datalayout analysis. · 3f1c0e35
      Josh Magee authored
      This modifies the pass to classify every SSP-triggering AllocaInst according to
      an SSPLayoutKind (LargeArray, SmallArray, AddrOf).  This analysis is collected
      by the pass and made available for use, but no other pass uses it yet.
      
      The next patch will make use of this analysis in PEI and StackSlot
      passes.  The end goal is to support ssp-strong stack layout rules.
      
      WIP.
      
      Differential Revision: http://llvm-reviews.chandlerc.com/D1789
      
      llvm-svn: 193653
      3f1c0e35
    • Rafael Espindola's avatar
      Move getSymbol to TargetLoweringObjectFile. · e133ed88
      Rafael Espindola authored
      This allows constructing a Mangler with just a TargetMachine.
      
      llvm-svn: 193630
      e133ed88
    • Rafael Espindola's avatar
      Add a helper getSymbol to AsmPrinter. · 79858aa3
      Rafael Espindola authored
      llvm-svn: 193627
      79858aa3
    • Manman Ren's avatar
      Debug Info: instead of calling addToContextOwner which constructs the context · f6b936bc
      Manman Ren authored
      after the DIE creation, we construct the context first.
      
      This touches creation of namespaces and global variables. The purpose is to
      handle all DIE creations similarly: constructs the context first, then creates
      the DIE and immediately adds the DIE to its parent.
      
      We use createAndAddDIE to wrap around "new DIE(".
      
      llvm-svn: 193589
      f6b936bc
    • Alp Toker's avatar
      Fix "existant" typos · 6a033745
      Alp Toker authored
      llvm-svn: 193579
      6a033745
    • Manman Ren's avatar
      Debug Info: use createAndAddDIE to wrap around "new DIE" in DwarfDebug. · 4a841a86
      Manman Ren authored
      This commit ensures DIEs are constructed within a compile unit and
      immediately added to their parents.
      
      Reviewed off-list by Eric.
      
      llvm-svn: 193568
      4a841a86
    • Manman Ren's avatar
      Debug Info: use createAndAddDIE for newly-created Subprogram DIEs. · 73d697c6
      Manman Ren authored
      More patches will be submitted to convert "new DIE(" to use createAddAndDIE in
      DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where
      we have to decide between ref4 and ref_addr, because DIEs that can be shared
      across CU will be added to a CU already.
      
      Reviewed off-list by Eric.
      
      llvm-svn: 193567
      73d697c6
    • Manman Ren's avatar
      Debug Info: add a helper function createAndAddDIE. · b987e517
      Manman Ren authored
      It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
      DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
      sure that bookkeeping is done at the earliest time and we should not see
      parentless DIEs if all constructions of DIEs go through this helper function.
      
      Later on, we can use an allocator for DIE allocation, and will only need to
      change createAndAddDIE instead of modifying all the "new DIE(".
      
      Reviewed off-list by Eric.
      
      llvm-svn: 193566
      b987e517
  3. Oct 28, 2013
    • Richard Sandiford's avatar
      [DAGCombiner] Respect volatility when checking for aliases · 981fdeb4
      Richard Sandiford authored
      Making useAA() default to true for SystemZ showed that the combiner alias
      analysis wasn't handling volatile accesses.  This hit many of the SystemZ
      tests, but I arbitrarily picked one for the purpose of this patch.
      
      llvm-svn: 193518
      981fdeb4
    • Richard Sandiford's avatar
      Keep TBAA info when rewriting SelectionDAG loads and stores · 39c1ce4d
      Richard Sandiford authored
      Most SelectionDAG code drops the TBAA info when creating a new form of a
      load and store (e.g. during legalization, or when converting a plain
      load to an extending one).  This patch tries to catch all cases where
      the TBAA information can legitimately be carried over.
      
      The patch adds alternative forms of getLoad() and getExtLoad() that take
      a MachineMemOperand instead of individual fields.  (The corresponding
      getTruncStore() already exists.)  The idea is to use the MachineMemOperand
      forms when all fields are carried over (size, pointer info, isVolatile,
      isNonTemporal, alignment and TBAA info).  If some adjustment is being
      made, e.g. to narrow the load, then we still pass the individual fields
      but also pass the TBAA info.
      
      llvm-svn: 193517
      39c1ce4d
  4. Oct 25, 2013
  5. Oct 24, 2013
  6. Oct 23, 2013
  7. Oct 22, 2013
    • Manman Ren's avatar
      Debug Info: code clean up. · 642a0acc
      Manman Ren authored
      Remove unnecessary creation of LexicalScope in collectDeadVariables.
      The created LexicialScope was only used to get isAbstractScope, which
      should be false from the creation:
      "new LexicalScope(NULL, DIDescriptor(SP), NULL, false);".
      
      We can also remove a DenseMap that holds the created LexicalScopes.
      
      llvm-svn: 193196
      642a0acc
    • David Blaikie's avatar
      DIEHashing: Provide an assert for unreachable functionality regarding friends. · 5ebc54d9
      David Blaikie authored
      Since (as of r190716) Clang no longer emits debug info for C++ friend
      declarations (and it seems GCC never has/does, which was the motivation
      for the Clang change), there's no actual reachable case for implementing
      the part of DWARF 4, Section 7.27 part 5 that pertains to friends.
      
      Leave an assert here so that if/when we do have a client producing
      friends and using type units, we can fill in the gap and add appropriate
      (unit and feature) tests.
      
      llvm-svn: 193193
      5ebc54d9
    • David Blaikie's avatar
      DWARF type hashing: pointers to members · d70a0553
      David Blaikie authored
      Includes a test case/FIXME demonstrating a bug/limitation in pointer to
      member hashing. To be honest I'm not sure why we don't just always use
      summary hashing for referenced types... but perhaps I'm missing
      something.
      
      llvm-svn: 193175
      d70a0553
Loading