1. Apr 14, 2022
  2. Apr 13, 2022
    • Nathan Sidwell's avatar
      [demangler] Rust demangler buffer return · 201c4b9c
      Nathan Sidwell authored
      The rust demangler has some odd buffer handling code, which will copy
      the demangled string into the provided buffer, if it will fit.
      Otherwise it uses the allocated buffer it made.  But the length of the
      incoming buffer will have come from a previous call, which was the
      length of the demangled string -- not the buffer size.  And of course,
      we're unconditionally allocating a temporary buffer in the first
      place.  So we don't actually get buffer reuse, and we get a memcpy in
      somecases.
      
      However, nothing in LLVM ever passes in a non-null pointer.  Neither
      does anything pass in a status pointer that is then made use of.  The
      only exercise these have is in the test suite.
      
      So let's just make the rust demangler have the same API as the dlang
      demangler.
      
      Reviewed By: tmiasko
      
      Differential Revision: https://reviews.llvm.org/D123420
      201c4b9c
    • Jay Foad's avatar
      [AMDGPU] Initialize a couple more Subtarget fields · ccaf6dab
      Jay Foad authored
      This is just for consistency. The fields are never actually used
      so it is NFC.
      ccaf6dab
    • Xing Xue's avatar
      [libunwind][AIX] implementation of the unwinder for AIX · 9c0152cd
      Xing Xue authored
      Summary:
      This is an add-on patch to address comments.
      - Replace #elif in file <assembly.h> with #else as suggested;
      - Reversed the indentation changes in the main patch.
      
      Differential Revision: https://reviews.llvm.org/D100132
      9c0152cd
    • Florian Hahn's avatar
      Recommit "[LICM] Only create load in pre-header when promoting load." · 4bf3b7dc
      Florian Hahn authored
      This reverts the revert commit 1ddc7196.
      
      This version of the patch sets the initial available value to poison,
      which resolves an issue with the SSAUpdater breaking LCSSA form.
      4bf3b7dc
    • LLVM GN Syncbot's avatar
      [gn build] Port a85da649 · 1203a247
      LLVM GN Syncbot authored
      1203a247
    • Xing Xue's avatar
      [libunwind][AIX] implementation of the unwinder for AIX · a85da649
      Xing Xue authored
      Summary:
      This patch contains the implementation of the unwinder for IBM AIX.
      
      AIX does not support the eh_frame section. Instead, the traceback table located at the end of each function provides the information for stack unwinding and EH. In this patch macro _LIBUNWIND_SUPPORT_TBTAB_UNWIND is used to guard code for AIX traceback table based unwinding. Function getInfoFromTBTable() and stepWithTBTable() are added to get the EH information from the traceback table and to step up the stack respectively.
      
      There are two kinds of LSDA information for EH on AIX, the state table and the range table. The state table is used by the previous version of the IBM XL compiler, i.e., xlC and xlclang++. The DWARF based range table is used by AIX clang++. The traceback table has flags to differentiate these cases. For the range table, relative addresses are calculated using a base of DW_EH_PE_datarel, which is the TOC base of the module where the function of the current frame belongs.
      
      Two personality routines are employed to handle these two different LSDAs, __xlcxx_personality_v0() for the state table and __xlcxx_personality_v1() for the range table. Since the traceback table does not have the information of the personality for the state table approach, its personality __xlcxx_personality_v0() is dynamically resolved as the handler for the state table. For the range table, the locations of the LSDA and its associated personality routine are found in the traceback table.
      
      Assembly code for 32- and 64-bit PowerPC in UnwindRegistersRestore.S and UnwindRegistersSave.S are modified so that it can be consumed by the GNU flavor assembler and the AIX assembler. The restoration of vector registers does not check VRSAVE on AIX because VRSAVE is not used in the AIX ABI.
      
      Reviewed by: MaskRay, compnerd, cebowleratibm, sfertile, libunwind
      
      Differential Revision: https://reviews.llvm.org/D100132
      a85da649
    • Yaxun (Sam) Liu's avatar
      [CUDA][HIP] Fix host used external kernel in archive · 0424b511
      Yaxun (Sam) Liu authored
      For -fgpu-rdc, a host function may call an external kernel
      which is defined in an archive of bitcode. Since this external
      kernel is only referenced in host function, the device
      bitcode does not contain reference to this external
      kernel, then the linker will not try to resolve this external
      kernel in the archive.
      
      To fix this issue, host-used external kernels and device
      variables are tracked. A global array containing pointers
      to these external kernels and variables is emitted which
      serves as an artificial references to the external kernels
      and variables used by host.
      
      Reviewed by: Artem Belevich
      
      Differential Revision: https://reviews.llvm.org/D123441
      0424b511
    • Nikita Popov's avatar
      [SimplifyLibCalls] Don't mark memchr() memory as fully dereferenceable · 8c741699
      Nikita Popov authored
      C11 specifies memchr() as follows:
      
      > The memchr function locates the first occurrence of c (converted
      > to an unsigned char) in the initial n characters (each interpreted
      > as unsigned char) of the object pointed to by s. The implementation
      > shall behave as if it reads the characters sequentially and stops
      > as soon as a matching character is found.
      
      In particular, it is well-defined to specify a memchr size larger
      than the underlying object, as long as the character is found before
      the end of the object.
      
      Differential Revision: https://reviews.llvm.org/D123665
      8c741699
    • Marek Kurdej's avatar
      b58616c2
    • Tobias Hieta's avatar
      [NFC] Simplify /noimplib argument logic · 837d16fb
      Tobias Hieta authored
      837d16fb
    • Tobias Hieta's avatar
      [LLD][COFF] Add support for /noimplib · 2af43854
      Tobias Hieta authored
      Mostly for compatibility reasons with link.exe this flag
      makes sure we don't write a implib - not even when /implib
      is also passed, that's how link.exe works.
      
      Differential Revision: https://reviews.llvm.org/D123591
      2af43854
    • chenglin.bi's avatar
      [SimplifyCFG] add tests for switch to select; NFC · fd0641b5
      chenglin.bi authored
      Baseline tests for D122485 (issue #39957)
      fd0641b5
    • chenglin.bi's avatar
      Revert "[SimplifyCFG] add tests for switch to select; NFC" · dfc98d0c
      chenglin.bi authored
      This reverts commit e2d77a16.
      dfc98d0c
    • PeixinQiao's avatar
      [OpenMP] Lowering to MLIR of ordered threads directive · 8964a17d
      PeixinQiao authored
      This patch supports lowering parse-tree to MLIR of ordered threads
      directive following Section 2.19.9 of the OpenMP 5.1 standard.
      
      This is part of the upstreaming effort from the fir-dev branch in [1].
      [1] https://github.com/flang-compiler/f18-llvm-project
      
      Reviewed By: shraiysh
      
      Differential Revision: https://reviews.llvm.org/D123590
      8964a17d
    • PeixinQiao's avatar
      [flang][OpenMP] Add semantic checks of nesting of region about ordered construct · 154135c1
      PeixinQiao authored
      This patch supports the following checks for ORDERED construct:
      
      ```
      [5.1] 2.19.9 ORDERED Construct
      The worksharing-loop or worksharing-loop SIMD region to which an ordered
      region corresponding to an ordered construct without a depend clause
      binds must have an ordered clause without the parameter specified on the
      corresponding worksharing-loop or worksharing-loop SIMD directive.
      The worksharing-loop region to which an ordered region that corresponds
      to an ordered construct with any depend clauses binds must have an
      ordered clause with the parameter specified on the corresponding
      worksharing-loop directive.
      An ordered construct with the depend clause specified must be closely
      nested inside a worksharing-loop (or parallel worksharing-loop)
      construct.
      An ordered region that corresponds to an ordered construct with the simd
      clause specified must be closely nested inside a simd or
      worksharing-loop SIMD region.
      ```
      
      Reviewed By: kiranchandramohan, shraiysh, NimishMishra
      
      Differential Revision: https://reviews.llvm.org/D113399
      154135c1
    • Marius Brehler's avatar
      [mlir][docs] Fix broken links · f71f1059
      Marius Brehler authored
      f71f1059
    • Louis Dionne's avatar
      [libc++] Mark completed paper as complete · 1352ea4e
      Louis Dionne authored
      1352ea4e
    • LLVM GN Syncbot's avatar
      [gn build] Port 2fb026ee · d1e58548
      LLVM GN Syncbot authored
      d1e58548
    • Louis Dionne's avatar
      db6421ec