SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers (details)
  2. [libcxx] [test] Add another (void) cast for a function marked nodiscard in MS STL (details)
  3. [libcxx] [test] Mark bits of fs.enum tests as libcpp specific (details)
  4. [libcxx] [test] Move use of statvfs to helper header (details)
  5. [driver][arm64] Set target CPU to A12 for compiler invocations that (details)
  6. [DWARFLinker] Capitalize type names (NFC) (details)
  7. [ShrinkWrap] Delete unneeded nullptr checks for the save point. NFC (details)
  8. [InstructionSimplify] icmp (X+Y), (X+Z) simplification (details)
  9. Revert "[DWARFLinker] Capitalize type names (NFC)" (details)
  10. [SCEV][NFC] Rename getMax -> getConstantMax (details)
  11. [libc++] Update continous integration scripts (details)
  12. [llvm-mca] Improve test case (details)
  13. [X86] Add User Interrupts(UINTR) instructions (details)
  14. [SCEV][NFC] Rename MaxAndComplete -> ConstantMaxAndComplete (details)
  15. [gn build] Port be39a6fe6fc (details)
  16. [RISCV][NFC] Add more tests for 32-bit constant materialization (details)
  17. [SCEV][NFC] Simplify internals of BackedgeTakenInfo (details)
  18. [mlir] Add MemRefReshapeOp definition to Standard. (details)
  19. [clang-tidy] Add links to check docs in comments (details)
  20. [x86 testing] NFC: Create exhaustive vector popcnt ULT/UGT tests (details)
  21. [DebugInstrRef] Substitute debug value numbers to handle optimizations (details)
  22. Test I added requires X86 to be built. (details)
  23. [AArch64] Add cost model tests for min/max intrinsics. (details)
  24. [lldb][NFC] Make GetShellSafeArgument return std::string and unittest it. (details)
  25. [mlir] Add MemRefReinterpretCastOp definition to Standard. (details)
  26. [llvm-mca] Add few ldm* instructions to cortex-a57 test case (details)
  27. [CodeGen] Split MVT::changeTypeToInteger() functionality from EVT::changeTypeToInteger(). (details)
  28. [Clang] [TableGen] Clean up !if(!eq(bool, 1) and related booleans (details)
  29. [lldb] Explicitly use the configuration architecture when building test executables (details)
  30. [mlir] Convert from Async dialect to LLVM coroutines (details)
  31. [TableGen] Continue improving the comments for the data structures. (details)
  32. [OpenMP] Emit calls to int64_t functions for amdgcn (details)
  33. Limit debug instr-referencing tests to X86 (details)
  34. ScheduleDAGInstrs: Skip debug instructions at end of scheduling region (details)
  35. AMDGPU: Implement getNoPreservedMask (details)
  36. AMDGPU: Fix not always reserving VGPRs used for SGPR spilling (details)
  37. [lldb] Fix TestTargetAPI.py on Apple simulators (details)
  38. [AArch64] Add min/max cost-model tests for v4i16. (details)
  39. [DebugInstrRef] Pass DBG_INSTR_REFs through register allocation (details)
  40. [X86] Return const& in IntelExprStateMachine::getIdentifierInfo(). NFCI. (details)
  41. [X86] X86AsmParser - make methods const where possible. NFCI. (details)
  42. [ARM][SchedModels] Convert IsLdstsoScaledPred to MCSchedPredicate (details)
  43. [AArch64] Add min/max cost-model tests for v2i32. (details)
  44. [AMDGPU] Fix expansion of i16 MULH (details)
  45. [mlir][gpu] NFC: switch occurrences of gpu.launch_func to custom format. (details)
  46. [MemProf] Allow the binary to specify the profile output filename (details)
  47. [mlir] Do not start threads in AsyncRuntime (details)
  48. [lldb] Fix a regression introduced by D75730 (details)
  49. [LoopRotate][NPM] Disable header duplication under -Oz (details)
  50. [NFC][MC] Use MCRegister for ReachingDefAnalysis APIs (details)
  51. [HIP] Fix HIP rounding math intrinsics (details)
  52. [OpenCL] Remove unused extensions (details)
  53. [lldb/DWARF] Add support for DW_OP_implicit_value (details)
  54. [Docs] Clarify that FunctionPasses can't add/remove declarations (details)
  55. [gn build] Add missing clangd dependencies (details)
  56. [AMDGPU] Add amdgpu specific loop threshold metadata (details)
  57. [SLP] Add tests with selects that can be turned into min/max. (details)
  58. [DomTree] Accept Value as Def (NFC) (details)
Commit 5449ea9f90ea8e0adb1f8427b82dd30ccb31d96c by martin
[libcxxabi] Define _LIBCXXABI_WEAK properly for mingw compilers

Copy over the compiler detection structure from libcxx, and set
_LIBCXXABI_WEAK like _LIBCPP_WEAK is set in libcxx.

This allows users to override operator new/delete, if using those
operators from libcxxabi instead of from libcxx.

Differential Revision: https://reviews.llvm.org/D89863
The file was modifiedlibcxxabi/include/__cxxabi_config.h
Commit 586892d583a05d53fce4f04aa2bffc5603aaec74 by martin
[libcxx] [test] Add another (void) cast for a function marked nodiscard in MS STL

Differential Revision: https://reviews.llvm.org/D89867
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
Commit 545fb7a71c0c7e73b1d40ba1263d603ac6b17968 by martin
[libcxx] [test] Mark bits of fs.enum tests as libcpp specific

The individual enum values in copy_options and file_type aren't
specified in the standard.

The standard doesn't require fs::path::format to be a scoped enum.

Differential Revision: https://reviews.llvm.org/D89866
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp
Commit 78ba1e93a6f25c0b4266e96e5628b325a5da31b6 by martin
[libcxx] [test] Move use of statvfs to helper header

Implement the corresponding thing using windows functions as well.

Differential Revision: https://reviews.llvm.org/D89864
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.space/space.pass.cpp
The file was modifiedlibcxx/test/support/filesystem_test_helper.h
Commit de1016ce5cdca2df51c00fbc5d3a750d5d72364a by Alex Lorenz
[driver][arm64] Set target CPU to A12 for compiler invocations that
target Apple Silicon macOS machines

Differential Revision: https://reviews.llvm.org/D82699
The file was modifiedllvm/include/llvm/ADT/Triple.h
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was modifiedclang/test/Preprocessor/aarch64-target-features.c
The file was addedclang/test/Driver/aarch64-mac-cpus.c
Commit 3fce5ea7ce663410d3fb533528158bdab3a3604e by Jonas Devlieghere
[DWARFLinker] Capitalize type names (NFC)

Make these types conform to the LLVM Coding Standards:

> Type names (including classes, structs, enums, typedefs, etc) should
> be nouns and start with an upper-case letter.
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFStreamer.h
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFLinker.h
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.cpp
Commit b0c12474ed16738faee42af6f727806517fb8b83 by i
[ShrinkWrap] Delete unneeded nullptr checks for the save point. NFC

findNearestCommonDominator never returns nullptr.
The file was modifiedllvm/lib/CodeGen/ShrinkWrap.cpp
Commit 51d7df3fa1c3ebd65f72c021074b7aeb43dac8c3 by sjoerd.meijer
[InstructionSimplify] icmp (X+Y), (X+Z) simplification

This improves simplifications for pattern `icmp (X+Y), (X+Z)` -> `icmp Y,Z`
if only one of the operands has NSW set, e.g.:

    icmp slt (x + 0), (x +nsw 1)

We can still safely rewrite this to:

    icmp slt 0, 1

because we know that the LHS can't overflow if the RHS has NSW set and
C1 < C2 && C1 >= 0, or C2 < C1 && C1 <= 0

This simplification is useful because ScalarEvolutionExpander which is used to
generate code for SCEVs in different loop optimisers is not always able to put
back NSW flags across control-flow, thus inhibiting CFG simplifications.

Differential Revision: https://reviews.llvm.org/D89317
The file was modifiedllvm/test/Transforms/InstSimplify/compare.ll
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
Commit 113ad90a3422602021beaad81591af370dfae878 by mkazantsev
Revert "[DWARFLinker] Capitalize type names (NFC)"

This reverts commit 3fce5ea7ce663410d3fb533528158bdab3a3604e.

`make check` broken.
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFStreamer.h
The file was modifiedllvm/tools/dsymutil/DwarfLinkerForBinary.cpp
The file was modifiedllvm/include/llvm/DWARFLinker/DWARFLinker.h
Commit 6379090ea7ce2a76efe8aebb3b63bc0fdf85fc78 by mkazantsev
[SCEV][NFC] Rename getMax -> getConstantMax

This better reflects what this logic actually does.
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 40f360c2e90bd833f648a614db441020eeabe925 by goncharov.mikhail
[libc++] Update continous integration scripts

Now libc++ pipeline will be triggered from the "premerge-checks" and the
combined result are going to be returned to Harbormaster.

Reviewed-by: ldionne

Differential Revision: https://reviews.llvm.org/D89113
The file was addedlibcxx/utils/ci/buildkite-pipeline-premerge.sh
The file was modifiedlibcxx/utils/ci/run-buildbot.sh
The file was addedlibcxx/utils/ci/buildkite-pipeline-snapshot.sh
The file was modifiedlibcxx/utils/ci/buildkite-pipeline.yml
Commit efcb3952e0e90a49ed354d04dbde713cc6258ae1 by eleviant
[llvm-mca] Improve test case
The file was modifiedllvm/test/tools/llvm-mca/ARM/cortex-a57-memory-instructions.s
Commit be39a6fe6fc6c30186152863a7fac624e22262f7 by pengfei.wang
[X86] Add User Interrupts(UINTR) instructions

For more details about these instructions, please refer to the latest
ISE document:
https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D89301
The file was addedclang/lib/Headers/uintrintrin.h
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/lib/Basic/Targets/X86.cpp
The file was addedllvm/test/CodeGen/X86/uintr-intrinsics.ll
The file was modifiedclang/include/clang/Basic/BuiltinsX86_64.def
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.td
The file was modifiedllvm/docs/ReleaseNotes.rst
The file was modifiedllvm/lib/Target/X86/X86Subtarget.h
The file was modifiedclang/lib/Headers/x86gprintrin.h
The file was addedclang/test/CodeGen/X86/x86-uintr-builtins.c
The file was modifiedclang/test/Driver/x86-target-features.c
The file was modifiedclang/test/Preprocessor/predefined-arch-macros.c
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.h
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedclang/lib/Basic/Targets/X86.h
The file was modifiedllvm/test/MC/Disassembler/X86/x86-64.txt
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedllvm/test/MC/X86/x86-64.s
The file was modifiedclang/lib/Headers/cpuid.h
The file was modifiedclang/lib/Headers/CMakeLists.txt
The file was modifiedllvm/include/llvm/Support/X86TargetParser.def
The file was modifiedllvm/lib/Support/X86TargetParser.cpp
The file was modifiedllvm/include/llvm/IR/IntrinsicsX86.td
The file was modifiedllvm/lib/Target/X86/X86.td
The file was modifiedclang/test/Preprocessor/x86_target_features.c
The file was modifiedllvm/lib/Support/Host.cpp
Commit e2858bf633b548cbf4e31b6b10852fccde940270 by mkazantsev
[SCEV][NFC] Rename MaxAndComplete -> ConstantMaxAndComplete

This better reflects what this variable is about.
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit 1c3bbdb866ab9b660583f5bc8d161b7ee8771cd2 by llvmgnsyncbot
[gn build] Port be39a6fe6fc
The file was modifiedllvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
Commit 89840380d56e7cf4511d03cb9f42b6bed322e0bc by luismarques
[RISCV][NFC] Add more tests for 32-bit constant materialization

The existing tests were mostly for 64-bit constants.

Differential Revision: https://reviews.llvm.org/D83210
The file was modifiedllvm/test/CodeGen/RISCV/imm.ll
Commit cc2eb3b5e2582da2412f6d30955ddbd9b0f3a16a by mkazantsev
[SCEV][NFC] Simplify internals of BackedgeTakenInfo
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/include/llvm/Analysis/ScalarEvolution.h
Commit d2ed2f16b853a936c8d0c1c1fc406e7b8e54526c by pifon
[mlir] Add MemRefReshapeOp definition to Standard.

https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15

Differential Revision: https://reviews.llvm.org/D89784
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/test/Dialect/Standard/ops.mlir
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Dialect/Standard/invalid.mlir
Commit 37558fd29ee0af2302c051b8e70543cfc3e7ca91 by alexfh
[clang-tidy] Add links to check docs in comments
The file was modifiedclang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/OverloadedUnaryAndCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/ExplicitMakePairCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/AvoidUnderscoreInGoogletestNameCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/GlobalNamesInHeadersCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/IntegerTypesCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/UnnamedNamespaceInHeaderCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/DefaultArgumentsCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/UsingNamespaceDirectiveCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/TodoCommentCheck.h
The file was modifiedclang-tools-extra/clang-tidy/google/ExplicitConstructorCheck.h
Commit 8556f38b0d6268103a6da08dc01c360f8e20fc32 by dave
[x86 testing] NFC: Create exhaustive vector popcnt ULT/UGT tests

There are bunch of optimization opportunities right now in the vector
popcnt code gen when doing simple less-than/greater-than comparisons, so
let's examine them all to ensure that things don't regress as different
scenarios are fixed. We can always delete some later once some fixes are
made.

Please note: the new files were auto-generated. If people want, I can
commit the short C code that printed out the various combinations.
The file was addedllvm/test/CodeGen/X86/vector-popcnt-256-ult-ugt.ll
The file was addedllvm/test/CodeGen/X86/vector-popcnt-128-ult-ugt.ll
The file was modifiedllvm/test/CodeGen/X86/vector-popcnt-256.ll
The file was addedllvm/test/CodeGen/X86/vector-popcnt-512-ult-ugt.ll
The file was modifiedllvm/test/CodeGen/X86/vector-popcnt-512.ll
The file was modifiedllvm/test/CodeGen/X86/vector-popcnt-128.ll
Commit d73275993bbc19b38b7818e96953f84decf0653b by jeremy.morse
[DebugInstrRef] Substitute debug value numbers to handle optimizations

This patch touches two optimizations, TwoAddressInstruction and X86's
FixupLEAs pass, both of which optimize by re-creating instructions. For
LEAs, various bits of arithmetic are better represented as LEAs on X86,
while TwoAddressInstruction sometimes converts instrs into three address
instructions if it's profitable.

For debug instruction referencing, both of these require substitutions to
be created -- the old instruction number must be pointed to the new
instruction number, as illustrated in the added test. If this isn't done,
any variable locations based on the optimized instruction are
conservatively dropped.

Differential Revision: https://reviews.llvm.org/D85756
The file was modifiedllvm/lib/CodeGen/TwoAddressInstructionPass.cpp
The file was modifiedllvm/lib/Target/X86/X86FixupLEAs.cpp
The file was addedllvm/test/DebugInfo/MIR/InstrRef/twoaddr-to-threeaddr-sub.mir
Commit cb668d2e76e73ab45913d9dd3d0c44d48a21d36a by jeremy.morse
Test I added requires X86 to be built.

This the second time I've stepped on this landmine, I'll look at setting
a lit local config. All the tests in this dir are going to be X86 for now.
The file was modifiedllvm/test/DebugInfo/MIR/InstrRef/twoaddr-to-threeaddr-sub.mir
Commit fbb6375db0be912451646f14a35231d18cd91adf by flo
[AArch64] Add cost model tests for min/max intrinsics.
The file was addedllvm/test/Analysis/CostModel/AArch64/min-max.ll
Commit bb1d702e25f5f23e8d5a755295f2921caaea2abb by Raphael Isemann
[lldb][NFC] Make GetShellSafeArgument return std::string and unittest it.
The file was modifiedlldb/include/lldb/Utility/Args.h
The file was modifiedlldb/unittests/Utility/ArgsTest.cpp
The file was modifiedlldb/source/Utility/Args.cpp
The file was modifiedlldb/source/Host/common/ProcessLaunchInfo.cpp
Commit 461605c418e9059aa50de65c60bbd49e8f270b4a by pifon
[mlir] Add MemRefReinterpretCastOp definition to Standard.

Reuse most code for printing/parsing/verification from SubViewOp.

https://llvm.discourse.group/t/rfc-standard-memref-cast-ops/1454/15

Differential Revision: https://https://reviews.llvm.org/D89720
The file was modifiedmlir/test/Dialect/Standard/invalid.mlir
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/test/Dialect/Standard/ops.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
Commit 088f3c83cc8fad7765a4dfd386519ffa6799be6c by eleviant
[llvm-mca] Add few ldm* instructions to cortex-a57 test case
The file was modifiedllvm/test/tools/llvm-mca/ARM/cortex-a57-memory-instructions.s
Commit 794dc7ad26c21064a282046277bdb53c8d9690d5 by llvm-dev
[CodeGen] Split MVT::changeTypeToInteger() functionality from EVT::changeTypeToInteger().

Add the MVT equivalent handling for EVT changeTypeToInteger/changeVectorElementType/changeVectorElementTypeToInteger.

All the SimpleVT code already exists inside the EVT equivalents, but by splitting this out we can use these directly inside MVT types without converting to/from EVT.
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.h
Commit e4b4543ff0c83b6f1d80064e2dcd22b2bb0bfab6 by paul
[Clang] [TableGen] Clean up !if(!eq(bool, 1) and related booleans

Differential Revision: https://reviews.llvm.org/D89893
The file was modifiedclang/include/clang/Basic/arm_mve_defs.td
The file was modifiedclang/include/clang/Basic/arm_mve.td
Commit 41185226f6d80663b4a1064c6f47581ee567d78d by Raphael Isemann
[lldb] Explicitly use the configuration architecture when building test executables

The Darwin builder currently assumes in `getArchCFlags` that the passed `arch`
value is an actual string it can string.join with vendor/os/version/env strings:

```
   triple = '-'.join([arch, vendor, os, version, env])
```

However this is not true for most tests as we just pass down the `arch=None`
default value from `TestBase.build`. This causes that if we actually end up in
this function we just error out when concatenating `None` with the other actual
strings of vendor/os/version/env. What we should do instead is check that if
there is no test-specific architecture that we fall back to the configuration's
architecture value.

It seems we already worked around this in `builder.getArchSpec` by explicitly
falling back to the architecture specified in the configuration.

This patch just moves this fallback logic to the top `build` function so that it
affects all functions called from `TestBase.build`.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D89056
The file was modifiedlldb/packages/Python/lldbsuite/test/builders/builder.py
The file was modifiedlldb/packages/Python/lldbsuite/test/lldbtest.py
Commit f8fcff5a9d7ee948add3f28382d4ced5710edaaf by ezhulenev
[mlir] Convert from Async dialect to LLVM coroutines

Lower from Async dialect to LLVM by converting async regions attached to `async.execute` operations into LLVM coroutines (https://llvm.org/docs/Coroutines.html):
1. Outline all async regions to functions
2. Add LLVM coro intrinsics to mark coroutine begin/end
3. Use MLIR conversion framework to convert all remaining async types and ops to LLVM + Async runtime function calls

All `async.await` operations inside async regions converted to coroutine suspension points. Await operation outside of a coroutine converted to the blocking wait operations.

Implement simple runtime to support concurrent execution of coroutines.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D89292
The file was addedmlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
The file was addedmlir/include/mlir/Conversion/AsyncToLLVM/AsyncToLLVM.h
The file was modifiedmlir/lib/ExecutionEngine/OptUtils.cpp
The file was addedmlir/test/Conversion/AsyncToLLVM/convert-to-llvm.mlir
The file was addedmlir/test/mlir-cpu-runner/async.mlir
The file was addedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/include/mlir/Dialect/Async/IR/AsyncOps.td
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was addedmlir/include/mlir/ExecutionEngine/AsyncRuntime.h
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was modifiedmlir/test/CMakeLists.txt
Commit b2faf75568717397a7fced8fe93bbc013df77aaf by paul
[TableGen] Continue improving the comments for the data structures.

Differential Revision: https://reviews.llvm.org/D89901
The file was modifiedllvm/docs/TableGen/BackGuide.rst
The file was modifiedllvm/include/llvm/TableGen/Record.h
Commit 09bc755deaa69b1377a8c050131f67cd276a51f3 by jonchesterfield
[OpenMP] Emit calls to int64_t functions for amdgcn

[OpenMP] Emit calls to int64_t functions for amdgcn

Two functions, syncwarp and active_thread_mask, return lanemask_t. Currently
this is assumed to be int32, which is true for nvptx. Patch makes the type
target architecture dependent.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D89746
The file was addedllvm/test/Transforms/OpenMP/add_attributes_amdgcn.ll
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
The file was modifiedllvm/test/Transforms/OpenMP/add_attributes.ll
Commit e3c6b0f1514c8e3fceb5f5451e672c9394aa9460 by jeremy.morse
Limit debug instr-referencing tests to X86

The instruction referencing work currently only works on X86, and all the
tests for it will be X86 based for the time being. Configure the whole
directory to be X86-only, seeing how I keep on landing tests that don't
have the correct REQUIRES lines.
The file was addedllvm/test/DebugInfo/MIR/InstrRef/lit.local.cfg
Commit 188df1742042610a4c9af1fff9943d3d2a2740c6 by Matthew.Arsenault
ScheduleDAGInstrs: Skip debug instructions at end of scheduling region

If the end instruction of the scheduling region was a DBG_VALUE, the
uses of the debug instruction were tracked as if they were real
uses. This would then hit the deadDefHasNoUse assertion in
addVRegDefDeps if the only use was the debug instruction.
The file was modifiedllvm/lib/CodeGen/ScheduleDAGInstrs.cpp
The file was addedllvm/test/CodeGen/AMDGPU/dbg-value-ends-sched-region.mir
Commit d3bcfe2a3602e14606417d8bb9d6bbaf636d9a02 by Matthew.Arsenault
AMDGPU: Implement getNoPreservedMask

We don't support funclets for exception handling and I hit this when
manually reducing MIR.
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUCallingConv.td
The file was addedllvm/test/CodeGen/AMDGPU/return-with-successors.mir
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
Commit d5c05616679894b3eb99194f1a3ffeef07c5cb19 by Matthew.Arsenault
AMDGPU: Fix not always reserving VGPRs used for SGPR spilling

The VGPRs used for SGPR spills need to be reserved, even if we aren't
speculatively reserving one.

This was broken by 117e5609e98b43f925c678b72f816ad3a1c3eee7.
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
Commit 30d5590d171c40e05b65585d1b531d8489e783e2 by Raphael Isemann
[lldb] Fix TestTargetAPI.py on Apple simulators

This test checks that the output of `SBTarget.GetDescription()` contains the
substrings `'a.out', 'Target', 'Module', 'Breakpoint'` in that order. This test
is currently failing on Apple simulators as apparently 'Module' can't be found
in the output after 'Target".

The reason for that is that the actual output of `SBTarget.GetDescription()` looks like this:
```
Target
  Module /build/path/lldb-test-build.noindex/python_api/target/TestTargetAPI.test_get_description_dwarf/a.out
0x7ff2b6d3f990:     ObjectFileMachO64, file = /build/path/lldb-test-build.noindex/python_api/target/TestTargetAPI.test_get_description
[...]
0x7ff307150000:   BreakpointList with 0 Breakpoints:
<LLDB module output repeats for each loaded module>
```

Clearly the string order should be `'Target', 'Module', 'a.out', 'Breakpoint'`.
However, LLDB is also a bunch of system shared libraries (libxpc.dylib,
libobjc.A.dylib, etc.) when *not* running against a simulator, we end up
unintentionally finding the `'Target', 'Module', 'Breakpoint'` substrings in the
trailing descriptions of the system modules. When running against a simulator we
however don't load shared system libraries.

This patch just moves the substrings in the correct order to make this test pass
without having any shared library modules in the description output.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D89698
The file was modifiedlldb/test/API/python_api/target/TestTargetAPI.py
Commit d6efc87518b554254d2f7203ba1e8c0be3adb88d by flo
[AArch64] Add min/max cost-model tests for v4i16.
The file was modifiedllvm/test/Analysis/CostModel/AArch64/min-max.ll
Commit 68ac02c0dd2b8fda52ac132a86f72f2ad6b139a5 by jeremy.morse
[DebugInstrRef] Pass DBG_INSTR_REFs through register allocation

Both FastRegAlloc and LiveDebugVariables/greedy need to cope with
DBG_INSTR_REFs. None of them actually need to take any action, other than
passing DBG_INSTR_REFs through: variable location information doesn't refer
to any registers at this stage.

LiveDebugVariables stashes the instruction information in a tuple, then
re-creates it later. This is only necessary as the register allocator
doesn't expect to see any debug instructions while it's working. No
equivalence classes or interval splitting is required at all!

No changes are needed for the fast register allocator, as it just ignores
debug instructions. The test added checks that both of them preserve
DBG_INSTR_REFs.

This also expands ScheduleDAGInstrs.cpp to treat DBG_INSTR_REFs the same as
DBG_VALUEs when rescheduling instructions around. The current movement of
DBG_VALUEs around is less than ideal, but it's not a regression to make
DBG_INSTR_REFs subject to the same movement.

Differential Revision: https://reviews.llvm.org/D85757
The file was addedllvm/test/DebugInfo/MIR/InstrRef/survives-livedebugvars.mir
The file was modifiedllvm/lib/CodeGen/ScheduleDAGInstrs.cpp
The file was modifiedllvm/lib/CodeGen/LiveDebugVariables.cpp
Commit 091b18ba81fc1c9774f36df0d903d75aa72b64fb by llvm-dev
[X86] Return const& in IntelExprStateMachine::getIdentifierInfo(). NFCI.

Avoid unnecessary copy in X86AsmParser::ParseIntelOperand
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Commit 26929780506c3492dddd980da728a92f050fe069 by llvm-dev
[X86] X86AsmParser - make methods const where possible. NFCI.

Reported by cppcheck
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Commit ed6a91f4567ead72ffb34975863575348ecf0674 by eleviant
[ARM][SchedModels] Convert IsLdstsoScaledPred to MCSchedPredicate

Differential revision: https://reviews.llvm.org/D89939
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMSchedule.td
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
The file was modifiedllvm/test/tools/llvm-mca/ARM/cortex-a57-memory-instructions.s
The file was modifiedllvm/lib/Target/ARM/ARMScheduleA57.td
Commit c1705e0ba481b3bf6a7f256ba8948d21ab78907e by flo
[AArch64] Add min/max cost-model tests for v2i32.
The file was modifiedllvm/test/Analysis/CostModel/AArch64/min-max.ll
Commit 7ae0033ca88126a14be65d09a11a6f9e0b72262e by Piotr Sobczak
[AMDGPU] Fix expansion of i16 MULH

This commit marks i16 MULH as expand in AMDGPU backend,
which is necessary after the refactoring in D80485.

Differential Revision: https://reviews.llvm.org/D89965
The file was modifiedllvm/test/CodeGen/AMDGPU/srem.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit 9ab5362baba6770384821d9c59cfedb9c418d7e4 by csigg
[mlir][gpu] NFC: switch occurrences of gpu.launch_func to custom format.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D89929
The file was modifiedmlir/test/mlir-vulkan-runner/addi.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/builtins.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/time.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/module-structure-opencl.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/loop.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/mulf.mlir
The file was modifiedmlir/test/Conversion/GPUToVulkan/lower-gpu-launch-vulkan-launch.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/subf.mlir
The file was modifiedmlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/load-store.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addi8.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/if.mlir
The file was modifiedmlir/test/mlir-vulkan-runner/addf.mlir
Commit 5c20d7db9f2791367b9311130eb44afecb16829c by tejohnson
[MemProf] Allow the binary to specify the profile output filename

This will allow the output directory to be specified by a build time
option, similar to the directory specified for regular PGO profiles via
-fprofile-generate=. The memory profiling instrumentation pass will
set up the variable. This is the same mechanism used by the PGO
instrumentation and runtime.

Depends on D87120 and D89629.

Differential Revision: https://reviews.llvm.org/D89086
The file was modifiedcompiler-rt/lib/memprof/memprof_rtl.cpp
The file was modifiedcompiler-rt/lib/memprof/weak_symbols.txt
The file was modifiedcompiler-rt/test/memprof/TestCases/log_path_test.cpp
The file was modifiedcompiler-rt/lib/memprof/memprof_interface_internal.h
Commit a8b0ae3bddee311cbc97801089a95702f32773f8 by ezhulenev
[mlir] Do not start threads in AsyncRuntime

pthreads is not enabled for all builds by default

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D89967
The file was modifiedmlir/lib/ExecutionEngine/AsyncRuntime.cpp
Commit 826997c46280351861be43522d4a022d8fdbc466 by Jonas Devlieghere
[lldb] Fix a regression introduced by D75730

In a new Range class was introduced to simplify and the Disassembler API
and reduce duplication. It unintentionally broke the
SBFrame::Disassemble functionality because it unconditionally converts
the number of instructions to a Range{Limit::Instructions,
num_instructions}. This is subtly different from the previous behavior,
where now we're passing a Range and assume it's valid in the callee, the
original code would propagate num_instructions and the callee would
compare the value and decided between disassembling instructions or
bytes.

Unfortunately the existing tests was not particularly strict:

  disassembly = frame.Disassemble()
  self.assertNotEqual(len(disassembly), 0, "Disassembly was empty.")

This would pass because without this patch we'd disassemble zero
instructions, resulting in an error:

  (lldb) script print(lldb.frame.Disassemble())
  error: error reading data from section __text

Differential revision: https://reviews.llvm.org/D89925
The file was modifiedlldb/include/lldb/Core/Disassembler.h
The file was modifiedlldb/test/API/commands/disassemble/basic/main.cpp
The file was modifiedlldb/test/API/commands/disassemble/basic/TestFrameDisassemble.py
The file was modifiedlldb/source/Core/Disassembler.cpp
The file was modifiedlldb/source/Target/StackFrame.cpp
Commit cb9ca3597727bb323576972a6a74b5897125b41a by aeubanks
[LoopRotate][NPM] Disable header duplication under -Oz

It was already disabled under -Oz in
buildFunctionSimplificationPipeline(), but not in
buildModuleOptimizationPipeline()/addPGOInstrPasses().

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D89927
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Transforms/LoopRotate/oz-disable.ll
Commit e24537d48fb382fd651154749634b4e6332e52f9 by mtrofin
[NFC][MC] Use MCRegister for ReachingDefAnalysis APIs

Also updated the users of the APIs; and a drive-by small change to
RDFRegister.cpp

Differential Revision: https://reviews.llvm.org/D89912
The file was modifiedllvm/include/llvm/CodeGen/ReachingDefAnalysis.h
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp
The file was modifiedllvm/lib/CodeGen/RDFRegisters.cpp
The file was modifiedllvm/lib/CodeGen/BreakFalseDeps.cpp
Commit b2524eb9445a4487115c8f94fd946d2c4c95f652 by enye.shi
[HIP] Fix HIP rounding math intrinsics

The __ocml_*_rte_f32 and __ocml_*_rte_f64 functions are not
available if OCML_BASIC_ROUNDED_OPERATIONS is not defined.

Reviewed By: b-sumner, yaxunl

Fixes: SWDEV-257235

Differential Revision: https://reviews.llvm.org/D89966
The file was modifiedclang/lib/Headers/__clang_hip_math.h
Commit a779a169931c0738bf43dc50fc545c1e88597e92 by marco.antognini
[OpenCL] Remove unused extensions

Many non-language extensions are defined but also unused. This patch
removes them with their tests as they do not require compiler support.

The cl_khr_select_fprounding_mode extension is also removed because it
has been deprecated since OpenCL 1.1 and Clang doesn't have any specific
support for it.

The cl_khr_context_abort extension is only referred to in "The OpenCL
Specification", version 1.2 and 2.0, in Table 4.3, but no specification
is provided in "The OpenCL Extension Specification" for these versions.
Because it is both unused in Clang and lacks specification, this
extension is removed.

The following extensions are platform extensions that bring new OpenCL
APIs but do not impact the kernel language nor require compiler support.
They are therefore removed.

- cl_khr_gl_sharing, introduced in OpenCL 1.0

- cl_khr_icd, introduced in OpenCL 1.2

- cl_khr_gl_event, introduced in OpenCL 1.1
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquireGLObjects.
Hence, they cannot be used on the device side and the extension does
not impact the kernel language.

- cl_khr_d3d10_sharing, introduced in OpenCL 1.1

- cl_khr_d3d11_sharing, introduced in OpenCL 1.2

- cl_khr_dx9_media_sharing, introduced in OpenCL 1.2

- cl_khr_image2d_from_buffer, introduced in OpenCL 1.2

- cl_khr_initialize_memory, introduced in OpenCL 1.2

- cl_khr_gl_depth_images, introduced in OpenCL 1.2
Note: this extension is related to cl_khr_depth_images but only the
latter adds new features to the kernel language.

- cl_khr_spir, introduced in OpenCL 1.2

- cl_khr_egl_event, introduced in OpenCL 1.2
Note: this extension adds a new API to create cl_event but it also
specifies that these can only be used by clEnqueueAcquire* API
functions. Hence, they cannot be used on the device side and the
extension does not impact the kernel language.

- cl_khr_egl_image, introduced in OpenCL 1.2

- cl_khr_terminate_context, introduced in OpenCL 1.2

The minimum required OpenCL version used in OpenCLExtensions.def for
these extensions is not always correct. Removing these address that
issue.

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D89372
The file was modifiedclang/include/clang/Basic/OpenCLExtensions.def
The file was modifiedclang/test/SemaOpenCL/extension-version.cl
The file was modifiedclang/test/Misc/nvptx.languageOptsOpenCL.cl
The file was modifiedclang/lib/Basic/Targets/AMDGPU.h
The file was modifiedclang/lib/Basic/Targets/NVPTX.h
The file was modifiedclang/test/Misc/amdgcn.languageOptsOpenCL.cl
The file was modifiedclang/test/Misc/r600.languageOptsOpenCL.cl
Commit efe62b637d51f6d622589132075320dd4f687478 by medismail.bennani
[lldb/DWARF] Add support for DW_OP_implicit_value

This patch completes https://reviews.llvm.org/D83560. Now that the
compiler can emit `DW_OP_implicit_value` into DWARF expressions, lldb
needed to learn reading these opcodes for variable inspection and
expression evaluation.

This implicit location descriptor specifies an immediate value with two
operands: the length (ULEB128) followed by a block representing the value
in the target memory representation.

rdar://67406091

Differential revision: https://reviews.llvm.org/D89842

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/source/Expression/DWARFExpression.cpp
The file was modifiedlldb/unittests/Expression/DWARFExpressionTest.cpp
Commit 710676cf3a3c6f6ddf2f18e24cac017d20dac1ff by aeubanks
[Docs] Clarify that FunctionPasses can't add/remove declarations

In preparation for potential future concurrency, a FunctionPass
shouldn't modify anything at the module level that other FunctionPasses
can also modify.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89890
The file was modifiedllvm/docs/WritingAnLLVMPass.rst
Commit af3c51e3546eccff714ec146fb8daf18177e2028 by aeubanks
[gn build] Add missing clangd dependencies

Fixes
$ ninja obj/build/rel/gen/clang-tools-extra/clangd/CompletionModel.CompletionModel.obj

Some tablegen include files from clang/include/clang/AST and
clang/include/clang/Sema need to be generated before CompletionModel is
compiled.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D89657
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/quality/gen_decision_forest.gni
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/clangd/BUILD.gn
Commit 3c1273d7378e1d51abf9b43c764ccb9828e4a26a by tcorring
[AMDGPU] Add amdgpu specific loop threshold metadata

Add new loop metadata amdgpu.loop.unroll.threshold to allow the initial AMDGPU
specific unroll threshold value to be specified on a loop by loop basis.

The intention is to be able to to allow more nuanced hints, e.g. specifying a
low threshold value to indicate that a loop may be unrolled if cheap enough
rather than using the all or nothing llvm.loop.unroll.disable metadata.

Differential Revision: https://reviews.llvm.org/D84779
The file was addedllvm/test/Transforms/LoopUnroll/AMDGPU/unroll-threshold.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
Commit d842b8868771a9b6b039144c1f7550adec245f0c by flo
[SLP] Add tests with selects that can be turned into min/max.

AArch64 does not have a flexible vector select instruction. In some
cases, the selects can be turned into min/max however, for which there
are dedicated vector instructions on AArch64.

This patch adds some tests for such cases.
The file was addedllvm/test/Transforms/SLPVectorizer/AArch64/vectorizable-selects-min-max.ll
Commit 32b6e9a450fff59690a3a7c828524c176d8b855e by nikita.ppv
[DomTree] Accept Value as Def (NFC)

Non-instruction defs like arguments, constants or global values
always dominate all instructions/uses inside the function. This
case currently needs to be treated separately by the caller, see
https://reviews.llvm.org/D89623#inline-832818 for an example.

This patch makes the dominator tree APIs accept a Value instead of
an Instruction and always returns true for the non-Instruction case.

A complication here is that BasicBlocks are also Values. For that
reason we can't support the dominates(Value *, BasicBlock *)
variant, as it would conflict with dominates(BasicBlock *, BasicBlock *),
which has different semantics. For the other two APIs we assert
that the passed value is not a BasicBlock.

Differential Revision: https://reviews.llvm.org/D89632
The file was modifiedllvm/include/llvm/IR/Dominators.h
The file was modifiedllvm/unittests/IR/DominatorTreeTest.cpp
The file was modifiedllvm/lib/IR/Dominators.cpp