[all-commits] [llvm/llvm-project] a1345e: Revert "[libclang] Always Dup in createRef(StringR...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Thu Feb 13 08:53:08 PST 2025


  Branch: refs/heads/users/alexey-bataev/spr/slprepresent-slp-graph-as-a-tree
  Home:   https://github.com/llvm/llvm-project
  Commit: a1345eb240c9456ce1c339106f066217eb5e6984
      https://github.com/llvm/llvm-project/commit/a1345eb240c9456ce1c339106f066217eb5e6984
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/tools/libclang/CXString.cpp

  Log Message:
  -----------
  Revert "[libclang] Always Dup in createRef(StringRef)" (#127076)

Reverts llvm/llvm-project#125020


https://lab.llvm.org/buildbot/#/builders/24/builds/5252/steps/12/logs/stdio

```
==c-index-test==2512295==ERROR: AddressSanitizer: heap-use-after-free on address 0xe19338c27992 at pc 0xc66be4784830 bp 0xe0e33660df00 sp 0xe0e33660d6e8
READ of size 23 at 0xe19338c27992 thread T1
    #0 0xc66be478482c in printf_common(void*, char const*, std::__va_list) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors_format.inc:563:9
    #1 0xc66be478643c in vprintf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1699:1
    #2 0xc66be478643c in printf /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/../sanitizer_common/sanitizer_common_interceptors.inc:1757:1
    #3 0xc66be4839384 in FilteredPrintingVisitor /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/tools/c-index-test/c-index-test.c:1359:5
    #4 0xe4e3454f12e8 in clang::cxcursor::CursorVisitor::Visit(CXCursor, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/tools/libclang/CIndex.cpp:227:11
    #5 0xe4e3454f48a8 in bool clang::cxcursor::CursorVisitor::visitPreprocessedEntities<clang::PreprocessingRecord::iterator>(clang::PreprocessingRecord::iterator, clang::PreprocessingRecord::iterator, clang::PreprocessingRecord&, clang::FileID) CIndex.cpp
    
0xe19338c27992 is located 82 bytes inside of 105-byte region [0xe19338c27940,0xe19338c279a9)
freed by thread T1 here:
    #0 0xc66be480040c in free /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:51:3
    #1 0xc66be4839728 in GetCursorSource c-index-test.c
    #2 0xc66be4839368 in FilteredPrintingVisitor /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/tools/c-index-test/c-index-test.c:1360:12
    #3 0xe4e3454f12e8 in clang::cxcursor::CursorVisitor::Visit(CXCursor, bool) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/tools/libclang/CIndex.cpp:227:11
    #4 0xe4e3454f48a8 in bool clang::cxcursor::CursorVisitor::visitPreprocessedEntities<clang::PreprocessingRecord::iterator>(clang::PreprocessingRecord::iterator, clang::PreprocessingRecord::iterator, clang::PreprocessingRecord&, clang::FileID) CIndex.cpp


previously allocated by thread T1 here:
    #0 0xc66be4800680 in malloc /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/asan_malloc_linux.cpp:67:3
    #1 0xe4e3456379b0 in safe_malloc /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/Support/MemAlloc.h:26:18
    #2 0xe4e3456379b0 in createDup /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/tools/libclang/CXString.cpp:95:40
    #3 0xe4e3456379b0 in clang::cxstring::createRef(llvm::StringRef) /home/b/sanitizer-aarch64-linux-bootstrap-asan/build/llvm-project/clang/tools/libclang/CXString.cpp:90:10
```


  Commit: de09986596c9bbc89262456dda319715fb49353f
      https://github.com/llvm/llvm-project/commit/de09986596c9bbc89262456dda319715fb49353f
  Author: Hyunsung Lee <ita9naiwa at gmail.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
    M mlir/test/Dialect/Math/expand-math.mlir
    M mlir/test/mlir-runner/test-expand-math-approx.mlir

  Log Message:
  -----------
  [mlir][math] `powf(a, b)` drop support when a < 0  (#126338)

Related: #124402

- change inefficient implementation of `powf(a, b)` to handle `a < 0`
case
  - thus drop `a < 0` case support

However, some special cases are being used such as:
  - `a < 0` and `b = 0, b = 0.5, b = 1 or b = 2`
  - convert those special cases into simpler ops.


  Commit: b2165f214efab833a4b1a9e8268b1030fc5ebaeb
      https://github.com/llvm/llvm-project/commit/b2165f214efab833a4b1a9e8268b1030fc5ebaeb
  Author: David Green <david.green at arm.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/test/Analysis/CostModel/AArch64/fshl.ll
    M llvm/test/Analysis/CostModel/AArch64/fshr.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
    M llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll

  Log Message:
  -----------
  [CostModel] Account for power-2 urem in funnel shift costs (#127037)

As can be seen in https://godbolt.org/z/qvMqY79cK, a urem by a power-2
constant will be code-generated as an And of a mask. The cost model for
funnel shifts tries to account for that by passing OP_PowerOf2 as the
operand info for the second operand. As far as I can tell returning a
lower cost for urem with a OP_PowerOf2 is only implemented on X86
though.

This patch short-cuts that by calling getArithmeticInstrCost(And, ..)
directly when we know the typesize will be a power-of-2. This is an
alternative to the patch in #126912 which is a more general solution for
power-2 udiv/urem costs, this more narrowly just fixes funnel shifts.


  Commit: 21811818d6c1a50051032fdb2d350ffe89e1421a
      https://github.com/llvm/llvm-project/commit/21811818d6c1a50051032fdb2d350ffe89e1421a
  Author: Mikhail Goncharov <goncharov.mikhail at gmail.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [bazel] port aecb764cc2e026ecb5c418dd56f2722c6f263e8b


  Commit: 8da8ff8768bc0115f21d7d8fe8d47872190f8de1
      https://github.com/llvm/llvm-project/commit/8da8ff8768bc0115f21d7d8fe8d47872190f8de1
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/include/flang/Frontend/TargetOptions.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    A flang/test/Driver/mabi-riscv.f90
    A flang/test/Lower/RISCV/riscv-target-abi.f90

  Log Message:
  -----------
  [flang][RISCV] Add target-abi ModuleFlag. (#126188)

This is needed to generate proper ABI flags in the ELF header for LTO
builds. If these flags aren't set correctly, we can't link with objects
that were built with the correct flags.

For non-LTO builds the mcpu/mattr in the TargetMachine will cause the
backend to infer an ABI. For LTO builds the mcpu/mattr aren't set.

I've only added lp64, lp64f, and lp64d ABIs. ilp32* requires riscv32
which is not yet supported in flang. lp64e requires a different
DataLayout string and would need additional plumbing.

Fixes #115679


  Commit: 88015d12ca600cf2a74ba3641f319c7ba056223b
      https://github.com/llvm/llvm-project/commit/88015d12ca600cf2a74ba3641f319c7ba056223b
  Author: Kazu Hirata <kazu at google.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M mlir/lib/Conversion/ComplexCommon/DivisionConverter.cpp

  Log Message:
  -----------
  [mlir] Fix a warning

This patch fixes:

  mlir/lib/Conversion/ComplexCommon/DivisionConverter.cpp:61:2: error:
  extra ';' outside of a function is incompatible with C++98
  [-Werror,-Wc++98-compat-extra-semi]


  Commit: 501ce30a2793051fd78992cb4b2ff0e40dc7307c
      https://github.com/llvm/llvm-project/commit/501ce30a2793051fd78992cb4b2ff0e40dc7307c
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2025-02-13 (Thu, 13 Feb 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Driver/ToolChains/Flang.cpp
    M clang/tools/libclang/CXString.cpp
    M flang/include/flang/Frontend/TargetOptions.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    M flang/lib/Frontend/FrontendActions.cpp
    A flang/test/Driver/mabi-riscv.f90
    A flang/test/Lower/RISCV/riscv-target-abi.f90
    M llvm/include/llvm/CodeGen/BasicTTIImpl.h
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Analysis/CostModel/AArch64/fshl.ll
    M llvm/test/Analysis/CostModel/AArch64/fshr.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
    M llvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
    M mlir/lib/Conversion/ComplexCommon/DivisionConverter.cpp
    M mlir/lib/Dialect/Math/Transforms/ExpandPatterns.cpp
    M mlir/test/Dialect/Math/expand-math.mlir
    M mlir/test/mlir-runner/test-expand-math-approx.mlir
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  Fix formatting

Created using spr 1.3.5


Compare: https://github.com/llvm/llvm-project/compare/f0b3fbde9dc8...501ce30a2793

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