Changes

Summary

  1. [libc][NFC] Add 'struct_' prefix to type headers defining struct types. (details)
  2. [RISCV] Bump rvv-related extensions from 0.10 to 1.0 (details)
  3. [mlir][Linalg] Avoid generating illegal operations during elementwise fusion. (details)
  4. [ConstantFold] Simplify type check in reinterpret load folding (NFC) (details)
  5. [ConstantFold] Support pointers in reinterpret load folding (details)
  6. [VE][NFC] Factor out helper functions (details)
  7. [InstSimplify] Add tests for reinterpret load of floats (NFC) (details)
  8. [ConstantFold] Allow all float types in reinterpret load folding (details)
  9. Match bazel config with cmake after f29256a64 (details)
  10. [fir] Add array operations documentation (details)
  11. [mlir] Fully qualify return types in OpAsmInterface.td and FunctionInterfaces.td (details)
  12. [llvm] Remove unused headers in LLVMDemangle (details)
  13. [VPlan] Add VPWidenIntOrFpInductionRecipe::isCanonical, use it (NFCI). (details)
  14. [VPlan] Move ::isCanonical outside ifdef. (details)
  15. [llvm] Remove (some) LLVMDemangle header dependencies (details)
  16. [Attributor] Avoid some pointer element type accesses (details)
  17. Fix 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d (details)
  18. [ORC][docs] Describe removing JITDylibs, using custom program representations. (details)
  19. [AMDGPU][NFC] Regenerate InstCombine test (details)
  20. [AMDGPU] Fix LOD bias in A16 combine (details)
  21. [AMDGPU][InstCombine] Remove zero LOD bias (details)
  22. [AMDGPU] Remove lz and nomip combine from codegen (details)
  23. Fix 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d (details)
  24. [CoroSplit] Avoid pointer element type accesses (details)
  25. [llvm-mca] Improve barriers for strict region marking (PR52198) (details)
  26. [Coroutines] Avoid some pointer element type accesses (details)
  27. [clangd][Background] Make index validation logs verbose (details)
  28. [DWARF][DebugInfo] Fix off-by-one error in size of DW_TAG_base_type types (details)
  29. [mlir][LangRef] Add top-level production to the MLIR grammar (details)
  30. [RISCV] Enable CGP to sink splat operands of VP intrinsics (details)
  31. [clangd] Fail inlayHints requests on content changes (details)
  32. [X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs (details)
  33. [clang][deps] NFC: Simplify handling of cached FS errors (details)
  34. [clang][deps] Ensure filesystem cache consistency (details)
  35. [clang][deps] Handle symlinks in minimizing FS (details)
  36. [flang] Update tco tool pipline and add translation to LLVM IR (details)
  37. [X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min` (details)
  38. Revert rG8ee135dcf8ff060656ad481c3e980fe8763576f5 "[X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min`" (details)
  39. Revert rG4727d29d908f9dd608dd97a58c0af1ad579fd3ca "[X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs" (details)
  40. [llvm] Cleanup header dependencies in ADT and Support (details)
  41. Add missing header in Support/ConvertUTF.h (details)
  42. [NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B) (details)
  43. Add apple-specific missing include (details)
  44. Add ms-specific missing header in Support/InitLLVM.cpp (details)
  45. [llvm][ADT] Implement `BitVector::{pop_,}back` (details)
  46. Add apple-specific missing header in Support/GraphWriter.cpp (details)
  47. [SystemZ] Properly register machine passes. (details)
  48. Remove dependency from raw_ostream on <chrono> (details)
  49. [InstCombine] Fold for masked gather when loading the same value each time. (details)
  50. Add security group 2021 transparency report. (details)
  51. [clang-tidy] Avoid binding nullptr to a reference (details)
  52. Try to unbreak build on Windows after e9211e03937 (details)
  53. Add missing llvm/support/Regex.h include in polly/lib/Analysis/ScopDetection.cpp (details)
  54. Try to unbreak build on Windows more after e9211e03937 (details)
  55. [libcxx][doc][nfc] Fixed typo in doc (details)
Commit 7f0f4cab18a9e3abf8d0583c1a87e352cd5577a6 by sivachandra
[libc][NFC] Add 'struct_' prefix to type headers defining struct types.

This allows header generator to generate type inclusion boiler plate in
a straightforward manner.
The file was addedlibc/include/llvm-libc-types/struct_tm.h
The file was modifiedlibc/include/CMakeLists.txt
The file was modifiedlibc/config/linux/api.td
The file was removedlibc/include/llvm-libc-types/__sigaction.h
The file was addedlibc/include/llvm-libc-types/struct_sigaction.h
The file was modifiedlibc/include/llvm-libc-types/CMakeLists.txt
The file was removedlibc/include/llvm-libc-types/tm.h
Commit e6de53b4de4aecca4ac892500a0907805896ed27 by eopxd
[RISCV] Bump rvv-related extensions from 0.10 to 1.0

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D112987
The file was modifiedllvm/lib/Support/RISCVISAInfo.cpp
The file was modifiedllvm/test/MC/RISCV/attribute-arch.s
The file was modifiedclang/test/Preprocessor/riscv-target-features.c
The file was modifiedclang/test/Driver/riscv-arch.c
The file was modifiedllvm/test/CodeGen/RISCV/attributes.ll
Commit a99e06aa869b44588a18a423f58e0ab30c292d8e by ravishankarm
[mlir][Linalg] Avoid generating illegal operations during elementwise fusion.

In some cases, fusion can produce illegal operations if after fusion
the range of some of the loops cannot be computed from shapes of its
operands. Check for this case and abort the fusion if this happens.

Differential Revision: https://reviews.llvm.org/D117602
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion-elementwise-ops.mlir
Commit 05cd9a0596d8d2cc4fdb1d1dfa0957968aceaf92 by npopov
[ConstantFold] Simplify type check in reinterpret load folding (NFC)

Keep a list of allowed types, but then always construct the map
type the same way. We need an integer with the same width as the
original type.
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
Commit 6a19cb837c9b2ca14642bb0a8f1234903e4430d0 by npopov
[ConstantFold] Support pointers in reinterpret load folding

Peculiarly, the necessary code to handle pointers (including the
check for non-integral address spaces) is already in place,
because we were already allowing vectors of pointers here, just
not plain pointers.
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/loads.ll
Commit 7950010e4983a58d19a5d8a831f4c2467c04c56d by simon.moll
[VE][NFC] Factor out helper functions

Factor out some helper functions to cleanup VEISelLowering.

Reviewed By: kaz7

Differential Revision: https://reviews.llvm.org/D117683
The file was modifiedllvm/lib/Target/VE/VECustomDAG.h
The file was modifiedllvm/lib/Target/VE/VEISelLowering.cpp
The file was modifiedllvm/lib/Target/VE/VECustomDAG.cpp
Commit 3f9d1f516e19cc9548cf17ec60b73300d4ab8360 by npopov
[InstSimplify] Add tests for reinterpret load of floats (NFC)

Add tests for currently unsupported float types.
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/loads.ll
Commit b4900296e4a51b0076bac69b31871c7a29efa90f by npopov
[ConstantFold] Allow all float types in reinterpret load folding

Rather than hardcoding just half, float and double, allow all
floating point types.
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/loads.ll
Commit 99b5a8049be49563bd7541dd4ea93ad2f6516299 by tpopp
Match bazel config with cmake after f29256a64
The file was modifiedutils/bazel/llvm_configs/llvm-config.h.cmake
Commit 69825f369302184aecb1ee53d9224e49ba15d9ef by clementval
[fir] Add array operations documentation

This patch adds documentation on FIR array operations
and their usage.

Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D115077
The file was addedflang/docs/FIRArrayOperations.md
Commit d03c5bc8d437e47ae424ac9611ae441cd5225526 by markus.boeck02
[mlir] Fully qualify return types in OpAsmInterface.td and FunctionInterfaces.td
The file was modifiedmlir/include/mlir/IR/OpAsmInterface.td
The file was modifiedmlir/include/mlir/IR/FunctionInterfaces.td
Commit a2f6921ef2a1564a52aa3ecd7e30697250ccaf2e by sguelton
[llvm] Remove unused headers in LLVMDemangle

As an hint to the impact of the cleanup, running

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Demangle/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 208053 lines
after:  203965 lines
The file was modifiedllvm/lib/Demangle/MicrosoftDemangleNodes.cpp
The file was modifiedllvm/include/llvm/Demangle/MicrosoftDemangle.h
The file was modifiedllvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
The file was modifiedllvm/lib/Demangle/ItaniumDemangle.cpp
Commit c0cf209076a29076ebf43c59dff3cc3c8400e4d7 by flo
[VPlan] Add VPWidenIntOrFpInductionRecipe::isCanonical, use it (NFCI).

This patch adds VPWidenIntOrFpInductionRecipe::isCanonical to check if
an induction recipe is canonical. The code is also updated to use it
instead of isCanonicalID.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D117551
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanValue.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.h
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
Commit 55689904d2e5afcc5309f7234d6369307ee305d0 by flo
[VPlan] Move ::isCanonical outside ifdef.

This fixes a build failure with assertions disabled.
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
Commit 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d by sguelton
[llvm] Remove (some) LLVMDemangle header dependencies

- Avoid using <iterator> for std::end on a plain array (using <array> instead)
- Avoid using <algorithm> for std::min and std::equal (using alternate logic and std::strcmp instead)

As an hint to the impact of the cleanup, running

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Demangle/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before:  203965 lines
after:   169704 lines
The file was modifiedllvm/include/llvm/Demangle/StringView.h
The file was modifiedllvm/include/llvm/Demangle/Utility.h
The file was modifiedllvm/include/llvm/Demangle/ItaniumDemangle.h
Commit e7762653d3b071dfb86d4e2d3bcf7c1455683d37 by npopov
[Attributor] Avoid some pointer element type accesses
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 065044c443f4041f32e0a8d6e633f9d92580fbca by sguelton
Fix 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d

Don't assume iterator on std::array<char, ...> are char*, use .data() instead
The file was modifiedllvm/include/llvm/Demangle/Utility.h
Commit 329feeb938ac63602136bcb3c5ec3a64109be94c by Lang Hames
[ORC][docs] Describe removing JITDylibs, using custom program representations.

Add documentation around:
* Removing JITDylib from the session
* Add support for custom program representation

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D116476
The file was modifiedllvm/docs/ORCv2.rst
Commit b351ac3873db15b16c2aa6d1e0e08ff9fab44f1f by sebastian.neubauer
[AMDGPU][NFC] Regenerate InstCombine test
The file was modifiedllvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
Commit 0530fdbbbb84ea3024a4a8f7156ff716f00ffd48 by sebastian.neubauer
[AMDGPU] Fix LOD bias in A16 combine

As the codegen fix in D111754, the LOD bias needs to be converted to 16
bits. Fix this in the combine.

Differential Revision: https://reviews.llvm.org/D116038
The file was modifiedllvm/include/llvm/IR/IntrinsicsAMDGPU.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h
The file was modifiedllvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
The file was modifiedllvm/lib/Target/AMDGPU/MIMGInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 603d18033c510c99ad84f26b6603db1ca68a500f by sebastian.neubauer
[AMDGPU][InstCombine] Remove zero LOD bias

If the bias is zero, we can remove it from the image instruction.
Also copy other image optimizations (l->lz, mip->nomip) to IR combines.

Differential Revision: https://reviews.llvm.org/D116042
The file was modifiedllvm/lib/Target/AMDGPU/MIMGInstructions.td
The file was modifiedllvm/test/Transforms/InstCombine/AMDGPU/amdgcn-intrinsics.ll
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
Commit ae2f9c8be89768086b9f335d60bbe8312b212f95 by sebastian.neubauer
[AMDGPU] Remove lz and nomip combine from codegen

These combines have been moved into the IR combiner in D116042.

Differential Revision: https://reviews.llvm.org/D116116
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
The file was removedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.ll
The file was removedllvm/test/CodeGen/AMDGPU/image_ls_mipmap_zero.ll
The file was removedllvm/test/CodeGen/AMDGPU/GlobalISel/image_ls_mipmap_zero.a16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/dagcombine-fma-fmad.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cluster_stores.ll
The file was removedllvm/test/CodeGen/AMDGPU/GlobalISel/image_ls_mipmap_zero.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/skip-if-dead.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
The file was removedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.sample.ltolz.a16.ll
The file was removedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.sample.ltolz.ll
Commit f53d359816e66a107195e1e4b581e2a33bbafaa4 by sguelton
Fix 1f9e18b6565fd1bb69c4b649b9efd3467b3c7c7d

Part 2
The file was modifiedllvm/include/llvm/Demangle/Utility.h
Commit 9c5b856dac5c0ccbe755410b826f683ef01d7f08 by npopov
[CoroSplit] Avoid pointer element type accesses

Use isOpaqueOrPointeeTypeMatches() for the assertions instead.
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit 0ca426d6ac65b84c70ac7fd9511628ce5115423e by llvm-dev
[llvm-mca] Improve barriers for strict region marking (PR52198)

As suggested on the bug, to help (but not completely....) stop folded instructions crossing the inline asm barriers used for llvm-mca analysis, we should recommend tagging with memory captures/attributes.

Differential Revision: https://reviews.llvm.org/D117788
The file was modifiedllvm/docs/CommandGuide/llvm-mca.rst
Commit bfbdb5e43e50484e179122bfb66cff8165e4b084 by npopov
[Coroutines] Avoid some pointer element type accesses

These are just verifying that pointer types are correct, which is
no longer relevant under opaque pointers.
The file was modifiedllvm/lib/Transforms/Coroutines/Coroutines.cpp
Commit 597eae998a874a872b67d1a22a04d7c45d2ef94b by kadircet
[clangd][Background] Make index validation logs verbose

These errors are non-harmful and should be transient. They either
imply:
- compilation database returned stale results for TUs and it'll be fixed once
  it's updated to match project state.
- a TUs dependencies has changed and some headers no longer exist. this should
  be fixed with the next indexing cycle.

In either case the user will have some stale symbols in their index until clangd
restarts and the underlying issue is resolved. On the downside these logs are
confusing users when there's another issue.

Differential Revision: https://reviews.llvm.org/D117792
The file was modifiedclang-tools-extra/clangd/index/Background.cpp
Commit b6a41fddcfd375ce30487ef87ca2cd65a6be0bcc by orlando.hyams
[DWARF][DebugInfo] Fix off-by-one error in size of DW_TAG_base_type types

Fix PR53163 by rounding the byte size of DW_TAG_base_type types up. Without
this fix we risk emitting types with a truncated size (including rounding
less-than-byte-sized types' sizes down to zero).

Reviewed By: probinson

Differential Revision: https://reviews.llvm.org/D117124
The file was modifiedllvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
The file was addedllvm/test/DebugInfo/X86/base-type-size.ll
Commit 357f2d9ccf204981fd90481ba5ebb942ea46d7f9 by groverkss
[mlir][LangRef] Add top-level production to the MLIR grammar

The LangRef currently lacks a top-level production, leaving the productions attribute-alias-def and type-alias-defunused. Clarify the situation by declaring what is to be parsed by an MLIR parser at the toplevel.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D117668
The file was modifiedmlir/docs/LangRef.md
Commit 4d268dc94a6bef0221c94d4b7e4c2b112e75fe1b by fraser
[RISCV] Enable CGP to sink splat operands of VP intrinsics

This patch brings better splat-matching to our VP support, by sinking
splat operands of VP intrinsics back into the same block as the VP
operation. The list of VP intrinsics we are interested in matches that
of the regular instructions.

Some optimization is still lacking. For instance, our VL nodes aren't
recognized as commutative, so splats must be on the RHS. Because of
this, we limit our sinking of splats to just the RHS operand for now.
Improvement in this regard can come in another patch.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D117703
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/sink-splat-operands.ll
Commit 825a3cd6b6972b6a50b80bed7d951d7ea7f90669 by kadircet
[clangd] Fail inlayHints requests on content changes

This should improve the overall UX by making the labels less jumpy.

Differential Revision: https://reviews.llvm.org/D117776
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
Commit 4727d29d908f9dd608dd97a58c0af1ad579fd3ca by llvm-dev
[X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs

D111986 added the generic `__builtin_elementwise_abs()` intrinsic with the same integer absolute behaviour as the SSE/AVX instructions (abs(INT_MIN) == INT_MIN)

This patch removes the `__builtin_ia32_pabs*` intrinsics and just uses `__builtin_elementwise_abs` - the existing tests see no changes:
```
__m256i test_mm256_abs_epi8(__m256i a) {
  // CHECK-LABEL: test_mm256_abs_epi8
  // CHECK: [[ABS:%.*]] = call <32 x i8> @llvm.abs.v32i8(<32 x i8> %{{.*}}, i1 false)
  return _mm256_abs_epi8(a);
}
```
This requires us to add a `__v64qs` explicitly signed char vector type (we already have `__v16qs` and `__v32qs`).

Differential Revision: https://reviews.llvm.org/D117791
The file was modifiedclang/lib/Headers/avx512bwintrin.h
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
The file was modifiedclang/lib/Headers/tmmintrin.h
The file was modifiedclang/test/CodeGen/builtins-x86.c
The file was modifiedclang/lib/Headers/avx2intrin.h
The file was modifiedclang/lib/Headers/avx512vlintrin.h
The file was modifiedclang/lib/Headers/avx512fintrin.h
Commit ced077e1ba52ec2937aab538e9b6fa5149f8c567 by Jan Svoboda
[clang][deps] NFC: Simplify handling of cached FS errors

The return types of some `CachedFileSystemEntry` member function are needlessly complex.

This patch attempts to simplify the code by unwrapping cached entries that represent errors early, and then asserting `!isError()`.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D115935
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
The file was modifiedclang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
Commit 5daeada33051aa85777593d3f69eb29f26e7fb2f by Jan Svoboda
[clang][deps] Ensure filesystem cache consistency

The minimizing filesystem used by the dependency scanner isn't great when it comes to the consistency of its caches. There are two problems that can be exposed by a filesystem that changes during dependency scan:
1. In-memory cache entries for original and minimized files are distinct, populated at different times using separate stat/open syscalls. This means that when a file is read with minimization disabled, its contents might be inconsistent when the same file is read with minimization enabled at later point (and vice versa).
2. In-memory cache entries are indexed by filename. This is problematic for symlinks, where the contents of the symlink might be inconsistent with contents of the original file (for the same reason as in problem 1).

This patch ensures consistency by always stating/reading a file exactly once. The original contents are always cached and minimized contents are derived from that on demand. The cache entries are now indexed by their `UniqueID` ensuring consistency for symlinks too. Moreover, the stat/read syscalls are now issued outside of critical section.

Depends on D115935.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D114966
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
The file was modifiedclang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
The file was modifiedclang/unittests/Tooling/DependencyScannerTest.cpp
Commit 8cc2a137270462bc191377dbab97c739583814dd by Jan Svoboda
[clang][deps] Handle symlinks in minimizing FS

The minimizing and caching filesystem used by the dependency scanner can be configured to **not** minimize some files. That's necessary when scanning a TU with prebuilt inputs (i.e. PCH) that refer to the original (non-minimized) files. Minimizing such files in the dependency scanner would cause discrepancy between the current perceived state of the filesystem and the file sizes stored in the AST file. By not minimizing such files, we avoid creating the discrepancy.

The problem with the current approach is that files that should not be minimized are identified by their path. This breaks down when the prebuilt input (PCH) and the current TU refer to the same file via different paths (i.e. symlinks). This patch switches from paths to `llvm::sys::fs::UniqueID` when identifying ignored files. This is consistent with how the rest of Clang treats files.

Depends on D114966.

Reviewed By: dexonsmith, arphaman

Differential Revision: https://reviews.llvm.org/D114971
The file was addedclang/test/ClangScanDeps/modules-symlink.c
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
The file was modifiedclang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h
Commit 68db0e25df4b1edaa2c6080eb88453ab01ea01d3 by clementval
[flang] Update tco tool pipline and add translation to LLVM IR

tco is a tool to test the FIR to LLVM IR pipeline of the Flang compiler.

This patch update tco pipelines and adds the translation to LLVM IR.

A simple test is added to make sure the tool is working with a simple
FIR program.
More tests will be upstream in follow up patch from the fir-dev branch.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: schweitz, mehdi_amini

Differential Revision: https://reviews.llvm.org/D117781

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Andrzej Warzynski <andrzej.warzynski@arm.com>
The file was addedflang/test/Fir/basic-program.fir
The file was modifiedflang/include/flang/Optimizer/CodeGen/CodeGen.h
The file was modifiedflang/lib/Optimizer/CodeGen/CodeGen.cpp
The file was addedflang/include/flang/Tools/CLOptions.inc
The file was modifiedflang/tools/tco/CMakeLists.txt
The file was modifiedflang/tools/tco/tco.cpp
The file was modifiedflang/include/flang/Optimizer/Support/InitFIR.h
The file was addedflang/lib/Optimizer/Support/InitFIR.cpp
The file was modifiedflang/lib/Optimizer/Support/CMakeLists.txt
Commit 8ee135dcf8ff060656ad481c3e980fe8763576f5 by llvm-dev
[X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min`

D111985 added the generic `__builtin_elementwise_max` and `__builtin_elementwise_min` intrinsics with the same integer behaviour as the SSE/AVX instructions

This patch removes the `__builtin_ia32_pmax/min` intrinsics and just uses `__builtin_elementwise_max/min` - the existing tests see no changes:
```
__m256i test_mm256_max_epu32(__m256i a, __m256i b) {
  // CHECK-LABEL: test_mm256_max_epu32
  // CHECK: call <8 x i32> @llvm.umax.v8i32(<8 x i32> %{{.*}}, <8 x i32> %{{.*}})
  return _mm256_max_epu32(a, b);
}
```
This requires us to add a `__v64qs` explicitly signed char vector type (we already have `__v16qs` and `__v32qs`).

Sibling patch to D117791

Differential Revision: https://reviews.llvm.org/D117798
The file was modifiedclang/lib/Headers/avx512fintrin.h
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/Headers/avx2intrin.h
The file was modifiedclang/lib/Headers/avx512bwintrin.h
The file was modifiedclang/lib/Headers/emmintrin.h
The file was modifiedclang/lib/Headers/smmintrin.h
The file was modifiedclang/test/CodeGen/builtins-x86.c
The file was modifiedclang/lib/Headers/avx512vlintrin.h
Commit 3ef88b31843e040c95f23ff2c3c206f1fa399c05 by llvm-dev
Revert rG8ee135dcf8ff060656ad481c3e980fe8763576f5 "[X86] Remove `__builtin_ia32_pmax/min` intrinsics and use generic `__builtin_elementwise_max/min`"

Some build bots are referencing the `__builtin_ia32_pmax/min` intrinsics via alternative headers
The file was modifiedclang/lib/Headers/avx512fintrin.h
The file was modifiedclang/lib/Headers/avx512bwintrin.h
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/Headers/avx2intrin.h
The file was modifiedclang/lib/Headers/smmintrin.h
The file was modifiedclang/lib/Headers/avx512vlintrin.h
The file was modifiedclang/lib/Headers/emmintrin.h
The file was modifiedclang/test/CodeGen/builtins-x86.c
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
Commit 0abaf64580921e31983e355972b91c83fd7521f2 by llvm-dev
Revert rG4727d29d908f9dd608dd97a58c0af1ad579fd3ca "[X86] Remove __builtin_ia32_pabs intrinsics and use generic __builtin_elementwise_abs"

Some build bots are referencing the `__builtin_ia32_pabs` intrinsics via alternative headers
The file was modifiedclang/lib/Headers/avx512bwintrin.h
The file was modifiedclang/lib/Headers/avx2intrin.h
The file was modifiedclang/lib/Headers/avx512vlintrin.h
The file was modifiedclang/test/CodeGen/builtins-x86.c
The file was modifiedclang/lib/CodeGen/CGBuiltin.cpp
The file was modifiedclang/lib/Headers/avx512fintrin.h
The file was modifiedclang/include/clang/Basic/BuiltinsX86.def
The file was modifiedclang/lib/Headers/tmmintrin.h
Commit 75e164f61d391979b4829bf2746a5d74b94e95f2 by sguelton
[llvm] Cleanup header dependencies in ADT and Support

The cleanup was manual, but assisted by "include-what-you-use". It consists in

1. Removing unused forward declaration. No impact expected.
2. Removing unused headers in .cpp files. No impact expected.
3. Removing unused headers in .h files. This removes implicit dependencies and
   is generally considered a good thing, but this may break downstream builds.
   I've updated llvm, clang, lld, lldb and mlir deps, and included a list of the
   modification in the second part of the commit.
4. Replacing header inclusion by forward declaration. This has the same impact
   as 3.

Notable changes:

- llvm/Support/TargetParser.h no longer includes llvm/Support/AArch64TargetParser.h nor llvm/Support/ARMTargetParser.h
- llvm/Support/TypeSize.h no longer includes llvm/Support/WithColor.h
- llvm/Support/YAMLTraits.h no longer includes llvm/Support/Regex.h
- llvm/ADT/SmallVector.h no longer includes llvm/Support/MemAlloc.h nor llvm/Support/ErrorHandling.h

You may need to add some of these headers in your compilation units, if needs be.

As an hint to the impact of the cleanup, running

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 8000919 lines
after:  7917500 lines

Reduced dependencies also helps incremental rebuilds and is more ccache
friendly, something not shown by the above metric :-)

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
The file was modifiedllvm/include/llvm/Support/TrigramIndex.h
The file was modifiedlldb/source/Host/common/Socket.cpp
The file was modifiedllvm/lib/Support/VirtualFileSystem.cpp
The file was modifiedclang/lib/Driver/ToolChains/Arch/ARM.h
The file was modifiedllvm/include/llvm/ADT/Optional.h
The file was modifiedllvm/lib/Support/YAMLParser.cpp
The file was modifiedllvm/lib/Support/InitLLVM.cpp
The file was modifiedllvm/include/llvm/Support/FormatVariadic.h
The file was modifiedllvm/lib/Support/ToolOutputFile.cpp
The file was modifiedllvm/include/llvm/Support/Error.h
The file was modifiedllvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
The file was modifiedllvm/include/llvm/Support/ELFAttributeParser.h
The file was modifiedllvm/lib/Support/SpecialCaseList.cpp
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was modifiedmlir/tools/mlir-tblgen/AttrOrTypeFormatGen.cpp
The file was modifiedllvm/include/llvm/Support/TimeProfiler.h
The file was modifiedmlir/tools/mlir-tblgen/OpFormatGen.cpp
The file was modifiedllvm/lib/Object/Object.cpp
The file was modifiedmlir/lib/TableGen/Predicate.cpp
The file was modifiedclang/lib/Basic/Targets/AArch64.h
The file was modifiedllvm/lib/Support/TargetParser.cpp
The file was modifiedllvm/lib/Support/StringMap.cpp
The file was modifiedllvm/lib/Support/TypeSize.cpp
The file was modifiedllvm/lib/Support/FileOutputBuffer.cpp
The file was modifiedllvm/lib/Support/NativeFormatting.cpp
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
The file was modifiedllvm/include/llvm/Support/Timer.h
The file was modifiedllvm/lib/Support/SmallVector.cpp
The file was modifiedllvm/unittests/Support/TargetParserTest.cpp
The file was modifiedllvm/include/llvm/Support/BinaryStreamWriter.h
The file was modifiedllvm/unittests/Support/raw_ostream_test.cpp
The file was modifiedllvm/include/llvm/Support/BlockFrequency.h
The file was modifiedllvm/lib/Support/X86TargetParser.cpp
The file was modifiedllvm/lib/Target/ARM/ARMTargetMachine.cpp
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was modifiedclang/tools/libclang/BuildSystem.cpp
The file was modifiedllvm/lib/Support/MSP430AttributeParser.cpp
The file was modifiedclang/lib/Driver/ToolChains/Arch/ARM.cpp
The file was modifiedllvm/lib/Support/JSON.cpp
The file was modifiedllvm/include/llvm/Object/ELFObjectFile.h
The file was modifiedllvm/include/llvm/Support/BinaryStreamReader.h
The file was modifiedllvm/tools/llvm-reduce/llvm-reduce.cpp
The file was modifiedllvm/include/llvm/Support/RISCVISAInfo.h
The file was modifiedllvm/include/llvm/Support/ARMAttributeParser.h
The file was modifiedllvm/include/llvm/Support/ExtensibleRTTI.h
The file was modifiedllvm/lib/Support/Signposts.cpp
The file was modifiedllvm/include/llvm/Support/YAMLTraits.h
The file was modifiedmlir/lib/TableGen/Format.cpp
The file was modifiedllvm/include/llvm/Support/ItaniumManglingCanonicalizer.h
The file was modifiedllvm/lib/Target/ARM/ARMSubtarget.cpp
The file was modifiedllvm/lib/Support/MemoryBuffer.cpp
The file was modifiedllvm/lib/Support/TimeProfiler.cpp
The file was modifiedllvm/tools/llvm-modextract/llvm-modextract.cpp
The file was modifiedllvm/tools/llvm-diff/llvm-diff.cpp
The file was modifiedllvm/include/llvm/Support/FileUtilities.h
The file was modifiedllvm/lib/Support/Signals.cpp
The file was modifiedllvm/lib/Support/ARMWinEH.cpp
The file was modifiedllvm/lib/Support/ELFAttributeParser.cpp
The file was modifiedllvm/lib/Support/Triple.cpp
The file was modifiedllvm/lib/Support/raw_ostream.cpp
The file was modifiedllvm/include/llvm/Support/TypeSize.h
The file was modifiedllvm/lib/Support/PrettyStackTrace.cpp
The file was modifiedllvm/include/llvm/Support/BranchProbability.h
The file was modifiedllvm/lib/Support/ThreadPool.cpp
The file was modifiedllvm/tools/llvm-split/llvm-split.cpp
The file was modifiedclang/lib/Basic/Targets/ARM.h
The file was modifiedllvm/include/llvm/Support/AArch64TargetParser.h
The file was modifiedllvm/include/llvm/Support/Allocator.h
The file was modifiedllvm/include/llvm/Support/TargetParser.h
The file was modifiedllvm/lib/Debuginfod/Debuginfod.cpp
The file was modifiedllvm/lib/Support/GraphWriter.cpp
The file was modifiedllvm/lib/Support/ARMAttributeParser.cpp
The file was modifiedllvm/include/llvm/Support/FileCollector.h
The file was modifiedllvm/lib/Support/SymbolRemappingReader.cpp
The file was modifiedllvm/include/llvm/Support/GraphWriter.h
The file was modifiedllvm/lib/Support/APInt.cpp
The file was modifiedllvm/lib/Support/ScopedPrinter.cpp
The file was modifiedllvm/lib/Support/FileUtilities.cpp
The file was modifiedllvm/tools/llvm-lto/llvm-lto.cpp
The file was modifiedllvm/include/llvm/Support/ConvertUTF.h
The file was modifiedllvm/include/llvm/Support/SymbolRemappingReader.h
The file was modifiedllvm/lib/Support/DataExtractor.cpp
The file was modifiedllvm/tools/llvm-stress/llvm-stress.cpp
The file was modifiedllvm/include/llvm/MC/MCStreamer.h
The file was modifiedllvm/include/llvm/Support/BinaryStreamRef.h
The file was modifiedllvm/lib/Support/SmallPtrSet.cpp
The file was modifiedllvm/lib/Support/BlockFrequency.cpp
The file was modifiedllvm/lib/Support/DAGDeltaAlgorithm.cpp
The file was modifiedllvm/lib/Support/YAMLTraits.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.cpp
Commit 2b8e4c6e5fbd5ec3bf7b75fd6b1e11d66fde78a9 by sguelton
Add missing header in Support/ConvertUTF.h
The file was modifiedllvm/include/llvm/Support/ConvertUTF.h
Commit 38ac4093d9d2ae28d631ca1cc5802533989165c5 by archibald.elliott
[NFCI][Support] Avoid ASSERT_/EXPECT_TRUE(A <op> B)

The error messages in tests are far better when a test fails if the test
is written using ASSERT_/EXPECT_<operator>(A, B) rather than
ASSERT_/EXPECT_TRUE(A <operator> B).

This commit updates all of llvm/unittests/Support to use these macros
where possible.

This change has not been possible in:
- llvm/unittests/Support/FSUniqueIDTest.cpp - due to not overloading
  operators beyond ==, != and <.
- llvm/unittests/Support/BranchProbabilityTest.cpp - where the unchanged
  tests are of the operator overloads themselves.

There are other possibilities of this conversion not being valid, which
have not applied in these tests, as they do not use NULL (they use
nullptr), and they do not use const char* (they use std::string or
StringRef).

Reviewed By: mubashar_

Differential Revision: https://reviews.llvm.org/D117319
The file was modifiedllvm/unittests/Support/ErrorTest.cpp
The file was modifiedllvm/unittests/Support/IndexedAccessorTest.cpp
The file was modifiedllvm/unittests/Support/JSONTest.cpp
The file was modifiedllvm/unittests/Support/ProgramTest.cpp
The file was modifiedllvm/unittests/Support/CommandLineTest.cpp
The file was modifiedllvm/unittests/Support/TargetParserTest.cpp
The file was modifiedllvm/unittests/Support/Path.cpp
The file was modifiedllvm/unittests/Support/VirtualFileSystemTest.cpp
The file was modifiedllvm/unittests/Support/TarWriterTest.cpp
The file was modifiedllvm/unittests/Support/Casting.cpp
The file was modifiedllvm/unittests/Support/FSUniqueIDTest.cpp
The file was modifiedllvm/unittests/Support/YAMLParserTest.cpp
The file was modifiedllvm/unittests/Support/MemoryBufferTest.cpp
The file was modifiedllvm/unittests/Support/YAMLIOTest.cpp
The file was modifiedllvm/unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
The file was modifiedllvm/unittests/Support/UnicodeTest.cpp
The file was modifiedllvm/unittests/Support/raw_ostream_test.cpp
The file was modifiedllvm/unittests/Support/TimerTest.cpp
Commit 51c53a0791cd2794365cab9917922ce1e324b379 by sguelton
Add apple-specific missing include
The file was modifiedllvm/lib/Support/PrettyStackTrace.cpp
Commit 2a9e33db4f0a558572309b29a7d247185b4c21d1 by sguelton
Add ms-specific missing header in Support/InitLLVM.cpp
The file was modifiedllvm/lib/Support/InitLLVM.cpp
Commit 622354a522073b0a048a88c957b161fb376a40eb by Jan Svoboda
[llvm][ADT] Implement `BitVector::{pop_,}back`

LLVM Programmer’s Manual strongly discourages the use of `std::vector<bool>` and suggests `llvm::BitVector` as a possible replacement.

Currently, some users of `std::vector<bool>` cannot switch to `llvm::BitVector` because it doesn't implement the `pop_back()` and `back()` functions.

To enable easy transition of `std::vector<bool>` users, this patch implements `llvm::BitVector::pop_back()` and `llvm::BitVector::back()`.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D117115
The file was modifiedclang-tools-extra/clangd/SourceCode.cpp
The file was modifiedllvm/include/llvm/ADT/SmallBitVector.h
The file was modifiedllvm/include/llvm/ADT/BitVector.h
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
The file was modifiedllvm/unittests/ADT/BitVectorTest.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp
The file was modifiedclang/lib/Format/UnwrappedLineParser.h
The file was modifiedllvm/lib/MC/MCParser/MasmParser.cpp
Commit 7e3bcae5069fdb13ba6241b726d3a3912287784e by sguelton
Add apple-specific missing header in Support/GraphWriter.cpp
The file was modifiedllvm/lib/Support/GraphWriter.cpp
Commit d5ae039ed7b84bf767d15417a3e9bf61f982257b by kai.nacke
[SystemZ] Properly register machine passes.

Registering the passes enables use of -stop-before=/-stop-after
options.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D117823
The file was modifiedllvm/lib/Target/SystemZ/SystemZShortenInst.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZCopyPhysRegs.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZElimCompare.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZLongBranch.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZTDC.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZ.h
The file was modifiedllvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZLDCleanup.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZPostRewrite.cpp
Commit e9211e03937751ab75bbb34e38acc330b85fb0d8 by sguelton
Remove dependency from raw_ostream on <chrono>

The tryLockFor method from raw_fd_sotreamis the sole user of that
header, and it's not referenced in the mono repo. I still chose to keep
it (may be useful for downstream user) but added a transient type that's
forward declared to hold the duration parameter.

Notable changes:

- "llvm/Support/Duration.h" must be included in order to use tryLockFor.
- "llvm/Support/raw_ostream.h" no longer includes <chrono>

This sole change has an interesting impact on the number of processed
line, as measured by:

clang++ -E  -Iinclude -I../llvm/include ../llvm/lib/Support/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l

before: 7917500
after:  7835142

Discourse thread on the topic: https://llvm.discourse.group/t/include-what-you-use-include-cleanup/5831
The file was modifiedllvm/include/llvm/Debuginfod/HTTPClient.h
The file was addedllvm/include/llvm/Support/Duration.h
The file was modifiedlldb/tools/lldb-vscode/FifoFiles.h
The file was modifiedllvm/unittests/Support/Path.cpp
The file was modifiedllvm/include/llvm/Debuginfod/Debuginfod.h
The file was modifiedllvm/lib/Support/raw_ostream.cpp
The file was modifiedllvm/include/llvm/Support/raw_ostream.h
Commit ad43217a046634be24174299beec3a28018ec3c0 by caroline.concatto
[InstCombine] Fold for masked gather when loading the same value each time.

This patch checks in the masked gather when the first operand value is a
splat and the mask is all one, because the masked gather is reloading the
same value each time. This patch replaces this pattern of masked gather by
a scalar load of the value and splats it in a vector.

Differential Revision: https://reviews.llvm.org/D115726
The file was modifiedllvm/test/Transforms/InstCombine/masked_intrinsics.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
Commit 4d82ae67b20826d97471c1ea76e8db3b054398f9 by kristof.beyls
Add security group 2021 transparency report.

Differential Revision:  https://reviews.llvm.org/D117872
The file was modifiedllvm/docs/Security.rst
The file was addedllvm/docs/SecurityTransparencyReports.rst
The file was modifiedllvm/docs/Reference.rst
Commit b8102449a72c5144cb75cfca46e78b517d7f6606 by benny.kra
[clang-tidy] Avoid binding nullptr to a reference

That's undefined behavior. Found by -fsanitize=null.
The file was modifiedclang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp
Commit e5fd3a7df9170cc69c88881e06fbd33c9cbd633d by thakis
Try to unbreak build on Windows after e9211e03937
The file was modifiedllvm/tools/llvm-readobj/COFFDumper.cpp
Commit 8bc66189429919d86d3ff3b4b5a3f63cfa6c35ca by sguelton
Add missing llvm/support/Regex.h include in polly/lib/Analysis/ScopDetection.cpp
The file was modifiedpolly/lib/Analysis/ScopDetection.cpp
Commit 3c9e3dada916f33e8a4c62629f1954a7a5cdbf71 by thakis
Try to unbreak build on Windows more after e9211e03937
The file was modifiedllvm/tools/llvm-readobj/XCOFFDumper.cpp
Commit 9900acacfb3ff2bc5c957aeb84225c29aa1b74fc by vyng
[libcxx][doc][nfc] Fixed typo in doc
The file was modifiedlibcxx/docs/DesignDocs/UniquePtrTrivialAbi.rst