Changes

Summary

  1. [Zorg] Use ccache instead incremental build for openmp-offload-cuda-runtime. (details)
Commit 2afbc972a9ca914efa903d3ffc987b5da80ec836 by llvm-project
[Zorg] Use ccache instead incremental build for openmp-offload-cuda-runtime.

Building with `LLVM_ENABLE_RUNTIMES=openmp` has the disadvantage that if clang changes, the runtime that was built with the previous clang is not rebuilt. That is, if the runtime is miscompiling due to a change in clang, this will only be detected in the next clean build.

For instance, commit rG1100e4aafea233bc8bbc307c5758a7d287ad3bae caused the libomptarget device runtime to miscompile, but the [[ https://lab.llvm.org/staging/#/builders/154/builds/1421 | openmp-offload-cuda-runtime builder ]] shows it as green. Tests only started failing with the [[ https://lab.llvm.org/staging/#/builders/154/builds/1427 | next clean build ]]. In production, this would have blamed the wrong commit.

In contrast, the openmp-offload-cuda-project builder started failing with the [[ https://lab.llvm.org/staging/#/builders/155/builds/1803 | expected commit ]].

Instead of building incrementally, use ccache to avoid this problem.

Reviewed By: gkistanova, tianshilei1992

Differential Revision: https://reviews.llvm.org/D106781
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)

Summary

  1. [PowerPC]Add addex instruction definition and MC tests (details)
  2. [ARM] Fixup vst4 test. NFC (details)
  3. [OpenMP][NFC] Fix a few typos in OpenMP documentation (details)
  4. [CodeView] Saturate values bigger than supported by APInt. (details)
  5. [clang] P2266 implicit moves STL workaround (details)
  6. [SimplifyCFG] Drop support for duplicating ret's into uncond predecessors (details)
  7. [SimplifyCFG] Drop support for simplifying cond branch to two (different) ret's (details)
  8. [SimplifyCFG] SwitchToLookupTable(): don't increase ret count (details)
  9. [flang][msvc] Fix external-io unittest. (details)
  10. [OpenMP] Add a driver flag to enable the new device runtime library (details)
  11. [libc++abi/unwind] NFC: Normalize how we set target properties (details)
  12. [libc++] Remove "pass by const value" in <random>. NFCI. (details)
  13. [libc++] Fix signed overflow inside ranges::advance. (details)
  14. [WebAssembly] Make Emscripten EH work with Emscripten SjLj (details)
  15. [LLDB][GUI] Expand selected thread tree item by default (details)
  16. [LLDB][GUI] Add Arch Field (details)
  17. [OpenMP] Always inline the OpenMP outlined function (details)
  18. [WebAssembly] Remove dominator dependency in WasmEHPrepare (NFC) (details)
  19. [GlobalISel] Add a constant folding combine. (details)
  20. [flang] Disallow BOZ literal constants as arguments of implicit interfaces (details)
  21. [llvm-objcopy] Fix section group flag read/write when operating on a cross-endian object file (details)
  22. [AArch64][GlobalISel] Add identity combines to post-legal combiner. (details)
  23. [libc++] Fix spacing in <vector>. NFCI. (details)
  24. [MLIR][SCF][NFC] Fix typo in documentation of scf.while (details)
  25. [compiler-rt][hwasan][fuchsia] Define shadow bound globals (details)
  26. [lldb] [gdb-remote client] Avoid zero padding PID/TID in H packet (details)
  27. Disable the new enum i128 test under ASan, it uncovers an existing leak (details)
  28. [compiler-rt][hwasan][fuchsia] Implement InitializeOsSupport (details)
Commit 64a15817a01703ea2206dd02f27a166ea1890ecb by lei
[PowerPC]Add addex instruction definition and MC tests

Add td definitions and asm/disasm tests for the addex instruction introduced in
ISA 3.0.

Reviewed By: nemanjai, amyk, NeHuang

Differential Revision: https://reviews.llvm.org/D106666
The file was modifiedllvm/test/MC/PowerPC/ppc64-encoding.s
The file was modifiedllvm/test/MC/Disassembler/PowerPC/ppc64-encoding.txt
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.td
The file was modifiedllvm/test/MC/Disassembler/PowerPC/ppc64le-encoding.txt
The file was modifiedllvm/lib/Target/PowerPC/P9InstrResources.td
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrFormats.td
Commit d0c7d4d8a06679a9f306855f4abf1df0bab41dd1 by david.green
[ARM] Fixup vst4 test. NFC
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vst4.ll
Commit dead50d4427cbdd5f41c02c5441270822f702730 by jhuber6
[OpenMP][NFC] Fix a few typos in OpenMP documentation

Summary:
Fixes some typos in the OpenMP documentation.
The file was modifiedopenmp/docs/remarks/OMP111.rst
The file was modifiedopenmp/docs/remarks/OMP113.rst
The file was modifiedopenmp/docs/remarks/OMP131.rst
The file was modifiedopenmp/docs/remarks/OMP112.rst
The file was modifiedopenmp/docs/remarks/OMP120.rst
The file was modifiedopenmp/docs/remarks/OMP110.rst
The file was modifiedopenmp/docs/remarks/OMP160.rst
Commit f84c70a3793909ec16b3e53a502f0f9ea99c6af3 by mizvekov
[CodeView] Saturate values bigger than supported by APInt.

This fixes an assert firing when compiling code which involves 128 bit
integrals.

This would trigger runtime checks similar to this:
```
Assertion failed: getMinSignedBits() <= 64 && "Too many bits for int64_t", file llvm/include/llvm/ADT/APInt.h, line 1646
```

To get around this, we just saturate those big values.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D105320
The file was modifiedllvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
The file was modifiedllvm/include/llvm/IR/DIBuilder.h
The file was modifiedllvm/include/llvm/ADT/APInt.h
The file was modifiedllvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
The file was modifiedllvm/lib/IR/DIBuilder.cpp
The file was addedllvm/test/DebugInfo/COFF/integer-128.ll
Commit 20555a15a596012ef827e29b665db53a4fc0b86c by mizvekov
[clang] P2266 implicit moves STL workaround

This patch replaces the workaround for simpler implicit moves
implemented in D105518.

The Microsoft STL currently has some issues with P2266.

Where before, with -fms-compatibility, we would disable simpler
implicit moves globally, with this change, we disable it only
when the returned expression is in a context contained by
std namespace and is located within a system header.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: aaron.ballman, mibintc

Differential Revision: https://reviews.llvm.org/D105951
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/SemaCXX/cxx2b-p2266-disable-with-msvc-compat.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
The file was modifiedclang/lib/Frontend/InitPreprocessor.cpp
Commit 7c5f104e4549ed13c41a61429423ab03d958878e by lebedev.ri
[SimplifyCFG] Drop support for duplicating ret's into uncond predecessors

This functionality existed only under a default-off flag,
and simplifycfg nowadays prefers to not increase the count of ret's.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/merge-duplicate-conditional-ret-val.ll
The file was removedllvm/test/Transforms/SimplifyCFG/duplicate-ret-into-uncond-br.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/return-merge.ll
Commit 08efc2e68d5f9fe522fe8d70d0bd5ddf45f78848 by lebedev.ri
[SimplifyCFG] Drop support for simplifying cond branch to two (different) ret's

Nowadays, simplifycfg pass already tail-merges all the ret blocks together
before doing anything, and it should not increase the count of ret's,
so this is dead code.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
Commit 1901c98dd81bded0b95b2a1c0de05d56c24e7408 by lebedev.ri
[SimplifyCFG] SwitchToLookupTable(): don't increase ret count

The very next SimplifyCFG pass invocation will tail-merge these two ret's
anyways, there is not much point in creating more work for ourselves.
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/simplifycfg-late.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/Hexagon/switch-to-lookup-table.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
The file was modifiedllvm/test/Transforms/SimplifyCFG/rangereduce.ll
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
The file was modifiedllvm/test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll
Commit cbad57613e769d0653e13cf877d80eae421b2314 by llvm-project
[flang][msvc] Fix external-io unittest.

Fix the external-io unittest under Windows.

In particular, fixes the following issues:

1.  When creating a temporary file, open it with read+write permissions
     using the _O_RDWR flag. _S_IREAD and _S_IWRITE are for the file
     permissions of the created file.

2. _chsize returns 0 on success (just like ftruncate).

3. To set a std::optional, use its assign-operator overload instead of
    getting a reference to its value and overwrite that. The latter is
    invalid if the std::optional has no value, and is caught by
    msvc's debug STL.

The non-GTest unittest is currently not executed under Windows because
of the added .exe extension to the output file: external-io.text.exe.
llvm-lit skips the file because .exe is not in the lists of test
suffixes (.test is). D105315 is going to change that by converting it
to a GTest-test.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D106726
The file was modifiedflang/runtime/unit.cpp
The file was modifiedflang/runtime/file.cpp
Commit d2972116923a124de71cea006eca3068bdc381ea by huberjn
[OpenMP] Add a driver flag to enable the new device runtime library

This patch adds a driver flag `-fopenmp-target-new-runtime` to optionally enable the new device runtime
bitcode library. This allows users to enable the new experimental runtime
before it becomes the default in the future.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106793
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
The file was modifiedclang/test/Driver/openmp-offload-gpu.c
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was addedclang/test/Driver/Inputs/libomptarget/libomptarget-new-nvptx-sm_35.bc
Commit e95cd94f7edf50367d650410b8e534342eb0e5cb by Louis Dionne
[libc++abi/unwind] NFC: Normalize how we set target properties

This is a NFC commit to normalize how we set target properties on the
various runtime targets. A follow-up patch is going to add new properties,
and I wanted that follow-up patch to be cleaner.
The file was modifiedlibcxxabi/src/CMakeLists.txt
The file was modifiedlibunwind/src/CMakeLists.txt
Commit 25666a74c5af05ae6b189ad4f7382d351fb8698f by arthur.j.odwyer
[libc++] Remove "pass by const value" in <random>. NFCI.
The file was modifiedlibcxx/include/random
Commit 41b17c444df647ce46609d8efb57a98d35704c63 by arthur.j.odwyer
[libc++] Fix signed overflow inside ranges::advance.

See LWG reflector thread of 2021-07-23 titled
'Question on ranges::advance and "past-the-sentinel iterators"'.
Test case heavily based on one graciously provided by Casey Carter.

Differential Revision: https://reviews.llvm.org/D106735
The file was modifiedlibcxx/include/__iterator/advance.h
The file was modifiedlibcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
Commit c285a11efdb0821e6be9fcef695097890f44aa03 by aheejin
[WebAssembly] Make Emscripten EH work with Emscripten SjLj

When Emscripten EH mixes with Emscripten SjLj, we are not currently
handling some of them correctly. There are three cases:
1. The current function calls `setjmp` and there is an `invoke` to a
   function that can either throw or longjmp. In this case, we have to
   check both for exception and longjmp. We are currently handling this
   case correctly:
   https://github.com/llvm/llvm-project/blob/0c0eb76782d5224b8d81a5afbb9a152bcf7c94c7/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L1058-L1090
   When inserting routines for functions that can longjmp, which we do
   only for setjmp-calling functions, we check if the function was
   previously an `invoke` and handle it correctly.

2. The current function does NOT call `setjmp` and there is an `invoke`
   to a function that can either throw or longjmp. Because there is no
   `setjmp` call, we haven't been doing any check for functions that can
   longjmp. But in that case, for `invoke`, we only check for an
   exception and if it is not an exception we reset `__THREW__` to 0,
   which can silently swallow the longjmp:
   https://github.com/llvm/llvm-project/blob/0c0eb76782d5224b8d81a5afbb9a152bcf7c94c7/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L70-L80
   This CL fixes this.

3. The current function calls `setjmp` and there is no `invoke`. Because
   it is not an `invoke`, we haven't been doing any check for functions
   that can throw, and only insert longjmp-checking routines for
   functions that can longjmp. But in that case, if a longjmpable
   function throws, we only check for a longjmp so if it is not a
   longjmp we reset `__THREW__` to 0, which can silently swallow the
   exception:
   https://github.com/llvm/llvm-project/blob/0c0eb76782d5224b8d81a5afbb9a152bcf7c94c7/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L156-L169
   This CL fixes this.

To do that, this moves around some code, so we register necessary
functions for both EH and SjLj and precompute some data (the set of
functions that contains `setjmp`) before doing actual EH or SjLj
transformation.

This CL makes 2nd and 3rd tests in
https://github.com/emscripten-core/emscripten/pull/14732 work.

Reviewed By: dschuff

Differential Revision: https://reviews.llvm.org/D106525
The file was modifiedllvm/test/CodeGen/WebAssembly/lower-em-sjlj.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssembly.h
The file was addedllvm/test/CodeGen/WebAssembly/lower-em-ehsjlj.ll
The file was modifiedllvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp
Commit fed25ddc1c3de59aa1de27e95b349f86896ccb79 by gclayton
[LLDB][GUI] Expand selected thread tree item by default

This patch expands the tree item that corresponds to the selected thread
by default in the Threads window. Additionally, the tree root item is
always expanded, which is the process in the Threads window.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D100243
The file was addedlldb/test/API/commands/gui/expand-threads-tree/TestGuiExpandThreadsTree.py
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
The file was addedlldb/test/API/commands/gui/expand-threads-tree/main.c
The file was addedlldb/test/API/commands/gui/expand-threads-tree/Makefile
Commit ed5b4dbd3952ffa8970ae59faa7f7505cd28aa92 by gclayton
[LLDB][GUI] Add Arch Field

This patch adds an Arch field that inputs and validates an arch spec.

Differential Revision: https://reviews.llvm.org/D106564
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
Commit af000197c4214926bd7d0862d86f89aed5f20da6 by huberjn
[OpenMP] Always inline the OpenMP outlined function

This patch adds the always inline attribute to the outlined functions generated
by OpenMP regions. Because there is only a single instance of this function and
it always has internal linkage it is safe to inline in every instance it is
created. This could potentially lead to performance degredation due to
inflated register counts in the parallel region.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D106799
The file was modifiedclang/test/OpenMP/nvptx_target_parallel_reduction_codegen_tbaa_PR46146.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
Commit a48ee9f25581d0d6cbf2b1205777e7d53023797f by aheejin
[WebAssembly] Remove dominator dependency in WasmEHPrepare (NFC)

Dominator trees were previously used for an optimization related to
`wasm.lsda` but the optimization was removed in D97309. Currently
dominators are not doing anything in this pass. Also removes some
`include` lines without which it compiles.

Reviewed By: tlively

Differential Revision: https://reviews.llvm.org/D106811
The file was modifiedllvm/lib/CodeGen/WasmEHPrepare.cpp
Commit c658b472f3e61e1818e1909bf02f3d65470018a5 by Amara Emerson
[GlobalISel] Add a constant folding combine.

Use it AArch64 post-legal combiner. These don't always get folded because when
the instructions are created the constants are obscured by artifacts.

Differential Revision: https://reviews.llvm.org/D106776
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-128.ll
The file was modifiedllvm/test/CodeGen/AArch64/fold-global-offsets.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/fshr.ll
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-constant-fold.mir
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i32.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/fshl.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/urem.i32.ll
Commit 8f41431654fedac4a5ad2751056a611bfc7751f0 by psteinfeld
[flang] Disallow BOZ literal constants as arguments of implicit interfaces

Since BOZ literal arguments are typeless, we cannot know how to pass them as
actual arguments to procedures with implicit interfaces.  This change avoids
the problem by emitting an error message in such situations.

This change stemmed from the following issue --
  https://github.com/flang-compiler/f18-llvm-project/issues/794

Differential Revision: https://reviews.llvm.org/D106831
The file was modifiedflang/lib/Semantics/check-call.cpp
The file was modifiedflang/test/Semantics/boz-literal-constants.f90
Commit c5d8bd5a35cbd325c6ccd42afa91bad06d261f07 by i
[llvm-objcopy] Fix section group flag read/write when operating on a cross-endian object file
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp
Commit 172051a1f4b1a007a2dbc46f8efb5e650b016d3b by Amara Emerson
[AArch64][GlobalISel] Add identity combines to post-legal combiner.

We see some shifts of zero emitted during legalization.

Differential Revision: https://reviews.llvm.org/D106816
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-atomic-128.ll
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-combiner-identity.mir
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizercombiner-select.mir
The file was modifiedllvm/test/CodeGen/AArch64/fold-global-offsets.ll
Commit 1e1b5706c3f5e24b937878e592cf9907af368ec3 by arthur.j.odwyer
[libc++] Fix spacing in <vector>. NFCI.

Thanks to gAlfonso-bit for the patch!

Differential Revision: https://reviews.llvm.org/D106691
The file was modifiedlibcxx/include/vector
Commit 58aa3881bac60a497168449b9087e3ebef85a3d8 by jurahul
[MLIR][SCF][NFC] Fix typo in documentation of scf.while

- `scf.yield` in the "after" region supplies new arguments to the "before" region.

Differential Revision: https://reviews.llvm.org/D106806
The file was modifiedmlir/include/mlir/Dialect/SCF/SCFOps.td
Commit b50fb58695b4fa2b60e0003980b158a717638180 by leonardchan
[compiler-rt][hwasan][fuchsia] Define shadow bound globals

These are required by MemIsShadow for checking if an address actually is shadow memory.

Differential Revision: https://reviews.llvm.org/D105745
The file was modifiedcompiler-rt/lib/hwasan/hwasan_fuchsia.cpp
Commit 3c3269559ba9400224400b96c22b31812638de52 by mgorny
[lldb] [gdb-remote client] Avoid zero padding PID/TID in H packet

Change SetCurrentThread*() logic not to include the zero padding
in PID/TID that was a side effect of 02ef0f5ab483.  This should fix
problems caused by sending 64-bit integers to 32-bit servers.  Reported
by Ted Woodward.

Differential Revision: https://reviews.llvm.org/D106832
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
The file was modifiedlldb/unittests/Process/gdb-remote/GDBRemoteCommunicationClientTest.cpp
Commit a9b114c5dd68685e0e68dd9144454b44509c2f5f by rnk
Disable the new enum i128 test under ASan, it uncovers an existing leak

See llvm.org/pr51221
The file was modifiedclang/test/CodeGenCXX/debug-info-enum-i128.cpp
Commit 71af002d151ef9a162c8a776c22b46893f923af0 by leonardchan
[compiler-rt][hwasan][fuchsia] Implement InitializeOsSupport

This is empty for now, but we will add a check that TBI is enabled once the
tagged pointer ABI for zircon is finalized. This depends on D105667.

Differential Revision: https://reviews.llvm.org/D105668
The file was modifiedcompiler-rt/lib/hwasan/hwasan_fuchsia.cpp