Skip to content
  1. May 03, 2017
    • Vedant Kumar's avatar
      [ubsan] Skip overflow checks on safe arithmetic (fixes PR32874) · d9191159
      Vedant Kumar authored
      Currently, ubsan emits overflow checks for arithmetic that is known to
      be safe at compile-time, e.g:
      
        1 + 1 => CheckedAdd(1, 1)
      
      This leads to breakage when using the __builtin_prefetch intrinsic. LLVM
      expects the arguments to @llvm.prefetch to be constant integers, and
      when ubsan inserts unnecessary checks on the operands to the intrinsic,
      this contract is broken, leading to verifier failures (see PR32874).
      
      Instead of special-casing __builtin_prefetch for ubsan, this patch fixes
      the underlying problem, i.e that clang currently emits unnecessary
      overflow checks.
      
      Testing: I ran the check-clang and check-ubsan targets with a stage2,
      ubsan-enabled build of clang. I added a regression test for PR32874, and
      some extra checking to make sure we don't regress runtime checking for
      unsafe arithmetic. The existing ubsan-promoted-arithmetic.cpp test also
      provides coverage for this change.
      
      llvm-svn: 301988
      d9191159
    • Zachary Turner's avatar
      Fix type conversion error. · 67736594
      Zachary Turner authored
      llvm-svn: 301987
      67736594
    • Zachary Turner's avatar
      Make codeview::StringTable. · 7dba20bd
      Zachary Turner authored
      Previously we had knowledge of how to serialize and deserialize
      a string table inside of DebugInfo/PDB, but the string table
      that it serializes contains a piece that is actually considered
      CodeView and can appear outside of a PDB.  We already have logic
      in llvm-readobj and MCCodeView to read and write this format,
      so it doesn't make sense to duplicate the logic in DebugInfoPDB
      as well.
      
      This patch makes codeview::StringTable (for writing) and
      codeview::StringTableRef (for reading), updates DebugInfoPDB
      to use these classes for its own writing, and updates llvm-readobj
      to additionally use StringTableRef for reading.
      
      It's a bit more difficult to get MCCodeView to use this for
      writing, but it's a logical next step.
      
      llvm-svn: 301986
      7dba20bd
    • Xin Tong's avatar
      Typo in LangRef.rst. NFC · c7180204
      Xin Tong authored
      llvm-svn: 301985
      c7180204
    • Greg Clayton's avatar
      Add line table verification to lldb-dwarfdump --verify · 6707046f
      Greg Clayton authored
      This patch verifies the .debug_line:
      - verify all addresses in a line table sequence have ascending addresses
      - verify that all line table file indexes are valid
      
      Unit tests added for both cases.
      
      Differential Revision: https://reviews.llvm.org/D32765
      
      llvm-svn: 301984
      6707046f
    • Tim Northover's avatar
      ARM: avoid handing a deleted node back to TableGen during ISel. · 4a01ffbd
      Tim Northover authored
      When we replaced the multiplicand the destination node might already exist.
      When that happens the original gets CSEd and deleted. However, it's actually
      used as the offset so nonsense is produced.
      
      Should fix PR32726.
      
      llvm-svn: 301983
      4a01ffbd
    • Rui Ueyama's avatar
      Remove a dead function declaration. · 9decbfee
      Rui Ueyama authored
      llvm-svn: 301982
      9decbfee
    • Reid Kleckner's avatar
      Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList" · ee4930b6
      Reid Kleckner authored
      This time, I fixed, built, and tested clang.
      
      This reverts r301712.
      
      llvm-svn: 301981
      ee4930b6
    • Joel Jones's avatar
      [AArch64] ILP32 Backend Relocation Support · 65134057
      Joel Jones authored
      Remove "_NC" suffix and semantics from TLSDESC_LD{64,32}_LO12 and
        TLSDESC_ADD_LO12 relocations
      Rearrange ordering in AArch64.def to follow relocation encoding
      Fix name:
        R_AARCH64_P32_LD64_GOT_LO12_NC => R_AARCH64_P32_LD32_GOT_LO12_NC
      Add support for several "TLS", "TLSGD", and "TLSLD" relocations for
        ILP32
      Fix return values from isNonILP32reloc
      Add implementations for
        R_AARCH64_ADR_PREL_PG_HI21_NC, R_AARCH64_P32_LD32_GOT_LO12_NC,
        R_AARCH64_P32_TLSIE_LD32_GOTTPREL_LO12_NC,
        R_AARCH64_P32_TLSDESC_LD32_LO12, R_AARCH64_LD64_GOT_LO12_NC,
        *TLSLD_LDST128_DTPREL_LO12, *TLSLD_LDST128_DTPREL_LO12_NC,
        *TLSLE_LDST128_TPREL_LO12, *TLSLE_LDST128_TPREL_LO12_NC
      Modify error messages to give name of equivalent relocation in the
        ABI not being used, along with better checking for non-existent
        requested relocations.
      Added assembler support for "pg_hi21_nc"
      Relocation definitions added without implementations:
        R_AARCH64_P32_TLSDESC_ADR_PREL21, R_AARCH64_P32_TLSGD_ADR_PREL21,
        R_AARCH64_P32_TLSGD_ADD_LO12_NC, R_AARCH64_P32_TLSLD_ADR_PREL21, 
        R_AARCH64_P32_TLSLD_ADR_PAGE21, R_AARCH64_P32_TLSLD_ADD_LO12_NC,
        R_AARCH64_P32_TLSLD_LD_PREL19, R_AARCH64_P32_TLSDESC_LD_PREL19,
        R_AARCH64_P32_TLSGD_ADR_PAGE21, R_AARCH64_P32_TLS_DTPREL,
        R_AARCH64_P32_TLS_DTPMOD, R_AARCH64_P32_TLS_TPREL,
        R_AARCH64_P32_TLSDESC
      Fix encoding:
        R_AARCH64_P32_TLSDESC_ADR_PAGE21
      
      Reviewers: Peter Smith
      
      Patch by: Joel Jones (jjones@cavium.com)
      
      Differential Revision: https://reviews.llvm.org/D32072
      
      llvm-svn: 301980
      65134057
    • Joel Jones's avatar
      Remove _NC suffix from ELF relocations TLSDESC_{LD64,ADD}_LO12 · 93340741
      Joel Jones authored
      llvm-svn: 301979
      93340741
  2. May 02, 2017
Loading