1. Aug 05, 2021
    • Bradley Smith's avatar
      [clang][AArch64][SVE] Avoid going through memory for fixed/scalable predicate casts · e57e1e4e
      Bradley Smith authored
      For fixed SVE types, predicates are represented using vectors of i8,
      where as for scalable types they are represented using vectors of i1. We
      can avoid going through memory for casts between these by bitcasting the
      i1 scalable vectors to/from a scalable i8 vector of matching size, which
      can then use the existing vector insert/extract logic.
      
      Differential Revision: https://reviews.llvm.org/D106860
      e57e1e4e
    • Fangrui Song's avatar
      [ELF] Combine foo@v1 and foo with the same versionId if both are defined · 66d44304
      Fangrui Song authored
      Due to an assembler design flaw (IMO), `.symver foo,foo@v1` produces two symbols `foo` and `foo@v1` if `foo` is defined.
      
      * `v1 {};` produces both `foo` and `foo@v1`, but GNU ld only produces `foo@v1`
      * `v1 { foo; };` produces both `foo@@v1` and `foo@v1`, but GNU ld only produces `foo@v1`
      * `v2 { foo; };` produces both `foo@@v2` and `foo@v1`, matching GNU ld. (Tested by symver.s)
      
      This patch implements the GNU ld behavior by reusing the symbol redirection mechanism
      in D92259. The new test symver-non-default.s checks the first two cases.
      
      Without the patch, the second case will produce `foo@v1` and `foo@@v1` which
      looks weird and makes foo unnecessarily default versioned.
      
      Note: `.symver foo,foo@v1,remove` exists but the unfortunate `foo` will not go
      away anytime soon.
      
      Reviewed By: peter.smith
      
      Differential Revision: https://reviews.llvm.org/D107235
      66d44304
    • Dmitry Vyukov's avatar
      tsan: remove non-existent MemoryAccessRangeStep · bdeb15c3
      Dmitry Vyukov authored
      Probably was used for Go at some point...
      
      Depends on D107466.
      
      Reviewed By: melver
      
      Differential Revision: https://reviews.llvm.org/D107467
      bdeb15c3
    • Dmitry Vyukov's avatar
      tsan: move AccessType to tsan_defs.h · c2598be8
      Dmitry Vyukov authored
      It will be needed in more functions like ReportRace
      (the plan is to pass it through MemoryAccess to ReportRace)
      and this move will allow to split the huge tsan_rtl.h into parts
      (e.g. move FastState/Shadow definitions to a separate header).
      
      Depends on D107465.
      
      Reviewed By: melver
      
      Differential Revision: https://reviews.llvm.org/D107466
      c2598be8
    • Dmitry Vyukov's avatar
      tsan: introduce kAccessExternalPC · 2ddaffdc
      Dmitry Vyukov authored
      Add kAccessExternal memory access flag that denotes
      memory accesses with PCs that may have kExternalPCBit set.
      In preparation for MemoryAccess refactoring.
      Currently unused, but will allow to skip a branch.
      
      Depends on D107464.
      
      Reviewed By: melver
      
      Differential Revision: https://reviews.llvm.org/D107465
      2ddaffdc
    • Dmitry Vyukov's avatar
      tsan: introduce kAccessFree · d41233e9
      Dmitry Vyukov authored
      Add kAccessFree memory access flag (similar to kAccessVptr).
      In preparation for MemoryAccess refactoring.
      
      Reviewed By: melver
      
      Differential Revision: https://reviews.llvm.org/D107464
      d41233e9
    • Fangrui Song's avatar
      [ELF] Apply version script patterns to non-default version symbols · 7ed22a6f
      Fangrui Song authored
      Currently version script patterns are ignored for .symver produced
      non-default version (single @) symbols. This makes such symbols
      not localizable by `local:`, e.g.
      
      ```
      .symver foo3_v1,foo3@v1
      .globl foo_v1
      foo3_v1:
      
      ld.lld --version-script=a.ver -shared a.o
      # In a.out, foo3@v1 is incorrectly exported.
      ```
      
      This patch adds the support:
      
      * Move `config->versionDefinitions[VER_NDX_LOCAL].patterns` to `config->versionDefinitions[versionId].localPatterns`
      * Rename `config->versionDefinitions[versionId].patterns` to `config->versionDefinitions[versionId].nonLocalPatterns`
      * Allow `findAllByVersion` to find non-default version symbols when `includeNonDefault` is true. (Note: `symtab` keys do not have `@@`)
      * Make each pattern check both the unversioned `pat.name` and the versioned `${pat.name}@${v.name}`
      * `localPatterns` can localize `${pat.name}@${v.name}`. `nonLocalPatterns` can prevent localization by assigning `verdefIndex` (before `parseSymbolVersion`).
      
      ---
      
      If a user notices new `undefined symbol` errors with a version script containing
      `local: *;`, the issue is likely due to a missing `global:` pattern.
      
      Reviewed By: peter.smith
      
      Differential Revision: https://reviews.llvm.org/D107234
      7ed22a6f
    • Lechen Yu's avatar
      [openmp] Add OMPT initialization in libomptarget · 3bc8ce5d
      Lechen Yu authored
      When loading libomptarget, the init function in libomptarget/src/rtl.cpp
      will search for the libomptarget_start_tool function using libdl.
      libomptarget_start_tool will pass those OMPT callbacks related to target
      constructs to libomptarget
      
      Differential Revision: https://reviews.llvm.org/D99803
      3bc8ce5d
  2. Aug 04, 2021