1. Feb 07, 2023
  2. Feb 06, 2023
  3. Feb 03, 2023
  4. Feb 02, 2023
  5. Feb 01, 2023
  6. Jan 31, 2023
  7. Jan 28, 2023
    • Tom Stellard's avatar
      Revert "Verifier: Disallow uses of intrinsic global variables" · 124f90bd
      Tom Stellard authored
      This reverts commit b67c16ff.
      124f90bd
    • Joseph Huber's avatar
      [OpenMP] Make OpenMPOpt aware of the OpenMP runtime's status · c0e53ac3
      Joseph Huber authored
      The `OpenMPOpt` pass contains optimizations that generate new calls into
      the OpenMP runtime. This causes problems if we are in a state where the
      runtime has already been linked statically. Generating these new calls
      will result in them never being resolved. We should indicate if we are
      in a "post-link" LTO phase and prevent OpenMPOpt from generating new
      runtime calls.
      
      Generally, it's not desireable for passes to maintain state about the
      context in which they're called. But this is the only reasonable
      solution to static linking when we have a pass that generates new
      runtime calls.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D142646
      
      (cherry picked from commit 0bdde9df)
      c0e53ac3
    • Joseph Huber's avatar
      [OpenMP] Run an extra 'OpenMPOpt' pass in LTO-mode · 9833a552
      Joseph Huber authored
      The `OpenMPOpt` pass is pivotal to the performance of many OpenMP
      offloading programs. When we perform non-LTO builds with OpenMP we used
      to link the OpenMP deviceRTL individually for each TU. This lead to us
      getting an additional attributor run on the combined runtime and user
      code. When we used LTO we lost a run and suffered a large performance
      degradation. This patch simply adds in the extra `OpenMPOpt` pass that
      we miss into the LTO pipeline. This patch fixes the performance
      regression shown in applications that used OpenMP offloading in LTO
      mode.
      
      Previously, this wasn't legal to do as we could emit new runtime calls
      into the module. That was fixed by D142646.
      
      Depends on D142646
      
      Fixes https://github.com/llvm/llvm-project/issues/60300
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D142650
      
      (cherry picked from commit 6185246f)
      9833a552
    • Aaron Ballman's avatar
      Stop diagnosing member and array access in offsetof as an extension · 84f3164c
      Aaron Ballman authored
      This was a mistake from e7300e75
      (https://reviews.llvm.org/D133574) caused by us accidentally tracking
      an older copy of the C DR list for DR496. The text in
      https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm#dr_496 makes
      it clear that subobjects are allowed, which means member and array
      access expressions are allowed.
      
      This backs out the changes from the previous commit that relate to this
      diagnostic.
      
      (cherry picked from commit 63d6b8be)
      84f3164c
    • Alexey Lapshin's avatar
      [Support] Avoid using main thread for llvm::parallelFor(). · 0764636b
      Alexey Lapshin authored
      The llvm::parallelFor() uses threads created by ThreadPoolExecutor as well as main thread.
      The index for the main thread matches with the index for the first thread created by ThreadPoolExecutor.
      It results in that getThreadIndex returns the same value for different threads.
      To avoid thread index clashing - do not use main thread for llvm::parallelFor():
      
      parallel::TaskGroup TG;
      for (; Begin + TaskSize < End; Begin += TaskSize) {
        TG.spawn([=, &Fn] {
          for (size_t I = Begin, E = Begin + TaskSize; I != E; ++I)
            Fn(I);
        });
      }
      for (; Begin != End; ++Begin)    <<<< executed by main thread.
        Fn(Begin);                     <<<<
      return;                          <<<<
      
      Differential Revision: https://reviews.llvm.org/D142317
      
      (cherry picked from commit 10a796a0)
      0764636b
    • Erich Keane's avatar
      Fix recursive error for constraints depending on itself incorrectly · 5cc5d71a
      Erich Keane authored
      Fixes: #60323
      
      https://github.com/llvm/llvm-project/issues/60323
      
      The problem is that we are profiling the 'Expr' components directly,
      however when they contain an unresolved lookup, those canonicalize
      identically.  The result was the two versions of calls to 'go' were
      canonicalized identically.
      
      This patch fixes this by ensuring we consider the declaration the
      constraint is attached to, when possible.  When not, we skip the
      diagnostic.
      
      The result is that we are relaxing our diagnostic in some cases (Of
      which I couldn't come up with a reproducer), such that we might see
      overflows when evaluating constraints that depend on themselves in a way
      that they are not attached to a declaration directly, such as if
      they are nested requirements, though the hope is this won't be a
      problem, since the 'parent' named constraint would catch this.  I'm
      hopeful that the 'worst case' is that we catch recursion 'later' in the
      process, instead of immediately.
      
      (cherry picked from commit 42667563)
      5cc5d71a