1. Jun 06, 2024
  2. Jun 05, 2024
  3. Jun 04, 2024
  4. May 18, 2024
  5. May 17, 2024
  6. May 16, 2024
  7. May 15, 2024
  8. May 14, 2024
    • Paul Kirth's avatar
      [RISCV][lld] Set the type of TLSDESC relocation's referenced local symbol to STT_NOTYPE · 6cfa40e4
      Paul Kirth authored
      When adding fixups for RISCV_TLSDESC_ADD_LO and RISCV_TLSDESC_LOAD_LO,
      the local label added for RISCV TLSDESC relocations have STT_TLS set,
      which is incorrect. Instead, these labels should have `STT_NOTYPE`.
      
      This patch stops adding such fixups and avoid setting the STT_TLS on
      these symbols. Failing to do so can cause LLD to emit an error `has an
      STT_TLS symbol but doesn't have an SHF_TLS section`. We additionally,
      adjust how LLD services these relocations to avoid errors with
      incompatible relocation and symbol types.
      
      Reviewers: topperc, MaskRay
      
      Reviewed By: MaskRay
      
      Pull Request: https://github.com/llvm/llvm-project/pull/85817
      
      (cherry picked from commit dfe4ca9b)
      6cfa40e4
    • Nikita Popov's avatar
      [PPCMergeStringPool] Avoid replacing constant with instruction (#88846) · 1184a9cb
      Nikita Popov authored
      String pool merging currently, for a reason that's not entirely clear to
      me, tries to create GEP instructions instead of GEP constant expressions
      when replacing constant references. It only uses constant expressions in
      cases where this is required. However, it does not catch all cases where
      such a requirement exists. For example, the landingpad catch clause has
      to be a constant.
      
      Fix this by always using the constant expression variant, which also
      makes the implementation simpler.
      
      Additionally, there are some edge cases where even replacement with a
      constant GEP is not legal. The one I am aware of is the
      llvm.eh.typeid.for intrinsic, so add a special case to forbid
      replacements for it.
      
      Fixes https://github.com/llvm/llvm-project/issues/88844.
      
      (cherry picked from commit 3a3aeb8e)
      1184a9cb
    • Owen Pan's avatar
      [clang-format] Fix a crash with AlignArrayOfStructures option (#86420) · f1491c74
      Owen Pan authored
      Fixes #86109.
      
      (cherry picked from commit cceedc93)
      f1491c74
    • Younan Zhang's avatar
      [Clang][Sema] Revise the transformation of CTAD parameters of nested class templates (#91628) · 8d65f14c
      Younan Zhang authored
      This fixes a regression introduced by bee78b88.
      
      When we form a deduction guide for a constructor, basically, we do the
      following work:
      - Collect template parameters from the constructor's surrounding class
      template, if present.
      - Collect template parameters from the constructor.
      - Splice these template parameters together into a new template
      parameter list.
      - Turn all the references (e.g. the function parameter list) to the
      invented parameter list by applying a `TreeTransform` to the function
      type.
      
      In the previous fix, we handled cases of nested class templates by
      substituting the "outer" template parameters (i.e. those not declared at
      the surrounding class template or the constructor) with the
      instantiating template arguments. The approach per se makes sense, but
      there was a flaw in the following case:
      
      ```cpp
      template <typename U, typename... Us> struct X {
        template <typename V> struct Y {
          template <typename T> Y(T) {}
        };
      
        template <typename T> Y(T) -> Y<T>;
      };
      
      X<int>::Y y(42);
      ```
      
      While we're transforming the parameters for `Y(T)`, we first attempt to
      transform all references to `V` and `T`; then, we handle the references
      to outer parameters `U` and `Us` using the template arguments from
      `X<int>` by transforming the same `ParamDecl`. However, the first step
      results in the reference `T` being `<template-param-0-1>` because the
      invented `T` is the last of the parameter list of the deduction guide,
      and what we're substituting with is a corresponding parameter pack
      (which is `Us`, though empty). Hence we're messing up the substitution.
      
      I think we can resolve it by reversing the substitution order, which
      means handling outer template parameters first and then the inner
      parameters.
      
      There's no release note because this is a regression in 18, and I hope
      we can catch up with the last release.
      
      Fixes https://github.com/llvm/llvm-project/issues/88142
      
      (cherry picked from commit 8c852ab5)
      8d65f14c
    • Reid Kleckner's avatar
      [lld][WebAssembly] Fix test on Windows, use llvm-ar instead of ar · be6c8175
      Reid Kleckner authored
      (cherry picked from commit 4b4763ff)
      be6c8175
    • Vassil Vassilev's avatar
      Reland "[clang-repl] Keep the first llvm::Module empty to avoid invalid memory access. (#89031)" · c5b3fa49
      Vassil Vassilev authored
      Original commit message: "
      
      Clang's CodeGen is designed to work with a single llvm::Module. In many cases
      for convenience various CodeGen parts have a reference to the llvm::Module
      (TheModule or Module) which does not change when a new module is pushed.
      However, the execution engine wants to take ownership of the module which does
      not map well to CodeGen's design. To work this around we clone the module and
      pass it down.
      
      With some effort it is possible to teach CodeGen to ask the CodeGenModule for
      its current module and that would have an overall positive impact on CodeGen
      improving the encapsulation of various parts but that's not resilient to future
      regression.
      
      This patch takes a more conservative approach and keeps the first llvm::Module
      empty intentionally and does not pass it to the Jit. That's also not bullet
      proof because we have to guarantee that CodeGen does not write on the
      blueprint. However, we have inserted some assertions to catch accidental
      additions to that canary module.
      
      This change will fixes a long-standing invalid memory access reported by
      valgrind when we enable the TBAA optimization passes. It also unblock progress
      on https://github.com/llvm/llvm-project/pull/84758.
      "
      
      This patch reverts adc4f623 and removes
      the check of `named_metadata_empty` of the first llvm::Module because on darwin
      clang inserts some harmless metadata which we can ignore.
      
      (cherry picked from commit a3f07d36)
      c5b3fa49
    • Tom Stellard's avatar
      [workflows] Add a job for requesting a release note on release branch PRs (#91826) · a82ddb9d
      Tom Stellard authored
      We have been collecting release notes from the PRs for most of the
      18.1.x releases and this just helps automate the process.
      
      (cherry picked from commit c99d1156)
      a82ddb9d
  9. May 11, 2024
    • Jonathan Peyton's avatar
      [OpenMP] Fix child processes to use affinity_none (#91391) · 09615ce8
      Jonathan Peyton authored
      When a child process is forked with OpenMP already initialized, the
      child process resets its affinity mask and sets proc-bind-var to false
      so that the entire original affinity mask is used. This patch corrects
      an issue with the affinity initialization code setting affinity to
      compact instead of none for this special case of forked children.
      
      The test trying to catch this only testing explicit setting of
      KMP_AFFINITY=none. Add test run for no KMP_AFFINITY setting.
      
      Fixes: #91098
      (cherry picked from commit 73bb8d9d)
      09615ce8
    • Paul Kirth's avatar
      [llvm][lld] Pre-commit tests for RISCV TLSDESC symbols · 5c77c1d3
      Paul Kirth authored
      Currently, we mistakenly mark the local labels used in RISC-V TLSDESC as
      TLS symbols, when they should not be. This patch adds tests with the
      current incorrect behavior, and subsequent patches will address the
      issue.
      
      Reviewers: MaskRay, topperc
      
      Reviewed By: MaskRay
      
      Pull Request: https://github.com/llvm/llvm-project/pull/85816
      
      (cherry picked from commit f6f474c4)
      5c77c1d3
    • Amara Emerson's avatar
      [AArc64][GlobalISel] Fix legalizer assert for G_INSERT_VECTOR_ELT · 7dbd266e
      Amara Emerson authored
      We should moreElements <3 x s1> to <4 x s1> before we try to widen the element,
      otherwise we end up with a <3 x s21> nonsense type.
      
      (cherry picked from commit a01e9ce8)
      
      Test has been changed from original commit due to a fallback in a G_BITCAST.
      Added abort=2 so we can see partial legalization and check no crash.
      7dbd266e
  10. May 10, 2024
  11. May 09, 2024