[all-commits] [llvm/llvm-project] 02a33b: "Reapply "[Sema] Fix crash on invalid code with pa...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Fri Jan 5 14:32:03 PST 2024


  Branch: refs/heads/users/vitalybuka/spr/tsan-fallback-to-top-frame
  Home:   https://github.com/llvm/llvm-project
  Commit: 02a33b72fd21cdbf476d6bda72faa462e073e510
      https://github.com/llvm/llvm-project/commit/02a33b72fd21cdbf476d6bda72faa462e073e510
  Author: Mark de Wever <koraq at xs4all.nl>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M clang/lib/Sema/SemaInit.cpp
    A clang/test/SemaCXX/crash-GH76228.cpp
    M clang/test/SemaCXX/paren-list-agg-init.cpp
    M libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp
    M libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp

  Log Message:
  -----------
  "Reapply "[Sema] Fix crash on invalid code with parenthesized aggrega… (#76833)

…te initialization" (#76272)""

With updates the libc++ tests.

This reverts commit 2205d23 and relands
86dc6e1 and
7ab16fb.

Original commit was reverted because of failing libc++ tests, see #76232
for the discussion.

The errors in the tests are spurious in the first place (coming from
initialization of invalid classes), so update the tests to match new
behavior that does not show those errors.

The original patch was written by @ilya-biryukov 

To fix the CI two libc++ tests are temporary disabled for clang-18.


  Commit: 31626dadcef86e48bcc44e86e4411578094c8739
      https://github.com/llvm/llvm-project/commit/31626dadcef86e48bcc44e86e4411578094c8739
  Author: Nathan Sidwell <nathan at acm.org>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/test/Assembler/autoupgrade-thread-pointer.ll

  Log Message:
  -----------
  [llvm][NFC] Refactor AutoUpgrader arm/aarch64 (#74145)

Break out and refactor AArch64 & ARM intrinsic updating.  There's a fair amount of comonality, but let's avoid continually checking the same prefixes.


  Commit: 8d6784db04ee5d925a2d036a68f00a7c124c6cf9
      https://github.com/llvm/llvm-project/commit/8d6784db04ee5d925a2d036a68f00a7c124c6cf9
  Author: Jordan Rupprecht <rupprecht at google.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

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

  Log Message:
  -----------
  [bazel][libc][math] Add missing nan(f|l) deps

After 0504e932880e0c4c333baeba9b8d674c5b9ae316


  Commit: 93d2e49b6aa6904620a7e9b559c04ec8756dc596
      https://github.com/llvm/llvm-project/commit/93d2e49b6aa6904620a7e9b559c04ec8756dc596
  Author: Shubham Sandeep Rastogi <srastogi22 at apple.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    A llvm/test/tools/llvm-dwarfdump/verify-no-file.yaml

  Log Message:
  -----------
  Fix file index verifier when there is no file name in the prologue. (#77004)

If there is no file name in the prologue of a line table, the verifier
will try to verify the file index, which will be set to 1 by default.
This will cause the DWARF verifier to throw an error even if there is no
error.

rdar://114476503
rdar://114343624


  Commit: f9aba820eb6478a617145eb690ba8b06490d7ac5
      https://github.com/llvm/llvm-project/commit/f9aba820eb6478a617145eb690ba8b06490d7ac5
  Author: Nico Weber <thakis at chromium.org>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn

  Log Message:
  -----------
  [gn] port a0e6b7c04292


  Commit: f22dc88759a53d4224c17d3833a359ef5674b4ea
      https://github.com/llvm/llvm-project/commit/f22dc88759a53d4224c17d3833a359ef5674b4ea
  Author: Shubham Sandeep Rastogi <srastogi22 at apple.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/test/tools/llvm-dwarfdump/verify-no-file.yaml

  Log Message:
  -----------
  [NFC] Address review feedback from PR #77004 (#77134)

Accidentally didn't commit the review feedback before merging the PR


  Commit: 5121e2cffd23751360e71a8ac69b7462dae23aa8
      https://github.com/llvm/llvm-project/commit/5121e2cffd23751360e71a8ac69b7462dae23aa8
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M clang/test/Driver/linker-wrapper-image.c
    M clang/tools/clang-linker-wrapper/OffloadWrapper.cpp

  Log Message:
  -----------
  [OpenMP] Change `__tgt_device_image` to point to the image (#77003)

Summary:
We use the OffloadBinary to contain bundled offloading objects used to
support many images / targets at the same time. The `__tgt_device_info`
struct used to contain a pointer to this underlying binary format, which
contains information about the triple and architecture. We used to parse
this in the runtime to do image verification.

Recent changes removed the need for this to be used internally, as we
just parse it out of the ELF directly. This patch sets the pointers up
so they point to the ELF without requiring any further parsing.


  Commit: 7c3bcc307a8fa9153a171f6abb4e8fdc91bd6030
      https://github.com/llvm/llvm-project/commit/7c3bcc307a8fa9153a171f6abb4e8fdc91bd6030
  Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
  Date:   2024-01-06 (Sat, 06 Jan 2024)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/phi.ll
    A llvm/test/Transforms/InstCombine/switch-zext-sext.ll
    A llvm/test/Transforms/PhaseOrdering/switch-sext.ll

  Log Message:
  -----------
  [InstCombine] Fold `switch(zext/sext(X))` into `switch(X)` (#76988)

This patch folds `switch(zext/sext(X))` into `switch(X)`.
The original motivation of this patch is to optimize a pattern found in
cvc5. For example:
```
  %bf.load.i = load i16, ptr %d_kind.i, align 8
  %bf.clear.i = and i16 %bf.load.i, 1023
  %bf.cast.i = zext nneg i16 %bf.clear.i to i32
  switch i32 %bf.cast.i, label %if.else [
    i32 335, label %if.then
    i32 303, label %if.then
  ]

if.then:                                          ; preds = %entry, %entry
  %d_children.i.i = getelementptr inbounds %"class.cvc5::internal::expr::NodeValue", ptr %0, i64 0, i32 3
  %cmp.i.i.i.i.i = icmp eq i16 %bf.clear.i, 1023
  %cond.i.i.i.i.i = select i1 %cmp.i.i.i.i.i, i32 -1, i32 %bf.cast.i
```
`%cmp.i.i.i.i.i` always evaluates to false because `%bf.clear.i` can
only be 335 or 303.
Folding `switch i32 %bf.cast.i` to `switch i16 %bf.clear.i` will help
`CVP` to handle this case.
See also
https://github.com/llvm/llvm-project/pull/76928#issuecomment-1877055722.

Compile-time impact:
http://llvm-compile-time-tracker.com/compare.php?from=7954c57124b495fbdc73674d71f2e366e4afe522&to=502b13ed34e561d995ae1f724cf06d20008bd86f&stat=instructions:u

|stage1-O3|stage1-ReleaseThinLTO|stage1-ReleaseLTO-g|stage1-O0-g|stage2-O3|stage2-O0-g|stage2-clang|
|--|--|--|--|--|--|--|
|+0.03%|+0.06%|+0.07%|+0.00%|-0.02%|-0.03%|+0.02%|


  Commit: fc1c478709e380164733560e4a2c8f9e8d5e2c1c
      https://github.com/llvm/llvm-project/commit/fc1c478709e380164733560e4a2c8f9e8d5e2c1c
  Author: Jordan R AW <103465530+ajordanr-google at users.noreply.github.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M libunwind/src/UnwindCursor.hpp

  Log Message:
  -----------
  [libunwind] Replace process_vm_readv with SYS_rt_sigprocmask (#74791)

process_vm_readv is generally considered dangerous from a syscall
perspective, and is frequently blanket banned in seccomp filters such as
those in Chromium and ChromiumOS. We can get the same behaviour during
the invalid PC address case with the raw SYS_rt_sigprocmask syscall.

Testing to ensure that process_vm_readv does not appear, I ran the
output of check-unwind on an ARM64 device under strace. Previously,
bad_unwind_info in particular would use process_vm_readv, but with this
commit, it now no longer uses it:

```
strace test/Output/bad_unwind_info.pass.cpp.dir/t.tmp.exe \
  |& grep process_vm_readv
```

The libunwind unittests were also tested on ARM64 ChromeOS (Gentoo
Linux) devices.


  Commit: 365fbbfbcfefb8766f7716109b9c3767b58e6058
      https://github.com/llvm/llvm-project/commit/365fbbfbcfefb8766f7716109b9c3767b58e6058
  Author: David Green <david.green at arm.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/test/CodeGen/AArch64/selectopt.ll

  Log Message:
  -----------
  [AArch64] Add some extra tests for SelectOpt. NFC


  Commit: dcdb4a36ae3549fb1852b2c0089247a8d477eaf3
      https://github.com/llvm/llvm-project/commit/dcdb4a36ae3549fb1852b2c0089247a8d477eaf3
  Author: Nick Desaulniers <nickdesaulniers at users.noreply.github.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M libc/cmake/modules/LLVMLibCObjectRules.cmake

  Log Message:
  -----------
  [libc][cmake] append per obj compile options instead of prepending (#77126)

This allows individual object files to override the common compile
commands in
their local CMakeLists' add_object_library call.

For example, the common compile commands contain -Wall and -Wextra.
Before
this patch, the per object COMPILE_OPTIONS were prepended to these, so
that
builds of individual object files could not individually disable
specific
diagnostics from those groups explicitly.

After this patch, the per-object file compile objects are appended to
the list
of compiler flags, enabling this use case.

ARGN is a bit of cmake magic; let's be explicit in the APPEND that we're
appending the compile options.

Link: #77007


  Commit: 6f4cc1310b12bc59210e4596a895db4cb9ad6075
      https://github.com/llvm/llvm-project/commit/6f4cc1310b12bc59210e4596a895db4cb9ad6075
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.h

  Log Message:
  -----------
  [llvm-exegesis] Remove unused Counter::read method (#76651)

This method was simply a wrapper around readOrError. All users within
the llvm-exegesis code base should have been processing an actual error
rather than using the wrapper. This patch removes the wrapper and
rewrites the users (just 1) to use the readOrError method.


  Commit: d9c8edf08afce3d1e563e4521ae847a6809bb993
      https://github.com/llvm/llvm-project/commit/d9c8edf08afce3d1e563e4521ae847a6809bb993
  Author: Aiden Grossman <agrossman154 at yahoo.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp

  Log Message:
  -----------
  [llvm-exegesis] Add matcher for register initial values (#76666)

Currently, the unit tests for the BenchmarkResult struct do not check if
the register initial values can be parsed back in. This patch adds a
matcher and tests that the register initial values can be parsed
correctly. This exercises code already contained within the benchmark to
yaml infrastructure.


  Commit: 853b13342a131e06d61293ec6e840642054c6c85
      https://github.com/llvm/llvm-project/commit/853b13342a131e06d61293ec6e840642054c6c85
  Author: Jan Svoboda <jan_svoboda at apple.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M clang/test/Lexer/case-insensitive-include-absolute.c

  Log Message:
  -----------
  [clang] Fix test for case-insensitive absolute includes (#76985)

When CMake on Windows is told to generate the build into a directory
whose real path has a different drive letter (e.g. due to a symlink),
the "clang/test/Lexer/case-insensitive-include-absolute.c" test fails.
That happens because because `trySimplifyPath()` in `PPDirectives.cpp`
finds out there's more than a case difference between the `#include`
path (containing `%/t`) and the real path, which prevents the diagnostic
to fire.

I thought this is only an issue on Windows due to the fact that LIT does
not drag the path to the build directory through `os.path.realpath()`
like it does on other systems (see `abs_path_preserve_drive()` in
"llvm/utils/lit/lit/util.py"). However, even after only using
`os.path.abspath()` on a Unix system, build generated into a symlinked
directory tests correctly. I assume there must be something else at
play, but I don't have the time to dig deeper.

The fix is is fairly straightforward: use the real path in the
`#include` (with `%{/t:real}`), which removes the non-case difference
and unblocks the diagnostic.


  Commit: f1d75d08adb9841dd9cebad63b76d4823ec2bdac
      https://github.com/llvm/llvm-project/commit/f1d75d08adb9841dd9cebad63b76d4823ec2bdac
  Author: Jonathon Penix <107437988+jonathonpenix at users.noreply.github.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/BareMetal.cpp
    M clang/test/Driver/nostdincxx.cpp

  Log Message:
  -----------
  [clang][Driver] Don't warn when -nostdinc and -nostdinc++ are both specified (#77130)

When -nostdinc and -nostdinc++ are both specified and the Baremetal
toolchain is used, an unused command line argument warning for
-nostdinc++ is produced. This doesn't seem particularly meaningful as
-nostdinc++ would have been claimed/used had the check in
AddClangCXXStdlibIncludeArgs not short-circuited. So, just claim all
arguments in this check.

I believe this is consistent with what was done for the GNU toolchain
(see 6fe7de90b9e4e466a5c2baadafd5f72d3203651d), so hopefully this is
appropriate here as well.


  Commit: d7b4debf98fd740f821bda717de7b807e26ae95a
      https://github.com/llvm/llvm-project/commit/d7b4debf98fd740f821bda717de7b807e26ae95a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M llvm/cmake/config-ix.cmake

  Log Message:
  -----------
  [cmake,Apple] Check ld-classic when looking for ld64. (#77136)

In newer SDKs, ld64 is called ld-classic. Look for it first, as ld in
those SDKs is still missing some functionality some tests depend on.

This enables running the tests from check-llvm-tools-lto with newer SDKs
on ARM64 macOS.


  Commit: 8e92d9ea8dfcc49223e4ac62c998aea4d2d4fc84
      https://github.com/llvm/llvm-project/commit/8e92d9ea8dfcc49223e4ac62c998aea4d2d4fc84
  Author: Shubham Sandeep Rastogi <srastogi22 at apple.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    A llvm/test/tools/llvm-dwarfdump/AArch64/verify-no-file.yaml
    R llvm/test/tools/llvm-dwarfdump/verify-no-file.yaml

  Log Message:
  -----------
  Move verify-no-file.yaml to AArch64 folder (#77149)

This test fails on power pc and solaris, moving it to AArch64 folder
because the yaml is generated for an AArch64 MachO object file.


  Commit: 5b54dd4f5eccc66c6352f9277d0a6edbd2e80435
      https://github.com/llvm/llvm-project/commit/5b54dd4f5eccc66c6352f9277d0a6edbd2e80435
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_report.cpp

  Log Message:
  -----------
  [tsan] Generalize FrameIsInternal (#77143)

Prepare to move this into sanitizer_common.


  Commit: 994acf7d3d42b3f107c73ed070253ba26d0f67dd
      https://github.com/llvm/llvm-project/commit/994acf7d3d42b3f107c73ed070253ba26d0f67dd
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/BareMetal.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/Driver/linker-wrapper-image.c
    M clang/test/Driver/nostdincxx.cpp
    M clang/test/Lexer/case-insensitive-include-absolute.c
    A clang/test/SemaCXX/crash-GH76228.cpp
    M clang/test/SemaCXX/paren-list-agg-init.cpp
    M clang/tools/clang-linker-wrapper/OffloadWrapper.cpp
    M libc/cmake/modules/LLVMLibCObjectRules.cmake
    M libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp
    M libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp
    M libunwind/src/UnwindCursor.hpp
    M llvm/cmake/config-ix.cmake
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Assembler/autoupgrade-thread-pointer.ll
    M llvm/test/CodeGen/AArch64/selectopt.ll
    M llvm/test/Transforms/InstCombine/phi.ll
    A llvm/test/Transforms/InstCombine/switch-zext-sext.ll
    A llvm/test/Transforms/PhaseOrdering/switch-sext.ll
    A llvm/test/tools/llvm-dwarfdump/AArch64/verify-no-file.yaml
    M llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.h
    M llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp
    M llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel

  Log Message:
  -----------
  [𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.4

[skip ci]


  Commit: 72d2f163de12fa2c6f70546f788c3025954afb14
      https://github.com/llvm/llvm-project/commit/72d2f163de12fa2c6f70546f788c3025954afb14
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2024-01-05 (Fri, 05 Jan 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/BareMetal.cpp
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/Driver/linker-wrapper-image.c
    M clang/test/Driver/nostdincxx.cpp
    M clang/test/Lexer/case-insensitive-include-absolute.c
    A clang/test/SemaCXX/crash-GH76228.cpp
    M clang/test/SemaCXX/paren-list-agg-init.cpp
    M clang/tools/clang-linker-wrapper/OffloadWrapper.cpp
    M libc/cmake/modules/LLVMLibCObjectRules.cmake
    M libcxx/test/libcxx/utilities/expected/expected.expected/transform_error.mandates.verify.cpp
    M libcxx/test/libcxx/utilities/expected/expected.void/transform_error.mandates.verify.cpp
    M libunwind/src/UnwindCursor.hpp
    M llvm/cmake/config-ix.cmake
    M llvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp
    M llvm/lib/IR/AutoUpgrade.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Assembler/autoupgrade-thread-pointer.ll
    M llvm/test/CodeGen/AArch64/selectopt.ll
    M llvm/test/Transforms/InstCombine/phi.ll
    A llvm/test/Transforms/InstCombine/switch-zext-sext.ll
    A llvm/test/Transforms/PhaseOrdering/switch-sext.ll
    A llvm/test/tools/llvm-dwarfdump/AArch64/verify-no-file.yaml
    M llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.h
    M llvm/unittests/tools/llvm-exegesis/X86/BenchmarkResultTest.cpp
    M llvm/utils/gn/secondary/llvm/utils/TableGen/BUILD.gn
    M utils/bazel/llvm-project-overlay/libc/BUILD.bazel

  Log Message:
  -----------
  rebase

Created using spr 1.3.4


Compare: https://github.com/llvm/llvm-project/compare/7315ac3125f3...72d2f163de12


More information about the All-commits mailing list