1. Apr 16, 2024
    • Daniel Paoliello's avatar
      Prepend all library intrinsics with `#` when building for Arm64EC (#87542) · 4056cc29
      Daniel Paoliello authored
      While attempting to build some Rust code, I was getting linker errors
      due to missing functions that are implemented in `compiler-rt`. Turns
      out that when `compiler-rt` is built for Arm64EC, all its function names
      are mangled with the leading `#`.
      
      This change removes the hard-coded list of library-implemented
      intrinsics to mangle for Arm64EC, and instead assumes that they all must
      be mangled.
      4056cc29
    • Alexey Bataev's avatar
      [SLP]Fix a crash if the argument of call was affected by minbitwidth analysis. · 6e071cf3
      Alexey Bataev authored
      Need to support proper type conversion for function arguments to avoid
      compiler crash.
      6e071cf3
    • Brian Cain's avatar
      [libcxx] coerce formatter precision to int (#87738) · d89da2ac
      Brian Cain authored
      __precision_ is declared as an int32_t which on some hexagon platforms
      is defined as a long.
      
      This change fixes errors like the ones below:
      
      In file included from
      /local/mnt/workspace/hex/llvm-project/libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp:19:
      In file included from
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/format:202:
      In file included from
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__format/format_functions.h:29:
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__format/formatter_floating_point.h:700:17:
      error: no matching function for call to 'max'
      700 | int __p = std::max(1, (__specs.__has_precision() ?
      __specs.__precision_ : 6));
                |                 ^~~~~~~~
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__format/formatter_floating_point.h:771:25:
      note: in instantiation of function template specialization
      'std::__formatter::__format_floating_point<float, char,
      std::format_context>' requested here
      771 | return __formatter::__format_floating_point(__value, __ctx,
      __parser_.__get_parsed_std_specifications(__ctx));
                |                         ^
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__format/format_functions.h:284:42:
      note: in instantiation of function template specialization
      'std::__formatter_floating_point<char>::format<float,
      std::format_context>' requested here
      284 | __ctx.advance_to(__formatter.format(__arg, __ctx));
                |                                          ^
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__format/format_functions.h:429:15:
      note: in instantiation of function template specialization
      'std::__vformat_to<std::back_insert_iterator<std::string>, char,
      std::back_insert_iterator<std::__format::__output_buffer<char>>>'
      requested here
      429 | return std::__vformat_to(std::move(__out_it), __fmt, __args);
                |               ^
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__format/format_functions.h:462:8:
      note: in instantiation of function template specialization
      'std::vformat_to<std::back_insert_iterator<std::string>>' requested here
            462 |   std::vformat_to(std::back_inserter(__res), __fmt, __args);
                |        ^
      
      /local/mnt/workspace/hex/llvm-project/libcxx/test/libcxx/diagnostics/format.nodiscard_extensions.compile.pass.cpp:29:8:
      note: in instantiation of function template specialization
      'std::vformat<void>' requested here
             29 |   std::vformat("", std::make_format_args());
                |        ^
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__algorithm/max.h:35:1:
      note: candidate template ignored: deduced conflicting types for
      parameter '_Tp' ('int' vs. 'int32_t' (aka 'long'))
      35 | max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND
      const _Tp& __b) {
                | ^
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__algorithm/max.h:43:1:
      note: candidate template ignored: could not match
      'initializer_list<_Tp>' against 'int'
             43 | max(initializer_list<_Tp> __t, _Compare __comp) {
                | ^
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__algorithm/max.h:48:86:
      note: candidate function template not viable: requires single argument
      '__t', but 2 arguments were provided
      48 | _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI
      _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp max(initializer_list<_Tp> __t) {
      | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
      
      /local/mnt/workspace/hex/obj_runtimes_hex88_qurt_v75_ON_ON_shared/include/c++/v1/__algorithm/max.h:29:1:
      note: candidate function template not viable: requires 3 arguments, but
      2 were provided
      29 | max(_LIBCPP_LIFETIMEBOUND const _Tp& __a, _LIBCPP_LIFETIMEBOUND
      const _Tp& __b, _Compare __comp) {
      | ^
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      
      (cherry picked from commit e1830f58)
      d89da2ac
  2. Apr 11, 2024
  3. Apr 03, 2024
  4. Apr 02, 2024
  5. Mar 30, 2024
    • Xing Xue's avatar
      [OpenMP][AIX] Affinity implementation for AIX (#84984) · 47aac495
      Xing Xue authored
      This patch implements `affinity` for AIX, which is quite different from
      platforms such as Linux.
      - Setting CPU affinity through masks and related functions are not
      supported. System call `bindprocessor()` is used to bind a thread to one
      CPU per call.
      - There are no system routines to get the affinity info of a thread. The
      implementation of `get_system_affinity()` for AIX gets the mask of all
      available CPUs, to be used as the full mask only.
      - Topology is not available from the file system. It is obtained through
      system SRAD (Scheduler Resource Allocation Domain).
      
      This patch has run through the libomp LIT tests successfully with
      `affinity` enabled.
      
      (cherry picked from commit d394f3a1)
      47aac495
  6. Mar 29, 2024
    • Andrew Ng's avatar
      [Support] Fix color handling in formatted_raw_ostream (#86700) · a385a917
      Andrew Ng authored
      The color methods in formatted_raw_ostream were forwarding directly to
      the underlying stream without considering existing buffered output. This
      would cause incorrect colored output for buffered uses of
      formatted_raw_ostream.
      
      Fix this issue by applying the color to the formatted_raw_ostream itself
      and temporarily disabling scanning of any color related output so as not
      to affect the position tracking.
      
      This fix means that workarounds that forced formatted_raw_ostream
      buffering to be disabled can be removed. In the case of llvm-objdump,
      this can improve disassembly performance when redirecting to a file by
      more than an order of magnitude on both Windows and Linux. This
      improvement restores the disassembly performance when redirecting to a
      file to a level similar to before color support was added.
      
      (cherry picked from commit c9db031c)
      a385a917
    • Martin Storsjö's avatar
      Reapply [libcxx] [modules] Fix relative paths with absolute LIBCXX_INSTALL_MODULES_DIR (#86020) · 0cd4babe
      Martin Storsjö authored
      This reapplies 272d1b44 (from #85756),
      which was reverted in
      40793703.
      
      In the previous attempt, empty CMAKE_INSTALL_PREFIX was handled by
      quoting them, in d209d134. That made the
      calls to cmake_path(ABSOLUTE_PATH) succeed, but the output paths of that
      weren't actually absolute, which was required by file(RELATIVE_PATH).
      
      Avoid this issue by constructing a non-empty base directory variable
      to use for calculating the relative path.
      
      (cherry picked from commit 50801f10)
      0cd4babe
  7. Mar 28, 2024
  8. Mar 24, 2024
  9. Mar 23, 2024
  10. Mar 20, 2024