[all-commits] [llvm/llvm-project] 50b937: [mlir] Add missing libm member operations to MathT...

Fangrui Song via All-commits all-commits at lists.llvm.org
Mon Apr 8 17:03:14 PDT 2024


  Branch: refs/heads/users/MaskRay/spr/dwarf-refactor-finddebugnamesoffsets
  Home:   https://github.com/llvm/llvm-project
  Commit: 50b937331ff44ac4b4ee70c3bfc0c4da51a02855
      https://github.com/llvm/llvm-project/commit/50b937331ff44ac4b4ee70c3bfc0c4da51a02855
  Author: Corentin Ferry <corentin.ferry at amd.com>
  Date:   2024-04-09 (Tue, 09 Apr 2024)

  Changed paths:
    M mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    M mlir/test/Conversion/MathToLibm/convert-to-libm.mlir

  Log Message:
  -----------
  [mlir] Add missing libm member operations to MathToLibm (#87981)

This PR adds support for lowering the following Math operations to
`libm` calls:
* `math.absf` -> `fabsf, fabs`
* `math.exp` -> `expf, exp`
* `math.exp2` -> `exp2f, exp2`
* `math.fma` -> `fmaf, fma`
* `math.log` -> `logf, log`
* `math.log2` -> `log2f, log2`
* `math.log10` -> `log10f, log10`
* `math.powf` -> `powf, pow`
* `math.sqrt` -> `sqrtf, sqrt`

These operations are direct members of `libm`, and do not seem to
require any special manipulations on their operands.


  Commit: 89ebb56152192e8ad535ddd11ae0f60334fd748a
      https://github.com/llvm/llvm-project/commit/89ebb56152192e8ad535ddd11ae0f60334fd748a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwsll.ll

  Log Message:
  -----------
  [RISCV] Resolve CHECK prefix conflict in fixed-vectors-vwsll.ll. NFC

riscv32 and riscv64 generate different code for one test case so we need
RV32 and RV64 CHECK lines.


  Commit: 279c758b5d681eb7b24d5e3a1da64a7571e61903
      https://github.com/llvm/llvm-project/commit/279c758b5d681eb7b24d5e3a1da64a7571e61903
  Author: Zander Dumont-Strom <zdumonts at ucsc.edu>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    A libc/docs/ctype.rst
    M libc/docs/index.rst
    M libc/utils/docgen/ctype.json

  Log Message:
  -----------
  [libc][docs] generate docs for ctype.h (#87946)


Fixes #87833


  Commit: e127997155a1cd1c5692c42aad074064c8dad099
      https://github.com/llvm/llvm-project/commit/e127997155a1cd1c5692c42aad074064c8dad099
  Author: Nick Desaulniers <ndesaulniers at google.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M libc/docs/ctype.rst

  Log Message:
  -----------
  [libc][docs] fix missing include

Fixes #87946


  Commit: 922700df44b7fd93dfaf642567283b2b7482e5df
      https://github.com/llvm/llvm-project/commit/922700df44b7fd93dfaf642567283b2b7482e5df
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/test/CodeGen/X86/code-model-elf-text-sections.ll

  Log Message:
  -----------
  Revert "[X86] Change how we treat functions with explicit sections as small/large (#87838)"

This reverts commit e27c3736f975ca463476223c465e4777186f603f.

Breaks ExecutionEngine/MCJIT/test-global-ctors.ll on windows, e.g. https://lab.llvm.org/buildbot/#/builders/117/builds/18749.


  Commit: afc7cc7b123666a8917b26c7e483d78cbb79ff8d
      https://github.com/llvm/llvm-project/commit/afc7cc7b123666a8917b26c7e483d78cbb79ff8d
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-lrint-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-lrint.ll
    M llvm/test/CodeGen/RISCV/rvv/lrint-sdnode.ll
    M llvm/test/CodeGen/RISCV/rvv/lrint-vp.ll

  Log Message:
  -----------
  [RISCV] Fix missing CHECK prefixes in vector lrint test files. NFC

All of these test cases had iXLen in their name which got replaced
by sed. This prevented FileCheck from finding the function. The other
test cases in these files do not have that issue.


  Commit: 472ea6e0159342107ca240018b0c5ad868bf16fe
      https://github.com/llvm/llvm-project/commit/472ea6e0159342107ca240018b0c5ad868bf16fe
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vitofp-constrained-sdnode.ll

  Log Message:
  -----------
  [RISCV] Resolve CHECK prefix conflict in fixed-vectors-vitofp-constrained-sdnode.ll. NFC


  Commit: 4e98adf677fe6eb9aea5606c44ccc97f02d2f48a
      https://github.com/llvm/llvm-project/commit/4e98adf677fe6eb9aea5606c44ccc97f02d2f48a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/test/CodeGen/RISCV/interrupt-attr.ll

  Log Message:
  -----------
  [RISCV] Add tests for F/D with non-FP ABI to interrupt-attr.ll. NFC

Without a floating point aware ABI for callees, an interrupt handler
needs to save all floating point registers even normally callee saved.

We are currently unnecessarily saving callee saved FP registers when
a floating point ABI is used by the callee. This is different than gcc
as noted in this discourse
post https://discourse.llvm.org/t/has-bugs-when-optimizing-save-restore-csrs-by-changing-csr-xlen-f32-interrupt/78200/1


  Commit: 79343fa8c3575be12ec4d543f4aebebd1ba4f47f
      https://github.com/llvm/llvm-project/commit/79343fa8c3575be12ec4d543f4aebebd1ba4f47f
  Author: Evgenii Stepanov <eugenis at google.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    A llvm/test/Instrumentation/MemorySanitizer/overflow.ll
    A llvm/test/Instrumentation/MemorySanitizer/saturating.ll

  Log Message:
  -----------
  [msan] Precommit tests.

Precommit tests for overflowing and saturating arithmetic intrinsics.


  Commit: 22b1f1bc695b8fd3263b709ce9761bf3bb2f8ee9
      https://github.com/llvm/llvm-project/commit/22b1f1bc695b8fd3263b709ce9761bf3bb2f8ee9
  Author: lntue <35648136+lntue at users.noreply.github.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M libc/include/llvm-libc-macros/math-macros.h

  Log Message:
  -----------
  [libc] Remove `#ifdef __cplusplus` part from `include/llvm-libc-macros/math-macros.h`. (#87864)

Now with the proxy header `hdr/math_macros.h`, the header
`include/llvm-libc-macros/math-macros.h` will not be included in overlay
mode, and the extra definitions for `__cplusplus` mode is not needed any
more.


  Commit: 118a5d8236d8a483dd401fa35c8b1fcd058eacc1
      https://github.com/llvm/llvm-project/commit/118a5d8236d8a483dd401fa35c8b1fcd058eacc1
  Author: Evgenii Stepanov <eugeni.stepanov at gmail.com>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/Instrumentation/MemorySanitizer/overflow.ll
    M llvm/test/Instrumentation/MemorySanitizer/saturating.ll

  Log Message:
  -----------
  Overflow and saturating intrinsics (#88068)


  Commit: f28c8339c12917b11c99432de6609e7d46e17e2b
      https://github.com/llvm/llvm-project/commit/f28c8339c12917b11c99432de6609e7d46e17e2b
  Author: Chris Apple <cja-private at pm.me>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M compiler-rt/cmake/config-ix.cmake

  Log Message:
  -----------
  Fix issue where MACOSX_VERSION_MIN_FLAG was not set on subsequent runs of CMake in compiler-rt (#87580)

As discussed here:

https://github.com/llvm/llvm-project/pull/74394#issuecomment-2035264683

An unintentional change of behavior was introduced in #74394 

This code introduced in #74394 :

The first time through
* SANITIZER_MIN_OSX_VERSION is not set
* parse -mmacosx-version-min and set MACOSX_VERSION_MIN_FLAG
* Set and cache SANITIZER_MIN_OSX_VERSION

Subsequent times through:
* SANITIZER_MIN_OSX_VERSION is cached 
* (BUG!!) you don't parse -mmacosx-version-min, and don't set
MACOSX_VERSION_MIN_FLAG


MACOSX_VERSION_MIN_FLAG is used later in the file on this line:

https://github.com/llvm/llvm-project/blob/63c925ca808f216f805b76873743450456e350f2/compiler-rt/cmake/config-ix.cmake#L517


Hoisting this assignment outside the if block returns us to the previous
behavior before this commit, while maintaining the flexibility
introduced with the cache variable


  Commit: ccdebbae4d77d3efc236af92c22941de5d437e01
      https://github.com/llvm/llvm-project/commit/ccdebbae4d77d3efc236af92c22941de5d437e01
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M clang/lib/Driver/ToolChain.cpp
    M clang/test/Driver/arm-compiler-rt.c
    M clang/test/Driver/cl-link.c
    M clang/test/Driver/compiler-rt-unwind.c
    M clang/test/Driver/coverage-ld.c
    M clang/test/Driver/instrprof-ld.c
    M clang/test/Driver/linux-ld.c
    M clang/test/Driver/mingw-sanitizers.c
    M clang/test/Driver/msp430-toolchain.c
    M clang/test/Driver/print-libgcc-file-name-clangrt.c
    M clang/test/Driver/print-runtime-dir.c
    M clang/test/Driver/riscv32-toolchain-extra.c
    M clang/test/Driver/riscv32-toolchain.c
    M clang/test/Driver/riscv64-toolchain-extra.c
    M clang/test/Driver/riscv64-toolchain.c
    M clang/test/Driver/sanitizer-ld.c
    M clang/test/Driver/wasm-toolchain.c
    M clang/test/Driver/wasm-toolchain.cpp
    M clang/test/Driver/windows-cross.c
    M clang/test/Driver/zos-ld.c
    M flang/test/Driver/msvc-dependent-lib-flags.f90

  Log Message:
  -----------
  [Driver] Ensure ToolChain::LibraryPaths is not empty for non-Darwin

Follow-up to #81037.

ToolChain::LibraryPaths holds the new compiler-rt library directory
(e.g. `/tmp/Debug/lib/clang/19/lib/x86_64-unknown-linux-gnu`). However,
it might be empty when the directory does not exist (due to the `if
(getVFS().exists(P))` change in https://reviews.llvm.org/D158475).

If neither the old/new compiler-rt library directories exists, we would
suggest the undesired old compiler-rt file name:

```
% /tmp/Debug/bin/clang++ a.cc -fsanitize=memory -o a
ld.lld: error: cannot open /tmp/Debug/lib/clang/19/lib/linux/libclang_rt.msan-x86_64.a: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```

With this change, we will correctly suggest the new compiler-rt file name.

Fix #87150

Pull Request: https://github.com/llvm/llvm-project/pull/87866


  Commit: 389bae77dd0fc0845e8206d7b01e280e45341a4d
      https://github.com/llvm/llvm-project/commit/389bae77dd0fc0845e8206d7b01e280e45341a4d
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-04-08 (Mon, 08 Apr 2024)

  Changed paths:
    M clang/lib/Driver/ToolChain.cpp
    M clang/test/Driver/arm-compiler-rt.c
    M clang/test/Driver/cl-link.c
    M clang/test/Driver/compiler-rt-unwind.c
    M clang/test/Driver/coverage-ld.c
    M clang/test/Driver/instrprof-ld.c
    M clang/test/Driver/linux-ld.c
    M clang/test/Driver/mingw-sanitizers.c
    M clang/test/Driver/msp430-toolchain.c
    M clang/test/Driver/print-libgcc-file-name-clangrt.c
    M clang/test/Driver/print-runtime-dir.c
    M clang/test/Driver/riscv32-toolchain-extra.c
    M clang/test/Driver/riscv32-toolchain.c
    M clang/test/Driver/riscv64-toolchain-extra.c
    M clang/test/Driver/riscv64-toolchain.c
    M clang/test/Driver/sanitizer-ld.c
    M clang/test/Driver/wasm-toolchain.c
    M clang/test/Driver/wasm-toolchain.cpp
    M clang/test/Driver/windows-cross.c
    M clang/test/Driver/zos-ld.c
    M compiler-rt/cmake/config-ix.cmake
    M flang/test/Driver/msvc-dependent-lib-flags.f90
    A libc/docs/ctype.rst
    M libc/docs/index.rst
    M libc/include/llvm-libc-macros/math-macros.h
    M libc/utils/docgen/ctype.json
    M llvm/lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp
    M llvm/lib/Target/TargetMachine.cpp
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/CodeGen/RISCV/interrupt-attr.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-lrint-vp.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-lrint.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vitofp-constrained-sdnode.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwsll.ll
    M llvm/test/CodeGen/RISCV/rvv/lrint-sdnode.ll
    M llvm/test/CodeGen/RISCV/rvv/lrint-vp.ll
    M llvm/test/CodeGen/X86/code-model-elf-text-sections.ll
    A llvm/test/Instrumentation/MemorySanitizer/overflow.ll
    A llvm/test/Instrumentation/MemorySanitizer/saturating.ll
    M mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    M mlir/test/Conversion/MathToLibm/convert-to-libm.mlir

  Log Message:
  -----------
  simplify code

Created using spr 1.3.5-bogner


Compare: https://github.com/llvm/llvm-project/compare/f40cc8c50b6e...389bae77dd0f

To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list