Changes

Summary

  1. Implement delimited escape sequences. (details)
  2. [RISCV][compiler-rt] Fix an incorrect comment for RV64 __riscv_restore_12 (details)
  3. [clang][driver][AIX] Add system libc++ header paths to driver (details)
  4. [HWASan] Catch cases where libc populated jmp_buf. (details)
  5. [SLP][NFC]Add a test for tiny tree with stores and with not (details)
  6. [mlir][Linalg] Fail comprehensive bufferization if a memref is returned. (details)
  7. [Test] Add a test showing missing opportunities in branch deletion by indvars (details)
  8. [HWASan] Add missing newlines. (details)
  9. [test] Fix asan/scudo -shared-libsan tests with -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on (details)
  10. [InstCombine] Update test checks through autogeneration, add more tests. NFC (details)
  11. [compiler-rt] Move -fno-omit-frame-pointer check to common config-ix (details)
  12. [CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux (details)
  13. [HIP] Diagnose -fopenmp-targets for HIP programs (details)
  14. [MLIR] Tighten type constraint on memref.global op def (details)
Commit 274adcb866343cb505408d8f401840ea814522c8 by aaron
Implement delimited escape sequences.

\x{XXXX} \u{XXXX} and \o{OOOO} are accepted in all languages mode
in characters and string literals.

This is a feature proposed for both C++ (P2290R1) and C (N2785). The
papers have been seen by both committees but are not yet adopted into
either standard. However, they do have support from both committees.
The file was modifiedclang/lib/Lex/LiteralSupport.cpp
The file was modifiedclang/test/Parser/cxx11-user-defined-literals.cpp
The file was modifiedclang/lib/Lex/Lexer.cpp
The file was modifiedclang/test/Sema/ucn-identifiers.c
The file was modifiedclang/include/clang/Basic/DiagnosticLexKinds.td
The file was modifiedclang/test/Preprocessor/ucn-pp-identifier.c
The file was addedclang/test/Lexer/char-escapes-delimited.c
Commit b8d83e83be0fd841f71bae07b664896aec88a5a7 by jrtc27
[RISCV][compiler-rt] Fix an incorrect comment for RV64 __riscv_restore_12

This was presumably copied from the RV32 implementation and not updated
like the rest.
The file was modifiedcompiler-rt/lib/builtins/riscv/restore.S
Commit 1f3925e25ae010c30273501d24b2bd4e0318fe7a by daltenty
[clang][driver][AIX] Add system libc++ header paths to driver

This change adds the system libc++ header location to the driver. As well we define
the `__LIBC_NO_CPP_MATH_OVERLOADS__` macro when using those headers, in order to suppress
conflicting C++ overloads in the system libc headers that were used by XL C++.

Reviewed By: ZarkoCA

Differential Revision: https://reviews.llvm.org/D109078
The file was modifiedclang/lib/Driver/ToolChains/AIX.h
The file was modifiedclang/test/Driver/aix-toolchain-include.cpp
The file was modifiedclang/test/Driver/aix-ld.c
The file was modifiedclang/lib/Driver/ToolChains/AIX.cpp
Commit 1a3b3301d7aa9ab25a8bdf045c77298b087e3930 by mascasa
[HWASan] Catch cases where libc populated jmp_buf.

Some setjmp calls within libc cannot be intercepted while their matching
longjmp calls can be.  This causes problems if our setjmp/longjmp
interceptors don't use the exact same format as libc for populating and
reading the jmp_buf.

We add a magic field to our jmp_buf and populate it in setjmp.  This
allows our longjmp interceptor to notice when a libc jmp_buf is passed
to it.

See discussion on https://reviews.llvm.org/D109699 and
https://reviews.llvm.org/D69045.

Fixes https://github.com/google/sanitizers/issues/1244.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D109787
The file was modifiedcompiler-rt/lib/hwasan/hwasan.h
The file was modifiedcompiler-rt/lib/hwasan/hwasan_interceptors.cpp
Commit 446e11fa2943b1c82aaf588f0df4985259fe1be2 by a.bataev
[SLP][NFC]Add a test for tiny tree with stores and with not
same/alternate instructions.
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/tiny-tree.ll
Commit 6fe77b1051cc6e01dc1ac2d47f51802ab938e076 by nicolas.vasilache
[mlir][Linalg] Fail comprehensive bufferization if a memref is returned.

Summary:

Reviewers:

Subscribers:

Differential revision: https://reviews.llvm.org/D109824
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
The file was modifiedmlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir
The file was modifiedmlir/test/Dialect/Linalg/comprehensive-module-bufferize-invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.td
Commit c78ed20784ee7ffb60b0879197e34225325aafd0 by mkazantsev
[Test] Add a test showing missing opportunities in branch deletion by indvars
The file was addedllvm/test/Transforms/IndVarSimplify/outer_phi.ll
Commit 0a07789fe93d8994163798ed6d14937412274dc2 by mascasa
[HWASan] Add missing newlines.
The file was modifiedcompiler-rt/lib/hwasan/hwasan_interceptors.cpp
Commit 9111635cb78e4a134364319e2728ff8dd69d36a8 by i
[test] Fix asan/scudo -shared-libsan tests with -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on

On x86_64-unknown-linux-gnu, `-m32` tests set LD_LIBRARY_PATH to
`config.compiler_rt_libdir` (`$build/lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu`)
instead of i386-unknown-linux-gnu, so `-shared-libsan` executables
cannot find their runtime (e.g. `TestCases/replaceable_new_delete.cpp`).

Detect -m32 and -m64 in config.target_cflags, and adjust `config.compiler_rt_libdir`.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D108859
The file was modifiedcompiler-rt/test/lit.common.cfg.py
Commit 36ef65adc356699832f786f9fbd3244527e4b79d by anna
[InstCombine] Update test checks through autogeneration, add more tests. NFC

Updated check lines.
Tests precommitted from D109700.
The file was modifiedllvm/test/Transforms/InstCombine/sink_instruction.ll
Commit 210d72e9d6b4a8e7633921d0bd7186fd3c7a2c8c by mgorny
[compiler-rt] Move -fno-omit-frame-pointer check to common config-ix

9ee64c374605683ae80b9641d5312a72c2a67336 has started using
COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG inside scudo.  However,
the relevant CMake check was performed in builtin-config-ix.cmake,
so the definition was missing when builtins were not built.  Move
the check to config-ix.cmake, so that it runs unconditionally of
the components being built.

Fixes PR#51847

Differential Revision: https://reviews.llvm.org/D109812
The file was modifiedcompiler-rt/cmake/builtin-config-ix.cmake
The file was modifiedcompiler-rt/cmake/config-ix.cmake
Commit f9dbca68d48e705f6d45df8f58d6b2ee88bce76c by i
[CMake] Enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR by default on Linux

This makes the default build closer to a -DLLVM_ENABLE_RUNTIMES=all build.
The layout is arguably superior because different libraries of target triples
are in different directories, similar to GCC/Debian multiarch.

When LLVM_DEFAULT_TARGET_TRIPLE is x86_64-unknown-linux-gnu,
`lib/clang/14.0.0/lib/libclang_rt.asan-x86_64.a`
is moved to
`lib/clang/14.0.0/lib/x86_64-unknown-linux-gnu/libclang_rt.asan.a`.

In addition, if the host compiler supports -m32 (multilib),
`lib/clang/14.0.0/lib/libclang_rt.asan-i386.a`
is moved to
`lib/clang/14.0.0/lib/i386-unknown-linux-gnu/libclang_rt.asan.a`.

Clang has been detecting both paths for lib/Driver/ToolChains/Gnu.cpp since 2018 (D50547).

---

Note: Darwin needs to be disabled. The hierarchy needs to be sorted out.
The current -DLLVM_DEFAULT_TARGET_TRIPLE=off state is like:
```
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_ios.a
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_iossim.a
lib/clang/14.0.0/lib/darwin/libclang_rt.profile_osx.a
```

Windows needs to be disabled: https://reviews.llvm.org/D107799?id=368557#2963311

Differential Revision: https://reviews.llvm.org/D107799
The file was modifiedllvm/CMakeLists.txt
Commit ab5f2b505a0751bce41f4cec9afa3c1541d485d0 by Yaxun.Liu
[HIP] Diagnose -fopenmp-targets for HIP programs

Diagnose -fopenmp-targets for HIP programs since
dual HIP and OpenMP offloading in the same compilation
is currently not supported by HIP toolchain.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D109718
The file was modifiedclang/lib/Driver/Driver.cpp
The file was modifiedclang/test/Driver/hip-options.hip
The file was modifiedclang/include/clang/Basic/DiagnosticDriverKinds.td
Commit f68939d3d91c3e1b57fba5450fa9146c3dcf5fdc by uday
[MLIR] Tighten type constraint on memref.global op def

Tighten the def of memref.global op to use the right kind of TypeAttr
(of MemRefType).

Differential Revision: https://reviews.llvm.org/D109822
The file was modifiedmlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
The file was modifiedmlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/Transforms/TensorConstantBufferize.cpp