AbortedChanges

Summary

  1. [mlir][sparse] adjust output shape inference to new tensor abstraction (details)
  2. Allow dependent alias template specializations in the preferred_name (details)
  3. [mlir] Fully specify removeAttr return type (details)
  4. [libomptarget] Allow calls to omp_target_memcpy with 0 size. (details)
  5. Reland D93848 "[sanitizer] Define SANITIZER_GLIBC to refine SANITIZER_LINUX feature detection and support musl"" (details)
  6. DebugInfo: Add support for always using ranges (rather than low/high pc) in DWARFv5 (details)
  7. Make DWARFUnit use the dwo_id from the DWARF5 CU header. (details)
  8. [sanitizer][Darwin] Suppress -Wno-non-virtual-dtor warning (details)
Commit 8b124c19f52cb8ed0236b602df56787553e1e1b6 by ajcbik
[mlir][sparse] adjust output shape inference to new tensor abstraction

Nicolas changed the tensor abstraction so that every output has
its own shape definition. This simplifies the "inference" that
was used in the sparse compiler.

Reviewed By: penpornk

Differential Revision: https://reviews.llvm.org/D94119
The file was modifiedmlir/test/Dialect/Linalg/sparse_2d.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Sparsification.cpp
Commit b12e4735317ec96e1b35deee68b90d62a23a9353 by richard
Allow dependent alias template specializations in the preferred_name
attribute.

This was intended to work, but didn't match the checks because these
types are modeled as TemplateSpecializationTypes not TypedefTypes.
The file was modifiedclang/lib/AST/TypePrinter.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/include/clang/AST/Type.h
The file was modifiedclang/test/SemaTemplate/attributes.cpp
Commit cbda2cba4f8e4d236d56158cecfb008e03341a70 by tpopp
[mlir] Fully specify removeAttr return type

This was added without full specification like other generated methods.
This then leads to other downstream dialects failing to compile the
generated code when they are not in the mlir namespace.

Differential Revision: https://reviews.llvm.org/D94132
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/test/mlir-tblgen/op-attribute.td
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
Commit dec02904d2675a14cd9c7b5a306d3f4f85c2abca by georgios.rokos
[libomptarget] Allow calls to omp_target_memcpy with 0 size.

Differential Revision: https://reviews.llvm.org/D94095
The file was modifiedopenmp/libomptarget/src/api.cpp
Commit b7718b617557aa9827f994a16267537236634095 by i
Reland D93848 "[sanitizer] Define SANITIZER_GLIBC to refine SANITIZER_LINUX feature detection and support musl""

Several `#if SANITIZER_LINUX && !SANITIZER_ANDROID` guards are replaced
with the more appropriate `#if SANITIZER_GLIBC` (the headers are glibc
extensions, not specific to Linux (i.e. if we ever support GNU/kFreeBSD
or Hurd, the guards may automatically work)).

Several `#if SANITIZER_LINUX && !SANITIZER_ANDROID` guards are refined
with `#if SANITIZER_GLIBC` (the definitions are available on Linux glibc,
but may not be available on other libc (e.g. musl) implementations).

This patch makes `ninja asan cfi msan stats tsan ubsan xray` build on a musl based Linux distribution (apk install musl-libintl)
Notes about disabled interceptors for musl:

* `SANITIZER_INTERCEPT_GLOB`: musl does not implement `GLOB_ALTDIRFUNC` (GNU extension)
* Some ioctl structs and functions operating on them.
* `SANITIZER_INTERCEPT___PRINTF_CHK`: `_FORTIFY_SOURCE` functions are GNU extension
* `SANITIZER_INTERCEPT___STRNDUP`: `dlsym(RTLD_NEXT, "__strndup")` errors so a diagnostic is formed. The diagnostic uses `write` which hasn't been intercepted => SIGSEGV
* `SANITIZER_INTERCEPT_*64`: the `_LARGEFILE64_SOURCE` functions are glibc specific. musl does something like `#define pread64 pread`
* Disabled `msg_iovlen msg_controllen cmsg_len` checks: musl is conforming while many implementations (Linux/FreeBSD/NetBSD/Solaris) are non-conforming. Since we pick the glibc definition, exclude the checks for musl (incompatible sizes but compatible offsets)

Pass through LIBCXX_HAS_MUSL_LIBC to make check-msan/check-tsan able to build libc++ (https://bugs.llvm.org/show_bug.cgi?id=48618).

Many sanitizer features are available now.

```
% ninja check-asan
(known issues:
* ASAN_OPTIONS=fast_unwind_on_malloc=0 odr-violations hangs
)
...
Testing Time: 53.69s
  Unsupported      : 185
  Passed           : 512
  Expectedly Failed:   1
  Failed           :  12

% ninja check-ubsan check-ubsan-minimal check-memprof # all passed

% ninja check-cfi
( all cross-dso/)
...
Testing Time: 8.68s
  Unsupported      : 264
  Passed           :  80
  Expectedly Failed:   8
  Failed           :  32

% ninja check-lsan
(With GetTls (D93972), 10 failures)
Testing Time: 4.09s
  Unsupported:  7
  Passed     : 65
  Failed     : 22

% ninja check-msan
(Many are due to functions not marked unsupported.)
Testing Time: 23.09s
  Unsupported      :   6
  Passed           : 764
  Expectedly Failed:   2
  Failed           :  58

% ninja check-tsan
Testing Time: 23.21s
  Unsupported      :  86
  Passed           : 295
  Expectedly Failed:   1
  Failed           :  25
```

Used `ASAN_OPTIONS=verbosity=2` to verify there is no unneeded interceptor.

Partly based on Jari Ronkainen's https://reviews.llvm.org/D63785#1921014

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D93848
The file was modifiedcompiler-rt/lib/asan/asan_interceptors.h
The file was modifiedcompiler-rt/lib/interception/interception_linux.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
The file was modifiedcompiler-rt/lib/msan/tests/msan_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
The file was modifiedcompiler-rt/lib/asan/tests/asan_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
The file was modifiedcompiler-rt/cmake/Modules/AddCompilerRT.cmake
The file was modifiedcompiler-rt/lib/interception/interception_linux.h
Commit ad18b075fd63935148b460f9c6b4dce130c56b15 by dblaikie
DebugInfo: Add support for always using ranges (rather than low/high pc) in DWARFv5

Given the ability provided by DWARFv5 rnglists to reuse addresses in the
address pool, it can be advantageous to object file size to use range
encodings even when the range could be described by a direct low/high
pc.

Add a flag to allow enabling this in DWARFv5 for the purpose of
experimentation/data gathering.

It might be that it makes sense to enable this functionality by default
for DWARFv5 + Split DWARF at least, where the tradeoff/desire to
optimize for .o file size is more explicit and .o bytes are higher
priority than .dwo bytes.
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
The file was addedllvm/test/DebugInfo/X86/ranges_always.ll
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
Commit a39b19821b6b8c6b4ae853f6b6a88128275ea2c7 by jgorbe
Make DWARFUnit use the dwo_id from the DWARF5 CU header.

In split DWARF v5 files, the DWO id is no longer in the DW_AT_GNU_dwo_id
attribute. It's in the CU header instead. This change makes lldb look in
both places.

Differential Revision: https://reviews.llvm.org/D93444
The file was addedlldb/test/Shell/SymbolFile/DWARF/dwarf5-split.s
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
Commit 8b0bd54d0ec968df28ccc58bbb537a7b7c074ef2 by julian.lettner
[sanitizer][Darwin] Suppress -Wno-non-virtual-dtor warning

Suppress the warning:
```
'fake_shared_weak_count' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
```

The warning has been recently enabled [1], but the associated cleanup
missed this instance in Darwin code [2].

[1] 9c31e12609e1935eb84a2497ac08a49e3139859a
[2] d48f2d7c02743571075bb7812bb4c9e634e51ed1

Differential Revision: https://reviews.llvm.org/D94139
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cpp