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
    • Manman Ren's avatar
      Struct byval cleanup: add helper functions to reduce code duplication. · b504f494
      Manman Ren authored
      Helper functions are added:
      emitPostLd: emit a post-increment load operation with given size.
      emitPostSt: emit a post-increment store operation with given size.
      
      No functionality change.
      
      llvm-svn: 193656
      b504f494
    • 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
    • Matt Arsenault's avatar
      Update comment · 87596662
      Matt Arsenault authored
      llvm-svn: 193651
      87596662
    • Matt Arsenault's avatar
      Workaround MSVC 32-bit miscompile of getCondCodeAction. · a1ca46d0
      Matt Arsenault authored
      Use 32-bit types for the array instead of 64. This should
      generally be better anyway.
      
      In optimized + assert builds, I saw a failure when a
      cond code / type combination that is never set was loading
      a non-zero value and hitting the != Promote assert.
      
      It turns out when loading the 64-bit value to do the shift,
      the assembly loads the 2 32-bit halves from non-consecutive
      addresses. The address the second half of the loaded uint64_t
      doesn't include the offset of the array in the struct. Instead
      of being offset + 4, it's just + 4.
      
      I'm not entirely sure why this wasn't observed before.
      setCondCodeAction isn't heavily used by the in-tree targets,
      and not with the higher valued vector SimpleValueTypes. Only
      PPC is using one of the > 32 valued types, and that is probably
      never used by anyone on a 32-bit MSVC compiled host.
      
      I ran into this when upgrading LLVM versions, so I guess the
      value loaded from the nonsense address happened to work out
      before.
      
      No test since I'm not really sure if / how it can be reproduced
      with the current in tree targets, and it's not supposed to change
      anything.
      
      llvm-svn: 193650
      a1ca46d0
    • Aaron Ballman's avatar
      Removing a switch statement that contains only a default label. This resolves... · 9ab670fb
      Aaron Ballman authored
      Removing a switch statement that contains only a default label.  This resolves an MSVC warning.  No functional change intended.
      
      llvm-svn: 193649
      9ab670fb
    • Akira Hatanaka's avatar
      [mips] Align the stack to 16-bytes for mfp64. · 6b2d8419
      Akira Hatanaka authored
      llvm-svn: 193641
      6b2d8419
    • Rafael Espindola's avatar
      Remove declared but not implemented function. · 88034af2
      Rafael Espindola authored
      llvm-svn: 193637
      88034af2
    • Benjamin Kramer's avatar
      Fix common typos in the docs. · 3b32b2ff
      Benjamin Kramer authored
      llvm-svn: 193632
      3b32b2ff
    • 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
    • Manman Ren's avatar
      Debug Info: clean up testing case. · 75cc7658
      Manman Ren authored
      Add a tag before the name attribute for readability. Use CHECK-NEXT
      instead of CHECK-NOT followed by a CHECK. Add new lines to separate checking
      of different DIEs.
      
      llvm-svn: 193629
      75cc7658
Loading