1. Sep 10, 2021
    • Krasimir Georgiev's avatar
      [clang-format] handle trailing comments in function definition detection · ffd90ed1
      Krasimir Georgiev authored
      A follow-up to
      https://github.com/llvm/llvm-project/commit/f6bc614546e169bb1b17a29c422ebace038e6c62
      where we handle the case where the semicolon is followed by a trailing
      comment.
      
      Reviewed By: MyDeveloperDay
      
      Differential Revision: https://reviews.llvm.org/D107907
      
      (cherry picked from commit 0fc27ef1)
      ffd90ed1
    • Krasimir Georgiev's avatar
      [clan-format] detect function definitions more conservatively · b685e13d
      Krasimir Georgiev authored
      https://reviews.llvm.org/D105964 updated the detection of function
      definitions. It had the unfortunate effect to start marking object
      definitions with attribute-like macros as function definitions.
      
      This addresses this issue.
      
      Reviewed By: owenpan
      
      Differential Revision: https://reviews.llvm.org/D107269
      
      (cherry picked from commit f6bc6145)
      b685e13d
    • Fraser Cormack's avatar
      [MemCpyOpt] Fix a variety of scalable-type crashes · e3ec9058
      Fraser Cormack authored
      This patch fixes a variety of crashes resulting from the `MemCpyOptPass`
      casting `TypeSize` to a constant integer, whether implicitly or
      explicitly.
      
      Since the `MemsetRanges` requires a constant size to work, all but one
      of the fixes in this patch simply involve skipping the various
      optimizations for scalable types as cleanly as possible.
      
      The optimization of `byval` parameters, however, has been updated to
      work on scalable types in theory. In practice, this optimization is only
      valid when the length of the `memcpy` is known to be larger than the
      scalable type size, which is currently never the case. This could
      perhaps be done in the future using the `vscale_range` attribute.
      
      Some implicit casts have been left as they were, under the knowledge
      they are only called on aggregate types. These should never be
      scalably-sized.
      
      Reviewed By: nikic, tra
      
      Differential Revision: https://reviews.llvm.org/D109329
      
      (cherry-picked from commit 7fb66d40)
      e3ec9058
    • Pushpinder Singh's avatar
      [AMDGPU][OpenMP] Use complex definitions from complex_cmath.h · 718280c8
      Pushpinder Singh authored
      Following nvptx approach, this patch uses complex function
      definitions from complex_cmath.h. With this patch, ovo passes
      23/34 complex mathematical test cases.
      
      Reviewed By: JonChesterfield
      
      Differential Revision: https://reviews.llvm.org/D109344
      
      (cherry picked from commit 12dcbf91)
      718280c8
    • Bradley Smith's avatar
      Workaround incorrect types when lowering fixed length gather/scatter · 0c2f8599
      Bradley Smith authored
      When lowering a fixed length gather/scatter the index type is assumed to
      be the same as the memory type, this is incorrect in cases where the
      extension of the index has been folded into the addressing mode.
      
      For now add a temporary workaround to fix the codegen faults caused by
      this by preventing the removal of this extension. At a later date the
      lowering for SVE gather/scatters will be redesigned to improve the way
      addressing modes are handled.
      
      As a short term side effect of this change, the addressing modes
      generated for fixed length gather/scatters will not be optimal.
      
      Differential Revision: https://reviews.llvm.org/D109145
      
      (cherry picked from commit 14e1a4a6)
      0c2f8599
    • Bjorn Pettersson's avatar
      Inform pass manager when child loops are deleted · f17d60d6
      Bjorn Pettersson authored
      As part of the nontrivial unswitching we could end up removing child
      loops. This patch add a notification to the pass manager when
      that happens (using the markLoopAsDeleted callback).
      
      Without this there could be stale LoopAccessAnalysis results cached
      in the analysis manager. Those analysis results are cached based on
      a Loop* as key. Since the BumpPtrAllocator used to allocate
      Loop objects could be resetted between different runs of for
      example the loop-distribute pass (running on different functions),
      a new Loop object could be created using the same Loop pointer.
      And then when requiring the LoopAccessAnalysis for the loop we
      got the stale (corrupt) result from the destroyed loop.
      
      Reviewed By: aeubanks
      
      Differential Revision: https://reviews.llvm.org/D109257
      
      (fixes PR51754)
      (cherry-picked from commit 0f0344dd)
      f17d60d6
  2. Sep 09, 2021
  3. Sep 08, 2021
  4. Sep 06, 2021
  5. Sep 04, 2021
  6. Sep 03, 2021
    • Stefan Gränitz's avatar
      [Orc] Enable debug object tests only on x86_64 hosts · c8905f1b
      Stefan Gränitz authored
      These tests rely on running IR code with an explicit x86_64 target triple. They won't work on other architectures. (They won't work for 32-bit processes on x86_64 hosts either. We will take care of this later.)
      
      Differential Revision: https://reviews.llvm.org/D107640
      
      (cherry picked from commit c5ab55f5)
      c8905f1b
    • Petr Hosek's avatar
      [Linker] Support weak symbols in nodeduplicate COMDAT group · 7a4a5d41
      Petr Hosek authored
      When a nodeduplicate COMDAT group contains a weak symbol, choose
      a non-weak symbol (or one of the weak ones) rather than reporting
      an error. This should address issue PR51394.
      
      With the current IR representation, a generic comdat nodeduplicate
      semantics is not representable for LTO. In the linker, sections and
      symbols are separate concepts. A dropped weak symbol does not force the
      defining input section to be dropped as well (though it can be collected
      by GC). In the IR, when a weak linkage symbol is dropped, its associate
      section content is dropped as well.
      
      For InstrProfiling, which is where ran into this issue in PR51394, the
      deduplication semantic is a sufficient workaround.
      
      Differential Revision: https://reviews.llvm.org/D108689
      7a4a5d41
  7. Sep 02, 2021
  8. Sep 01, 2021