Skip to content
  1. Jul 17, 2019
    • Qiu Chaofan's avatar
      Update email address. · 4c77a696
      Qiu Chaofan authored
      llvm-svn: 366291
      4c77a696
    • Nico Weber's avatar
      gn build: Merge r366265 · 67cf3d61
      Nico Weber authored
      llvm-svn: 366289
      67cf3d61
    • Nico Weber's avatar
      gn build: Merge r366216 · 420f3f64
      Nico Weber authored
      llvm-svn: 366288
      420f3f64
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Autogenerate register asm names · e5012ab3
      Stanislav Mekhanoshin authored
      Differential Revision: https://reviews.llvm.org/D64839
      
      llvm-svn: 366283
      e5012ab3
    • Matt Arsenault's avatar
      ARM: Fix missing immarg for space intrinsic · 1bd9c654
      Matt Arsenault authored
      llvm-svn: 366280
      1bd9c654
    • Matt Arsenault's avatar
      GlobalISel: Add overload of handleAssignments with CCState · 1c3f4ec7
      Matt Arsenault authored
      AMDGPU needs to allocate special argument registers separately from
      the user function argument list, so needs direct control over the
      CCState.
      
      The ArgLocs argument is only really necessary because CCState doesn't
      allow access to it.
      
      llvm-svn: 366279
      1c3f4ec7
    • Justin Bogner's avatar
      [TableGen] Generate offsets into a flat array for getOperandType · 418516c7
      Justin Bogner authored
      Rather than an array of std::initializer_list, generate a table of
      offsets and a flat array of the operands for getOperandType. This is a
      bit more efficient on platforms that don't manage to get the array of
      inintializer_lists initialized at link time (I'm looking at you
      macOS). It's also quite quite a bit faster to compile.
      
      llvm-svn: 366278
      418516c7
    • Guanzhong Chen's avatar
      [WebAssembly] Compile all TLS on Emscripten as local-exec · 0a8d4df7
      Guanzhong Chen authored
      Summary:
      Currently, on Emscripten, dynamic linking is not supported with threads.
      This means that if thread-local storage is used, it must be used in a
      statically-linked executable. Hence, local-exec is the only possible model.
      
      This diff compiles all TLS variables to use local-exec on Emscripten as a
      temporary measure until dynamic linking is supported with threads.
      
      The goal for this is to allow C++ types with constructors to be thread-local.
      
      Currently, when `clang` compiles a `thread_local` variable with a constructor,
      it generates `__tls_guard` variable:
      
          @__tls_guard = internal thread_local global i8 0, align 1
      
      As no TLS model is specified, this is treated as general-dynamic, which we do
      not support (and cannot support without implementing dynamic linking support
      with threads in Emscripten). As a result, any C++ constructor in `thread_local`
      variables would not compile.
      
      By compiling all `thread_local` as local-exec, `__tls_guard` will compile and
      we can support C++ constructors with TLS without implementing dynamic linking
      with threads.
      
      Depends on D64537
      
      Reviewers: tlively, aheejin, sbc100
      
      Reviewed By: aheejin
      
      Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D64776
      
      llvm-svn: 366275
      0a8d4df7
    • Justin Bogner's avatar
      [TableGen] Add "getOperandType" to get operand types from opcode/opidx · fe66fdb8
      Justin Bogner authored
      The InstrInfoEmitter outputs an enum called "OperandType" which gives
      numerical IDs to each operand type. This patch makes use of this enum
      to define a function called "getOperandType", which allows looking up
      the type of an operand given its opcode and operand index.
      
      Patch by Nicolas Guillemot. Thanks!
      
      Differential Revision: https://reviews.llvm.org/D63320
      
      llvm-svn: 366274
      fe66fdb8
    • Guanzhong Chen's avatar
      [WebAssembly] Implement thread-local storage (local-exec model) · 42bba4b8
      Guanzhong Chen authored
      Summary:
      Thread local variables are placed inside a `.tdata` segment. Their symbols are
      offsets from the start of the segment. The address of a thread local variable
      is computed as `__tls_base` + the offset from the start of the segment.
      
      `.tdata` segment is a passive segment and `memory.init` is used once per thread
      to initialize the thread local storage.
      
      `__tls_base` is a wasm global. Since each thread has its own wasm instance,
      it is effectively thread local. Currently, `__tls_base` must be initialized
      at thread startup, and so cannot be used with dynamic libraries.
      
      `__tls_base` is to be initialized with a new linker-synthesized function,
      `__wasm_init_tls`, which takes as an argument a block of memory to use as the
      storage for thread locals. It then initializes the block of memory and sets
      `__tls_base`. As `__wasm_init_tls` will handle the memory initialization,
      the memory does not have to be zeroed.
      
      To help allocating memory for thread-local storage, a new compiler intrinsic
      is introduced: `__builtin_wasm_tls_size()`. This instrinsic function returns
      the size of the thread-local storage for the current function.
      
      The expected usage is to run something like the following upon thread startup:
      
          __wasm_init_tls(malloc(__builtin_wasm_tls_size()));
      
      Reviewers: tlively, aheejin, kripken, sbc100
      
      Subscribers: dschuff, jgravelle-google, hiraditya, sunfish, jfb, cfe-commits, llvm-commits
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D64537
      
      llvm-svn: 366272
      42bba4b8
    • Matt Arsenault's avatar
      AMDGPU: Partially revert r366250 · 21f2858d
      Matt Arsenault authored
      GCCBuiltin doesn't work for these, because they have a mangled type
      (although they arguably should not).
      
      llvm-svn: 366271
      21f2858d
  2. Jul 16, 2019
Loading