SuccessChanges

Summary

  1. [sanitizer] Set default rtlib to libgcc (details)
  2. [sanitizer] Update x86 ABILIST filtering for x86_64 devices (details)
  3. [sanitizer] Pass -e dotbytes=10m to wget (details)
Commit 1e7891e19f509fd068eb74adf05c56c8cae71613 by rprichard
[sanitizer] Set default rtlib to libgcc

The default --rtlib for Android is about to change from libgcc to
compiler-rt (D96404), which will require a more substantial change to
this script to build the builtins and libunwind. For now, keep using
libgcc.

Differential Revision: https://reviews.llvm.org/D97354
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (diff)
Commit 0477d926afac3c9b4ab2e992421c887fc46d6cab by rprichard
[sanitizer] Update x86 ABILIST filtering for x86_64 devices

An x86_64 device (e.g. Android emulator or Cuttlefish VM) might have an
ro.product.cpu.abilist like:

    x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
    x86_64,arm64-v8a,x86,armeabi-v7a,armeabi

When the first arch starts with x86, filter out the remaining archs
that don't start with x86.

Differential Revision: https://reviews.llvm.org/D97355
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (diff)
Commit 1a9f4798fee21e8a33af813f37b4d9b316f2bf6c by rprichard
[sanitizer] Pass -e dotbytes=10m to wget

When wget writes to a log file, it defaults to 1KiB per dot, which
produces ~20000 lines of log output for the NDK. This "-e dotbytes"
syntax has existed since 1999 in wget.

Differential Revision: https://reviews.llvm.org/D97356
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (diff)

Summary

  1. [X86] Regenerate sdiv_fix.ll tests. NFCI. (details)
  2. [NFC] Fix build failure after 83d134c3c4222e8b8d3d90c099f749a3b3abc8e0 (details)
  3. [RISCV] Unify scalable- and fixed-vector EXTRACT_SUBVECTOR lowering (details)
  4. [RISCV] Support fixed-length vector sign/zero extension (details)
  5. [RISCV] Support fixed-length vector truncates (details)
  6. Pass GPU events instead of streams across async regions. (details)
  7. [RISCV] Support fixed-length vector FP_ROUND & FP_EXTEND (details)
  8. [lldb][NFC] Document ClangASTImporter (details)
  9. [clang][cli] NFC: Remove intermediate command line parsing functions (details)
  10. [clang][cli] NFC: Remove ArgList infrastructure for recording queries (details)
  11. [clang] Remove a superfluous semicolon, silencing GCC warnings. NFC. (details)
  12. [clang][driver] Set the input type to Fortran when reading from stdin (details)
  13. [clang][flang] Improve the consistency of the code-base (details)
  14. [RISCV] Support fixed-length vector i2fp/fp2i conversions (details)
  15. [RISCV] Update RVV ISA section-header comments. NFC. (details)
  16. [mlir][NFC] Add missing namespace qualifier to ODS generated code (details)
  17. [clang][sema] Ignore xor-used-as-pow if both sides are macros (details)
  18. Fix a test case that should check whether or not it is passed into lld (details)
  19. [RISCV] Add isel pattern to match X > -1 to bgez. (details)
  20. [arm builtin crosscompile docs] alphabetize flags, no behavior change (details)
  21. [arm builtin crosscompile docs] add COMPILER_RT_BUILD_MEMPROF=OFF (details)
  22. [RISCV] Teach CleanupVSETVLI to remove 'vsetvli zero, zero, vtype' when the vtype matches the previous vsetvli or vsetivli (details)
  23. [IndVars] Add test cases inspired by PR48965. (details)
  24. [CodeGen] Format code comment to 80 columns. NFC. (details)
  25. [MLIR][affine-loop-fusion] Handle defining ops between the source and dest loops (details)
  26. [mlir] Check 'iter_args' in 'isLoopParallel' utility (details)
  27. [SampleFDO][NFC] Refactor: make SampleProfileLoaderBaseImpl a template class (details)
  28. [AMDGPU] require s-memtime-inst for __builtin_amdgcn_s_memtime (details)
  29. [X86] Remove custom lowering of vXi1 ADD/SUB now that they are canonicalized to XOR in getNode. (details)
  30. Support `#pragma clang section` directives on MachO targets (details)
  31. Option to ignore assume like intrinsic uses in hasAddressTaken() (details)
  32. [DAG] Move simplification of SADDSAT/SSUBSAT/UADDSAT/USUBSAT of vXi1 to getNode() (details)
  33. Option to ignore llvm[.compiler].used uses in hasAddressTaken() (details)
  34. [lld-macho] Basic support for linkage and visibility attributes in LTO (details)
  35. [OpenMP] Fix accidental addition of use omp_lib_kinds (details)
  36. [test] Improve SanitizerCoverage tests (details)
  37. adds more checks to -Wfree-nonheap-object (details)
  38. [mlir] Mark OpState::getAttrs() deprecated. (details)
  39. [libc++] Fix incorrect forwarding in tuple's assignment operator (details)
  40. [SanitizerCoverage] Drop !associated on metadata sections (details)
  41. Add a nullptr check. (details)
  42. [Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option. (details)
  43. [Clang][ASan] Teach Clang to not emit ASan module destructors when compiling with `-mkernel` or `-fapple-kext`. (details)
  44. [CodeGen] Call ConvertTypeForMem instead of ConvertType (details)
  45. [scudo][standalone] Compact pointers for Caches/Batches (details)
  46. [clang,NFC] Fix typos in file headers (details)
  47. Rewrite MSVC toolchain discovery with VFS (details)
  48. [OpenMP] libomp: fix ittnotify stack stitching for teams construct (details)
  49. [NFC] Switch to auto marshalling infrastructure for `-fsanitize-address-destructor-kind=` flag. (details)
  50. [lldb/Core] Change large function threshold variable into a setting. (details)
  51. [OpenMP] libomp minor cleanup (details)
  52. [PM] Show the pass argument in pre/post-pass IR dumps (details)
  53. [libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const char* (details)
  54. [libcxx] [test] Ifdef out uses of create_fifo on windows (details)
  55. [libcxx] [cmake] Add asm to the runtimes build languages (details)
  56. [libcxx] [test] Add a MinGW target (details)
  57. [libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms (details)
  58. Fix constructor declarations that are invalid in C++20 onwards. (details)
  59. [MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while) (details)
  60. [www] Add cxx_status tracking for C++23. (details)
  61. BPF: Implement TTI.getCmpSelInstrCost() properly (details)
  62. [Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function. (details)
  63. Add more historic DWARF vendor extensions (details)
  64. [Remarks] Emit remarks for "auto-init" !annotations (details)
  65. [Remarks] Provide more information about auto-init stores (details)
  66. [Remarks] Provide more information about auto-init calls (details)
  67. [gn build] Port 4753a69a316b (details)
  68. Add Alignment argument to IRBuilder CreateAtomicRMW and CreateAtomicCmpXchg. (details)
  69. [Clang][ASan] Correct AsanDtorKindToString to return non-void in default case (details)
  70. [dfsan] Conservative solution to atomic load/store (details)
  71. [Android] Use -l:libunwind.a with --rtlib=compiler-rt (details)
  72. BPF: Add LLVMTransformUtils in CMakefile LINK_COMPONENTS (details)
  73. [ELF] Add -z start-stop-gc to let __start_/__stop_ not retain C identifier name sections (details)
  74. [RISCV] Support fixed vector extract_element for FP types. (details)
  75. Revert 7a0da8894348, "scudo: Support memory tagging in the secondary allocator." (details)
Commit 0d835ba48dfb803de3a170cee3b79b4deb9e80b8 by llvm-dev
[X86] Regenerate sdiv_fix.ll tests. NFCI.
The file was modifiedllvm/test/CodeGen/X86/sdiv_fix.ll
Commit d0a6f8bb6568979e986eb4b8938dba537e75db7b by ybrevnov
[NFC] Fix build failure after 83d134c3c4222e8b8d3d90c099f749a3b3abc8e0
The file was modifiedllvm/lib/Transforms/Scalar/NaryReassociate.cpp
Commit 821f8bb29a8967fc1dc6520fda4a2b94b9c7ea0d by fraser
[RISCV] Unify scalable- and fixed-vector EXTRACT_SUBVECTOR lowering

This patch unifies the two disparate paths for lowering
EXTRACT_SUBVECTOR operations under one roof. Consequently, with this
patch it is possible to support any fixed-length subvector extraction,
not just "cast-like" ones.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97192
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract-subvector.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
Commit 3bc5ed38750c6a6daff39ad524b75e40c8c09183 by fraser
[RISCV] Support fixed-length vector sign/zero extension

This patch adds support for the custom lowering sign- and zero-extension
of fixed-length vector types. It does so through custom nodes. Since the
source and destination types are (necessarily) of different sizes, it is
possible that the source type is legal whilst the larger destination
type isn't. In this case the legalization makes heavy use of
EXTRACT_SUBVECTOR.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97194
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-exttrunc.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
Commit 84413e1947427a917a3e55abfc1f66c42adc751b by fraser
[RISCV] Support fixed-length vector truncates

This patch extends support for our custom-lowering of scalable-vector
truncates to include those of fixed-length vectors. It does this by
co-opting the custom RISCVISD::TRUNCATE_VECTOR node and adding mask and
VL operands. This avoids unnecessary duplication of patterns and
inflation of the ISel table.

Some truncates go through CONCAT_VECTORS which currently isn't
efficiently handled, as it goes through the stack. This can be improved
upon in the future.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97202
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-exttrunc.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
Commit f03826f896beb7edb68c7576be4721ff8711dacb by csigg
Pass GPU events instead of streams across async regions.

Lower !gpu.async.tokens returned from async.execute regions to events instead of streams.

Make !gpu.async.token returned from !async.execute single-use.
This allows creating one event per use and destroying them without leaking or ref-counting.
Technically we only need this for stream/event-based lowering. I kept the code separate
from the rest of the gpu-async-region pass so that we can make this optional or move
to a separate pass as needed.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D96965
The file was modifiedmlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
The file was modifiedmlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
The file was modifiedmlir/test/Dialect/GPU/async-region.mlir
The file was modifiedmlir/test/Conversion/GPUCommon/lower-wait-to-gpu-runtime-calls.mlir
Commit 9620ce90d7238c5ff450a83b49cbc4b811d19830 by fraser
[RISCV] Support fixed-length vector FP_ROUND & FP_EXTEND

This patch extends the support for vector FP_ROUND and FP_EXTEND by
including support for fixed-length vector types. Since fixed-length
vectors use "VL" nodes and scalable vectors can use the standard nodes,
there is slightly more to do in the fixed-length case. A helper function
was introduced to try and reduce the divergent paths. It is expected
that this function will similarly come in useful for lowering the
int-to-fp and fp-to-int operations for fixed-length vectors.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97301
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-conv.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
Commit 86c267233f51c36d71c12a93d661c4195f150f05 by Raphael Isemann
[lldb][NFC] Document ClangASTImporter
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/ClangASTImporter.h
Commit fa7eb3e4a60c620b820ff6c616c678f659f4528e by Jan Svoboda
[clang][cli] NFC: Remove intermediate command line parsing functions

Patch D96280 moved command line round-tripping from each parsing functions into single `CreateFromArgs` function.

This patch cleans up the individual parsing functions, essentially merging `ParseXxxImpl` with `ParseXxx`, as the distinction is not necessary anymore.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D96323
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Frontend/CompilerInvocation.h
Commit 43cac1d27d7d57a7800150f95c3f8ac1e3b2bc2b by Jan Svoboda
[clang][cli] NFC: Remove ArgList infrastructure for recording queries

This patch removes the infrastructure for recording queries in `ArgList`, partially reverting D94472.

The infrastructure was used during command line round-trip to determine which arguments should a certain subset of `CompilerInvocation` generate.

Since D96280, the command line arguments are being generated all at once, making this code no longer necessary.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D96325
The file was modifiedllvm/include/llvm/Option/ArgList.h
The file was modifiedllvm/lib/Option/ArgList.cpp
Commit 0c8b26bf530b3fc65af9205c593583f26549da3e by martin
[clang] Remove a superfluous semicolon, silencing GCC warnings. NFC.
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit baebc1162f810f7bf5de48919054f75a2f81e180 by andrzej.warzynski
[clang][driver] Set the input type to Fortran when reading from stdin

This patch makes sure that for the following invocation of the new Flang
driver, clangDriver sets the input type to Fortran:
```
flang-new -E -
```
This change does not affect `clang`, i.e. for the following invocation
the input type is set to C:
```
clang -E -
```

This change leverages the fact that for `flang-new` the driver is in
Flang mode.

Differential Revision: https://reviews.llvm.org/D96777
The file was modifiedflang/test/Flang-Driver/input-from-stdin.f90
The file was modifiedclang/lib/Driver/Driver.cpp
Commit ad14ccc8c22e1480db7bfc1a176311e6f572c588 by llvm
[clang][flang] Improve the consistency of the code-base

In clang:
Replace argc_ with Argc
Replace argv_ with Argv
Replace argv with Args
In flang:
Replace argc_ with argc
Replace argv_ with argv
Replace argv with args

Reviewed By: awarzynski, aganea

Differential Revision: https://reviews.llvm.org/D97138
The file was modifiedflang/tools/flang-driver/driver.cpp
The file was modifiedclang/tools/driver/driver.cpp
Commit 02f435db0b5f91986a7408ff8a1f1fda4918bde0 by fraser
[RISCV] Support fixed-length vector i2fp/fp2i conversions

This patch extends the support for scalable-vector int->fp and fp->int
conversions by additionally handling fixed-length vectors.

The existing scalable-vector lowering re-expresses widening/narrowing by
x4+ conversions as standard nodes. The fixed-length vector support slots
in at "the end" of this process by lowering the now equally-sized and
widening/narrowing by x2 nodes to our custom VL versions.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D97374
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit 0ad86f879f3a999bf0aad19acf15375482a17e99 by fraser
[RISCV] Update RVV ISA section-header comments. NFC.

Some of the section headers had become stale with the transition from
RVV specification version 0.9 to 0.10. This patch brings them up to
date.
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
Commit f4d78a5e3aee53d46e0f13e77f08ee610bade7fc by vlad.vinogradov
[mlir][NFC] Add missing namespace qualifier to ODS generated code

Use `::mlir::Region` inside array ref for `VariadicRegion`.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D97376
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit 2cc58463caf4c8a43c2954e4206d3647c762ba30 by tbaeder
[clang][sema] Ignore xor-used-as-pow if both sides are macros

This happens in codebases a lot, which use xor where both sides are
macros. Using xor in that case is not the common error-prone 2^6 code
that the warning was introduced for.

Don't diagnose such a use of xor.

Differential Revision: https://reviews.llvm.org/D97445
The file was modifiedclang/test/SemaCXX/warn-xor-as-pow.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 3b7104a2f2033d100aebb605c46fbe0495ea320b by conanap
Fix a test case that should check whether or not it is passed into lld

This test case was causing a PowerPC buildbot to fail as it happened to
be named lld-multistage,
which matches with the original regex and therefore fails the check-not.
This should better represent the desired check.

Differential Revision: https://reviews.llvm.org/D97423
The file was modifiedclang/test/Driver/hip-sanitize-options.hip
Commit 25c6b7ddd2b4d9631d0aff312b076843c16239d7 by craig.topper
[RISCV] Add isel pattern to match X > -1 to bgez.

Reviewed By: asb

Differential Revision: https://reviews.llvm.org/D97262
The file was modifiedllvm/test/CodeGen/RISCV/branch.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.td
The file was modifiedllvm/test/CodeGen/RISCV/xaluo.ll
Commit b4f8daa5ec6c7c5a84fe6d36859f1ff38780ffa2 by thakis
[arm builtin crosscompile docs] alphabetize flags, no behavior change
The file was modifiedllvm/docs/HowToCrossCompileBuiltinsOnArm.rst
Commit 03b7bc0ba1ce3804f92f1c9e990b4aaa54583862 by thakis
[arm builtin crosscompile docs] add COMPILER_RT_BUILD_MEMPROF=OFF

Reported by artok on irc, thanks!
The file was modifiedllvm/docs/HowToCrossCompileBuiltinsOnArm.rst
Commit 95c68249952803330739b7311dd2bdc7b18e272f by craig.topper
[RISCV] Teach CleanupVSETVLI to remove 'vsetvli zero, zero, vtype' when the vtype matches the previous vsetvli or vsetivli

Reviewed By: frasercrmck, arcbbb

Differential Revision: https://reviews.llvm.org/D97408
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-int-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-fp-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vreductions-int-rv32.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVCleanupVSETVLI.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-int-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-fp-rv64.ll
Commit 261f219ffc2ad0a0c7b45912e288ba6448911120 by flo
[IndVars] Add test cases inspired by PR48965.
The file was addedllvm/test/Transforms/IndVarSimplify/simplify-pointer-arithmetic.ll
Commit b368fc735d5a485ebf8ed455e078dafbccf27659 by fraser
[CodeGen] Format code comment to 80 columns. NFC.
The file was modifiedllvm/include/llvm/CodeGen/ISDOpcodes.h
Commit 203d5eeec55b1f0e0dd2aa28f5c5ebe292802e62 by diego.caballero
[MLIR][affine-loop-fusion] Handle defining ops between the source and dest loops

This patch handles defining ops between the source and dest loop nests, and prevents loop nests with `iter_args` from being fused.

If there is any SSA value in the dest loop nest whose defining op has dependence from the source loop nest, we cannot fuse the loop nests.

If there is a `affine.for` with `iter_args`, prevent it from being fused.

Reviewed By: dcaballe, bondhugula

Differential Revision: https://reviews.llvm.org/D97030
The file was modifiedmlir/test/Transforms/loop-fusion.mlir
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
Commit ebca222b65cb847f7bf4ee3da1dd7e2df35d0338 by diego.caballero
[mlir] Check 'iter_args' in 'isLoopParallel' utility

Fix 'isLoopParallel' utility so that 'iter_args' is taken into account
and loops with loop-carried dependences are not classified as parallel.

Reviewed By: tungld, vinayaka-polymage

Differential Revision: https://reviews.llvm.org/D97347
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/test/Dialect/Affine/parallelize.mlir
Commit 6103b6ad69fed0fe300f518b5115837cf6b74148 by xur
[SampleFDO][NFC] Refactor: make SampleProfileLoaderBaseImpl a template class

This patch makes SampleProfileLoaderBaseImpl a template class so it
can be used in CodeGen transformation.

Noticeable changes:
* use one template parameter and use IRTraits to get other used
   types an type specific functions.
* remove the temporary "inline" keywords in previous refactor
   patch.
* change the template function findEquivalencesFor to a regular
   function. This function has a single caller with type of
   PostDominatorTree. It's simpler to use the type directly
   because MachinePostDominatorTree is not a derived type of
   template DominatorTreeBase.

Differential Revision: https://reviews.llvm.org/D96981
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
Commit 502b3bfc6a713e5b6640faf48e72de08d7cb0aba by Stanislav.Mekhanoshin
[AMDGPU] require s-memtime-inst for __builtin_amdgcn_s_memtime

Differential Revision: https://reviews.llvm.org/D97420
The file was modifiedclang/include/clang/Basic/BuiltinsAMDGPU.def
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-vi.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-ci.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-gfx10.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn.cl
The file was addedclang/test/SemaOpenCL/builtins-amdgcn-error-gfx1030.cl
Commit ceaedfb5fc3a94adf9e67616d65414ddfee71e24 by craig.topper
[X86] Remove custom lowering of vXi1 ADD/SUB now that they are canonicalized to XOR in getNode.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D97478
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 7f6e3316456f939a062aad0eeaac983251a1747c by jonathan_roelofs
Support `#pragma clang section` directives on MachO targets

rdar://59560986

Differential Revision: https://reviews.llvm.org/D97233
The file was modifiedclang/lib/Sema/SemaAttr.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/lib/Basic/Targets/OSTargets.h
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was addedllvm/test/CodeGen/AArch64/clang-section-macho.ll
The file was modifiedllvm/include/llvm/MC/MCSectionMachO.h
The file was modifiedclang/test/CodeGenCXX/clang-sections.cpp
The file was modifiedllvm/lib/MC/MCSectionMachO.cpp
The file was modifiedllvm/lib/MC/MCParser/DarwinAsmParser.cpp
The file was modifiedclang/include/clang/Basic/TargetInfo.h
The file was addedclang/test/Sema/pragma-clang-section-macho.c
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
Commit 29e2d9461a91b76665139002a5b323fbb1b19d82 by Stanislav.Mekhanoshin
Option to ignore assume like intrinsic uses in hasAddressTaken()

Differential Revision: https://reviews.llvm.org/D96081
The file was modifiedllvm/include/llvm/IR/Function.h
The file was modifiedllvm/lib/Analysis/CallGraph.cpp
The file was modifiedllvm/lib/IR/Function.cpp
The file was addedllvm/test/Analysis/CallGraph/ignore-assumelike-calls.ll
Commit 9490b9f14b899ff07f3cfab7ad64e5fed8f48746 by llvm-dev
[DAG] Move simplification of SADDSAT/SSUBSAT/UADDSAT/USUBSAT of vXi1 to getNode()

As discussed on D97276 we should be able to always do this in node creation, we don't need a combine.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit d9c99043bdde5637bf32edaad10d1b8f8cd10b38 by Stanislav.Mekhanoshin
Option to ignore llvm[.compiler].used uses in hasAddressTaken()

Differential Revision: https://reviews.llvm.org/D96087
The file was addedllvm/test/Analysis/CallGraph/ignore-llvm-used.ll
The file was modifiedllvm/include/llvm/IR/Function.h
The file was modifiedllvm/lib/IR/Function.cpp
The file was modifiedllvm/lib/Analysis/CallGraph.cpp
Commit 84579fc24f03c8ca778e70325dad2166f1deaee3 by jezng
[lld-macho] Basic support for linkage and visibility attributes in LTO

When parsing bitcode, convert LTO Symbols to LLD Symbols in order to perform
resolution. The "winning" symbol will then be marked as Prevailing at LTO
compilation time. This is similar to what the other LLD ports do.

This change allows us to handle `linkonce` symbols correctly, and to deal with
duplicate bitcode symbols gracefully. Previously, both scenarios would result in
an assertion failure inside the LTO code, complaining that multiple Prevailing
definitions are not allowed.

While at it, I also added basic logic around visibility. We don't do anything
useful with it yet, but we do check that its value is valid. LLD-ELF appears to
use it only to set FinalDefinitionInLinkageUnit for LTO, which I think is just a
performance optimization.

From my local experimentation, the linker itself doesn't seem to do anything
differently when encountering linkonce / linkonce_odr / weak / weak_odr. So I've
only written a test for one of them. LLD-ELF has more, but they seem to mostly
be testing the intermediate bitcode output of their LTO backend...? I'm far from
an expert here though, so I might very well be missing things.

Reviewed By: #lld-macho, MaskRay, smeenai

Differential Revision: https://reviews.llvm.org/D94342
The file was addedlld/test/MachO/linkonce.ll
The file was modifiedlld/MachO/InputFiles.cpp
The file was addedlld/test/MachO/invalid/protected.ll
The file was modifiedlld/MachO/LTO.cpp
The file was addedlld/test/MachO/invalid/duplicate-symbol.ll
Commit d12ae7db9973d1aeb21849fadba1c612c0fd0590 by jonathan.l.peyton
[OpenMP] Fix accidental addition of use omp_lib_kinds

Fortran header accidentally had use omp_lib_kinds added inside a
subroutine and function. This patch removes the lines.
The file was modifiedopenmp/runtime/src/include/omp_lib.h.var
Commit 5bcb199a4317d30f6ada805c824e0e4be6db07bf by i
[test] Improve SanitizerCoverage tests
The file was addedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
The file was removedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-comdat.ll
The file was modifiedllvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
The file was removedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-nocomdat.ll
Commit 4f395db86b5cc11bb56853323d3cb1d4b6db5a0b by cjdb
adds more checks to -Wfree-nonheap-object

This commit adds checks for the following:

* labels
* block expressions
* random integers cast to `void*`
* function pointers cast to `void*`

Differential Revision: https://reviews.llvm.org/D94640
The file was addedclang/test/Analysis/free.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/test/Analysis/free.c
The file was modifiedclang/test/Analysis/malloc-fnptr-plist.c
The file was modifiedclang/test/Analysis/malloc.c
The file was modifiedclang/test/Analysis/weak-functions.c
Commit 8c074cb0b74e14ab1135d09cb53daf1a09602f73 by csigg
[mlir] Mark OpState::getAttrs() deprecated.

Fix call sites.

The method will be removed 2 weeks later.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D97464
The file was modifiedmlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
The file was modifiedmlir/lib/Dialect/Async/IR/Async.cpp
The file was modifiedmlir/lib/Dialect/PDL/IR/PDL.cpp
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/lib/IR/BuiltinDialect.cpp
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineOps.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/DecorateCompositeTypeLayoutPass.cpp
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROps.td
Commit 618862e89a022b2e8f73a62bed7c91654060dbab by Louis Dionne
[libc++] Fix incorrect forwarding in tuple's assignment operator

Also, add a bunch of tests for tuple and pair's assignment operators
involving reference types.

Differential Revision: https://reviews.llvm.org/D97419
The file was modifiedlibcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair.pass.cpp
The file was modifiedlibcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move.pass.cpp
The file was modifiedlibcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/move_pair.pass.cpp
The file was modifiedlibcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/convert_move.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/pairs/pairs.pair/move_ctor.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp
The file was modifiedlibcxx/include/tuple
Commit 4d63892acb17ba8ee5b146e83d38f244d8d92222 by i
[SanitizerCoverage] Drop !associated on metadata sections

In SanitizerCoverage, the metadata sections (`__sancov_guards`,
`__sancov_cntrs`, `__sancov_bools`) are referenced by functions.  After
inlining, such a `__sancov_*` section can be referenced by more than one
functions, but its sh_link still refers to the original function's section.
(Note: a SHF_LINK_ORDER section referenced by a section other than its linked-to
section violates the invariant.)

If the original function's section is discarded (e.g. LTO internalization +
`ld.lld --gc-sections`), ld.lld may report a `sh_link points to discarded section` error.

This above reasoning means that `!associated` is not appropriate to be called by
an inlinable function. Non-interposable functions are inline candidates, so we
have to drop `!associated`. A `__sancov_pcs` is not referenced by other sections
but is expected to parallel a metadata section, so we have to make sure the two
sections are retained or discarded at the same time. A section group does the
trick.  (Note: we have a module ctor, so `getUniqueModuleId` guarantees to
return a non-empty string, and `GetOrCreateFunctionComdat` guarantees to return
non-null.)

For interposable functions, we could keep using `!associated`, but
LTO can change the linkage to `internal` and allow such functions to be inlinable,
so we have to drop `!associated`, too. To not interfere with section
group resolution, we need to use the `noduplicates` variant (section group flag 0).
(This allows us to get rid of the ModuleID parameter.)
In -fno-pie and -fpie code (mostly dso_local), instrumented interposable
functions have WeakAny/LinkOnceAny linkages, which are rare. So the
section group header overload should be low.

This patch does not change the object file output for COFF (where `!associated` is ignored).

Reviewed By: morehouse, rnk, vitalybuka

Differential Revision: https://reviews.llvm.org/D97430
The file was modifiedllvm/lib/Transforms/Instrumentation/Instrumentation.cpp
The file was addedllvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.ll
The file was modifiedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
The file was modifiedllvm/lib/Transforms/IPO/SampleProfileProbe.cpp
The file was modifiedllvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
The file was modifiedllvm/include/llvm/Transforms/Instrumentation.h
The file was modifiedllvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
The file was removedllvm/test/Instrumentation/SanitizerCoverage/interposable-symbol-nocomdat.ll
Commit 169318088406510ce6816e6b022502a532b86d4b by Adrian Prantl
Add a nullptr check.

This doesn't actually reproduce with a dbg.declare(i8* null, ...)
which produces a non-null null Value, but I have seen this show up in
crash logs. I'm suspecting that there may be another pass forcibly
setting the operand to a nullptr.
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug.ll
Commit 5d64dd8e3c22e12e4f7b3d08ffe88fc41e727117 by Dan Liew
[Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option.

The new `-fsanitize-address-destructor-kind=` option allows control over how module
destructors are emitted by ASan.

The new option is consumed by both the driver and the frontend and is propagated into
codegen options by the frontend.

Both the legacy and new pass manager code have been updated to consume the new option
from the codegen options.

It would be nice if the new utility functions (`AsanDtorKindToString` and
`AsanDtorKindFromString`) could live in LLVM instead of Clang so they could be
consumed by other language frontends. Unfortunately that doesn't work because
the clang driver doesn't link against the LLVM instrumentation library.

rdar://71609176

Differential Revision: https://reviews.llvm.org/D96572
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Basic/Sanitizers.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedclang/include/clang/Basic/Sanitizers.h
The file was addedclang/test/CodeGen/asan-destructor-kind.cpp
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was addedclang/test/Driver/fsanitize-address-destructor-kind.c
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedclang/include/clang/Basic/CodeGenOptions.h
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/include/clang/Driver/SanitizerArgs.h
Commit fdce098b49cb038996441741a7b2ab3652502aec by Dan Liew
[Clang][ASan] Teach Clang to not emit ASan module destructors when compiling with `-mkernel` or `-fapple-kext`.

rdar://71609176

Differential Revision: https://reviews.llvm.org/D96573
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was addedclang/test/Driver/darwin-asan-mkernel-kext.c
Commit ec4408ad692b20a01cca8b5d86f359f6f16bae87 by Akira
[CodeGen] Call ConvertTypeForMem instead of ConvertType

This fixes a crash that occurs when the type passed to the method is
`_Bool`.

rdar://74493389
The file was modifiedclang/test/CodeGenObjC/strong-in-c-struct.m
The file was modifiedclang/lib/CodeGen/CGNonTrivialStruct.cpp
Commit 2c56776a319edf33505ca6c7f9be59657cdaf52b by kostyak
[scudo][standalone] Compact pointers for Caches/Batches

This CL introduces configuration options to allow pointers to be
compacted in the thread-specific caches and transfer batches. This
offers the possibility to have them use 32-bit of space instead of
64-bit for the 64-bit Primary, thus cutting the size of the caches
and batches by nearly half (and as such the memory used in size
class 0). The cost is an additional read from the region information
in the fast path.

This is not a new idea, as it's being used in the sanitizer_common
64-bit primary. The difference here is that it is configurable via
the allocator config, with the possibility of not compacting at all.

This CL enables compacting pointers in the Android and Fuchsia default
configurations.

Differential Revision: https://reviews.llvm.org/D96435
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/primary_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/primary32.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/release_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/primary64.h
The file was modifiedcompiler-rt/lib/scudo/standalone/size_class_map.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/local_cache.h
The file was modifiedcompiler-rt/lib/scudo/standalone/release.h
The file was modifiedcompiler-rt/lib/scudo/standalone/allocator_config.h
Commit 9a887f652c2e87019d2a0dfaa2e03a447b056270 by Vitaly Buka
[clang,NFC] Fix typos in file headers
The file was modifiedclang/lib/CodeGen/VarBypassDetector.cpp
The file was modifiedclang/lib/CodeGen/VarBypassDetector.h
Commit 6d52c4819294dafb2c072011d72bb523092248a2 by aeubanks
Rewrite MSVC toolchain discovery with VFS

This fixes an issue where the toolchain discovery doesn't respect the
VFS's current working directory, specifically clangd not respecting a
relative /winsysroot.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D97437
The file was modifiedclang/lib/Driver/ToolChains/MSVC.cpp
Commit 493210117785c348dcbbf7fc3615020ee81d2c9d by Andrey.Churbanov
[OpenMP] libomp: fix ittnotify stack stitching for teams construct

Stitching id could be overridden causing reference of destroyed object
when number of teams is 1. The patch separates stitching id store
location for teams and parallel nested in teams.

Differential Revision: https://reviews.llvm.org/D96562
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
Commit 7b1d2a2891d812ffc1bb08712143c79e457acbd4 by Dan Liew
[NFC] Switch to auto marshalling infrastructure for `-fsanitize-address-destructor-kind=` flag.

This change simplifies `clang/lib/Frontend/CompilerInvocation.cpp`
because we no longer need to manually parse the flag and set codegen
options in the frontend. However, we still need to manually parse the
flag in the driver because:

* The marshalling infrastructure doesn't operate there.
* We need to do some platform specific checks in the driver
  that will likely never be supported by any kind of marshalling
  infrastructure.

rdar://71609176

Differential Revision: https://reviews.llvm.org/D97327
The file was modifiedclang/test/CodeGen/asan-destructor-kind.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
Commit b889ef4214bc6dc8880fdd4badc0dcd9a3197753 by medismail.bennani
[lldb/Core] Change large function threshold variable into a setting.

This patch replaces the static large function threshold variable with a
global debugger setting (`stop-disassembly-max-size`).

The default threshold is now set to 32KB (instead of 8KB) and can be modified.

rdar://74726362

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

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
The file was modifiedlldb/test/Shell/Commands/command-disassemble-process.yaml
The file was modifiedlldb/include/lldb/Core/Debugger.h
The file was modifiedlldb/source/Commands/CommandObjectDisassemble.cpp
The file was modifiedlldb/source/Core/Debugger.cpp
The file was modifiedlldb/test/Shell/Commands/command-disassemble.s
The file was modifiedlldb/source/Core/CoreProperties.td
Commit 1df6e58e55a33991054f4041d87200bf1b217197 by Andrey.Churbanov
[OpenMP] libomp minor cleanup

Cleanup changes:
- check value read from file;
- remove dead code;
- make unsigned variable to read hexadecimal number to;
- add debug assertion to check ref count.

Differential Revision: https://reviews.llvm.org/D96893
The file was modifiedopenmp/runtime/src/kmp_affinity.cpp
The file was modifiedopenmp/runtime/src/kmp_taskdeps.h
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
Commit 3573a90b8aec082b8d7a1e2fc35f7103a0df7cb6 by nguillemot
[PM] Show the pass argument in pre/post-pass IR dumps

This patch adds each pass' pass argument in the header for IR dumps.
For example:

Before:

```
    *** IR Dump Before InstructionSelect ***
```

After:

```
    *** IR Dump Before InstructionSelect (instruction-select) ***
```

The goal is to make it easier to know what argument to pass to
command line options like `debug-only` or `run-pass` to further
investigate a given pass.
The file was modifiedclang/test/Misc/pr32207.c
The file was modifiedllvm/lib/IR/LegacyPassManager.cpp
The file was modifiedllvm/test/CodeGen/SystemZ/frame-26.mir
The file was modifiedllvm/test/Transforms/Inline/null-function.ll
Commit f15377084c3094ad47eca8738f15d397f558df7b by martin
[libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const char*

On Windows, path::value_type is wchar_t, so one can't pass the return
value of path::c_str() directly to std::remove().

This matches what was done for tests under std/input.output/filesystems
in 81db3c31aafec72f1cfec2a9da4381ece7f97a29 and
3784bdf2176f38cc30134fab776efb43506c0c54.

Differential Revision: https://reviews.llvm.org/D97458
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp
The file was modifiedlibcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp
Commit 3be7968c36c313b0de1baca0a87be2b98cb7f7c1 by martin
[libcxx] [test] Ifdef out uses of create_fifo on windows

Restructure code in directory_entry.obs/file_type_obs.pass.cpp
and directory_entry.obs/hard_link_count.pass.cpp to reduce the
amount of ifdeffery needed.

In file_type_obs.pass.cpp, we can't inline the calls to
env.create_* into the lambda calls (e.g. "test_path(env.create_*())"),
because the lambda removes the referenced file, and the hardlink
must be created while the earlier test file exists.

In hard_link_count.pass.cpp, move restoration of the original
directory permissions to the end of the lambda, so that new
directory entries can be created after the lambda has run once.

Differential Revision: https://reviews.llvm.org/D89948
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.status/status.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.equivalent/equivalent.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy/copy.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_type_obs.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.symlink_status/symlink_status.pass.cpp
The file was modifiedlibcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.is_empty/is_empty.pass.cpp
Commit 72fe14d40a527465deb76c9b2241297635fd45bf by martin
[libcxx] [cmake] Add asm to the runtimes build languages

This fixes building libunwind with a new enough version of cmake.

(libunwind treats its asm sources as C depending on the cmake version
on some platforms; this fixes builds when such workarounds aren't used,
when cmake treats asm correctly on its own.)

Differential Revision: https://reviews.llvm.org/D97399
The file was modifiedlibcxx/utils/ci/runtimes/CMakeLists.txt
Commit fb2e4f5401d3ec2507ac3b2c4f86d4bfa07c01ec by martin
[libcxx] [test] Add a MinGW target

This can't easily be autodetected (unless LIBCXX_TARGET_TRIPLE is
specified, or unless we query what the compiler's default target is,
which only is supported by clang), but can be chosen manually via
LIBCXX_TARGET_INFO.

This chooses mingw style lib naming, and uses -nostdlibc++ instead
of -nodefaultlib -nostdlib (as the latter requires specifying a lot of
details manually - this is done in the cmake config though).

Differential Revision: https://reviews.llvm.org/D97294
The file was modifiedlibcxx/utils/libcxx/test/config.py
The file was modifiedlibcxx/utils/libcxx/test/target_info.py
Commit c7d46f221e829411b0f0dec41409ed626646cdd2 by martin
[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms

This avoids having to query pathconf for a max size for
preallocating a buffer for the return value.

This is an extension to the POSIX getcwd() spec.

Differential Revision: https://reviews.llvm.org/D97460
The file was modifiedlibcxx/src/filesystem/operations.cpp
Commit 95d0d8e9e9d10da3cfa503fbba405e740aea3cc1 by richard
Fix constructor declarations that are invalid in C++20 onwards.

Under C++ CWG DR 2237, the constructor for a class template C must be
written as 'C(...)' not as 'C<T>(...)'. This fixes a build failure with
GCC in C++20 mode.

In passing, remove some other redundant '<T>' qualification from the
affected classes.
The file was modifiedllvm/include/llvm/ADT/STLExtras.h
Commit a813e9be5bc91203508bde239c1a15c5b8f8c0cc by rob.suderman
[MLIR][TOSA] Added Tosa to Standard/SCF Lowerings (const, if, while)

Includes a lowering for tosa.const, tosa.if, and tosa.while to Standard/SCF dialects. TosaToStandard is
used for constant lowerings and TosaToSCF handles the if/while ops.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D97352
The file was addedmlir/test/Conversion/TosaToStandard/tosa-to-standard.mlir
The file was addedmlir/include/mlir/Conversion/TosaToStandard/TosaToStandard.h
The file was addedmlir/include/mlir/Conversion/TosaToSCF/TosaToSCF.h
The file was addedmlir/lib/Conversion/TosaToStandard/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp
The file was addedmlir/test/Conversion/TosaToSCF/tosa-to-scf.mlir
The file was addedmlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
The file was addedmlir/lib/Conversion/TosaToSCF/TosaToSCFPass.cpp
The file was addedmlir/lib/Conversion/TosaToSCF/CMakeLists.txt
The file was addedmlir/lib/Conversion/TosaToSCF/TosaToSCF.cpp
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
Commit d95c6d3b69219d7b3049732f4081e3bb6ca70016 by richard
[www] Add cxx_status tracking for C++23.

Convert the list of standards to a table; it's starting to get unwieldy.
The file was modifiedclang/www/cxx_status.html
Commit 1959ead525b8830cc8a345f45e1c3ef9902d3229 by yhs
BPF: Implement TTI.getCmpSelInstrCost() properly

The Select insn in BPF is expensive as BPF backend
needs to resolve with conditionals.  This patch set
the getCmpSelInstrCost() to SCEVCheapExpansionBudget
for Select insn to prevent some Select insn related
optimizations.

This change is motivated during bcc code review for
   https://github.com/iovisor/bcc/pull/3270
where IndVarSimplifyPass eventually caused generating
the following asm code:
  ;       for (i = 0; (i < VIRTIO_MAX_SGS) && (i < num); i++) {
      14:       16 05 40 00 00 00 00 00 if w5 == 0 goto +64 <LBB0_6>
      15:       bc 51 00 00 00 00 00 00 w1 = w5
      16:       04 01 00 00 ff ff ff ff w1 += -1
      17:       67 05 00 00 20 00 00 00 r5 <<= 32
      18:       77 05 00 00 20 00 00 00 r5 >>= 32
      19:       a6 01 01 00 05 00 00 00 if w1 < 5 goto +1 <LBB0_4>
      20:       b7 05 00 00 06 00 00 00 r5 = 6
  00000000000000a8 <LBB0_4>:
      21:       b7 02 00 00 00 00 00 00 r2 = 0
      22:       b7 01 00 00 00 00 00 00 r1 = 0
  ;       for (i = 0; (i < VIRTIO_MAX_SGS) && (i < num); i++) {
      23:       7b 1a e0 ff 00 00 00 00 *(u64 *)(r10 - 32) = r1
      24:       7b 5a c0 ff 00 00 00 00 *(u64 *)(r10 - 64) = r5
Note that insn #15 has w1 = w5 and w1 is refined later but r5(w5) is
eventually saved on stack at insn #24 for later use. This cause
later verifier failures.

With this change, IndVarSimplifyPass won't do the above
transformation any more.

Differential Revision: https://reviews.llvm.org/D97479
The file was modifiedllvm/lib/Target/BPF/BPFTargetTransformInfo.h
Commit 4500f0a7321d75a061d09d92987b522e9cc09517 by zequanwu
[Clang][Attributes] Allow not_tail_called attribute to be applied to virtual function.

It would be beneficial to allow not_tail_called attribute to be applied to
virtual functions. I don't see any drawback of allowing this.

Differential Revision: https://reviews.llvm.org/D96832
The file was modifiedclang/include/clang/Basic/AttrDocs.td
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/test/CodeGenCXX/attr-notail.cpp
The file was modifiedclang/test/SemaCXX/attr-notail.cpp
Commit 00b3f2f310b4bc607563c472cd726aaaf9fcb1d4 by Adrian Prantl
Add more historic DWARF vendor extensions

The maintainer of libdwarf kindly provided this patch with a bunch of
historic DWARF extensions that are missing from Dwarf.def. This list
is helpful to avoid potential conflicts in the user-defined vendor
extension space in the future.

Patch by David Anderson!

[Relanded with an updated test.]

Differential Revision: https://reviews.llvm.org/D97242
The file was modifiedllvm/include/llvm/BinaryFormat/Dwarf.h
The file was modifiedllvm/test/ObjectYAML/MachO/DWARF5-abbrevValues.yaml
The file was modifiedllvm/include/llvm/BinaryFormat/Dwarf.def
Commit c49b600b2f8242612f60637ca9bdbc4e2b31f800 by francisvm
[Remarks] Emit remarks for "auto-init" !annotations

Using the !annotation metadata, emit remarks pointing to code added by
`-ftrivial-auto-var-init` that survived the optimizer.

Example:

```
auto-init.c:4:7: remark: Initialization inserted by -ftrivial-auto-var-init. [-Rpass-missed=annotation-remarks]
  int buf[1024];
      ^
```

The tests are testing various situations like calls/stores/other
instructions, with debug locations, and extra debug information on
purpose: more patches will come to improve the reporting to make it more
user-friendly, and these tests will show how the reporting evolves.

Differential Revision: https://reviews.llvm.org/D97405
The file was addedllvm/test/Transforms/Util/trivial-auto-var-init-unknown.ll
The file was addedllvm/test/Transforms/Util/trivial-auto-var-init-store.ll
The file was addedllvm/test/Transforms/Util/trivial-auto-var-init-call.ll
The file was modifiedllvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
Commit 4753a69a316b7705fc1b1442ad88afac059d542f by francisvm
[Remarks] Provide more information about auto-init stores

This adds support for analyzing the instruction with the !annotation
"auto-init" in order to generate a more user-friendly remark.

For now, support the store size, and whether it's atomic/volatile.

Example:

```
auto-init.c:4:7: remark: Store inserted by -ftrivial-auto-var-init.Store size: 4 bytes. [-Rpass-missed=annotation-remarks]
  int var;
      ^
```

Differential Revision: https://reviews.llvm.org/D97412
The file was addedllvm/lib/Transforms/Utils/AutoInitRemark.cpp
The file was modifiedllvm/lib/Transforms/Utils/CMakeLists.txt
The file was addedllvm/include/llvm/Transforms/Utils/AutoInitRemark.h
The file was modifiedllvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-store.ll
Commit fee9abe69c0eb5529984f5573cf6a5d881f80649 by francisvm
[Remarks] Provide more information about auto-init calls

This now analyzes calls to both intrinsics and functions.

For intrinsics, grab the ones we know and care about (mem* family) and
analyze the arguments.

For calls, use TLI to get more information about the libcalls, then
analyze the arguments if known.

```
auto-init.c:4:7: remark: Call to memset inserted by -ftrivial-auto-var-init. Memory operation size: 4096 bytes. [-Rpass-missed=annotation-remarks]
  int var[1024];
      ^
```

Differential Revision: https://reviews.llvm.org/D97489
The file was modifiedllvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
The file was modifiedllvm/test/Other/new-pm-O0-defaults.ll
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-call.ll
The file was modifiedllvm/test/Transforms/Util/trivial-auto-var-init-unknown.ll
The file was modifiedllvm/lib/Transforms/Utils/AutoInitRemark.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/AutoInitRemark.h
Commit 52c781f6f183c4c9f2feb11e340dc4c1f1c119e4 by llvmgnsyncbot
[gn build] Port 4753a69a316b
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn
Commit 24539f1ef2471d07bd87f833cb0288fc0f251f4b by jyknight
Add Alignment argument to IRBuilder CreateAtomicRMW and CreateAtomicCmpXchg.

And then push those change throughout LLVM.

Keep the old signature in Clang's CGBuilder for now -- that will be
updated in a follow-on patch (D97224).

The MLIR LLVM-IR dialect is not updated to support the new alignment
attribute, but preserves its existing behavior.

Differential Revision: https://reviews.llvm.org/D97223
The file was modifiedclang/lib/CodeGen/CGBuilder.h
The file was modifiedllvm/include/llvm/IR/IRBuilder.h
The file was modifiedllvm/lib/IR/Core.cpp
The file was modifiedllvm/lib/CodeGen/AtomicExpandPass.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
The file was modifiedllvm/include/llvm/CodeGen/AtomicExpandUtils.h
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
Commit 41751b637317bd9c97b0506ba77075694cd2d9cf by kostyak
[Clang][ASan] Correct AsanDtorKindToString to return non-void in default case

Post D96572, a warning started showing up for me:
`clang/lib/Basic/Sanitizers.cpp:73:1: warning: control reaches end of non-void function [-Wreturn-type]`

So this adds a default to the case to return invalid, which seems appropriate,
and appears to correct the issue.

Differential Revision: https://reviews.llvm.org/D97496
The file was modifiedclang/lib/Basic/Sanitizers.cpp
Commit c88fedef2a5d3f4c69cc668984bb93c8889890c2 by jianzhouzh
[dfsan] Conservative solution to atomic load/store

DFSan at store does store shadow data; store app data; and at load does
load shadow data; load app data.

When an application data is atomic, one overtainting case is

thread A: load shadow
thread B: store shadow
thread B: store app
thread A: load app

If the application address had been used by other flows, thread A reads
previous shadow, causing overtainting.

The change is similar to MSan's solution.
1) enforce ordering of app load/store
2) load shadow after load app; store shadow before shadow app
3) do not track atomic store by reseting its shadow to be 0.
The last one is to address a case like this.

Thread A: load app
Thread B: store shadow
Thread A: load shadow
Thread B: store app

This approach eliminates overtainting as a trade-off between undertainting
flows via shadow data race.

Note that this change addresses only native atomic instructions, but
does not support builtin libcalls yet.
   https://llvm.org/docs/Atomics.html#libcalls-atomic

Reviewed-by: morehouse

Differential Revision: https://reviews.llvm.org/D97310
The file was modifiedllvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
The file was addedllvm/test/Instrumentation/DataFlowSanitizer/atomics.ll
The file was addedcompiler-rt/test/dfsan/atomic.cpp
Commit 91f8aacc040f5a458cfc2a10c4039e0028931455 by rprichard
[Android] Use -l:libunwind.a with --rtlib=compiler-rt

On Android, the unwinder isn't part of the C++ STL and isn't (in older
versions) exported from libc.so. Instead, the driver links the static
unwinder archive implicitly. Currently, the Android NDK implicitly
links libgcc.a to provide both builtins and the unwinder.

To support switching to compiler-rt builtins and libunwind, make
--rtlib=compiler-rt behave the same way on Android, and implicitly pass
-l:libunwind.a to the linker.

Adjust the -ldl logic. For the Android NDK, the unwinder (whether
libgcc.a or libunwind.a) is linked statically and calls a function in
the dynamic loader for finding unwind tables (e.g. dl_iterate_phdr).
On Android, this function is in libc.a for static executables and
libdl.so otherwise, so -ldl is needed. (glibc doesn't need -ldl because
its libc.so exports dl_iterate_phdr.)

Differential Revision: https://reviews.llvm.org/D96403
The file was modifiedclang/lib/Driver/ToolChain.cpp
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
Commit 6d102f15a3af0a44cf2e26677e260bee425312f3 by yhs
BPF: Add LLVMTransformUtils in CMakefile LINK_COMPONENTS

Commit 1959ead525b8 ("BPF: Implement TTI.getCmpSelInstrCost()
properly") introduced a dependency on LLVMTransformUtils
library. Let us encode this dependency explicitly in
CMakefile to avoid build error.
The file was modifiedllvm/lib/Target/BPF/CMakeLists.txt
Commit 4bbcd63eea4950c38e29f9e29b1d11b7d7894469 by i
[ELF] Add -z start-stop-gc to let __start_/__stop_ not retain C identifier name sections

For one metadata section usage, each text section references a metadata section.
The metadata sections have a C identifier name to allow the runtime to collect them via `__start_/__stop_` symbols.

Since `__start_`/`__stop_` references are always present from live sections, the
C identifier name sections appear like GC roots, which means they cannot be
discarded by `ld --gc-sections`.

To make such sections GCable, either SHF_LINK_ORDER or a section group is needed.

SHF_LINK_ORDER is not suitable for the references can be inlined into other functions
(See D97430:
Function A (in the section .text.A) references its `__sancov_guard` section.
Function B inlines A (so now .text.B references `__sancov_guard` - this is invalid with the semantics of SHF_LINK_ORDER).

In the linking stage,
if `.text.A` gets discarded, and `__sancov_guard` is retained via the reference from `.text.B`,
the output will be invalid because `__sancov_guard` references the discarded `.text.A`.
LLD errors "sh_link points to discarded section".
)

A section group have size overhead, and is cumbersome when there is just one metadata section.

Add `-z start-stop-gc` to drop the "__start_/__stop_ references retain
non-SHF_LINK_ORDER non-SHF_GROUP C identifier name sections" rule.
We reserve the rights to switch the default in the future.

Reviewed By: phosek, jrtc27

Differential Revision: https://reviews.llvm.org/D96914
The file was modifiedlld/docs/ld.lld.1
The file was modifiedlld/ELF/MarkLive.cpp
The file was modifiedlld/test/ELF/gc-sections-metadata-startstop.s
The file was modifiedlld/ELF/Driver.cpp
The file was modifiedlld/ELF/Config.h
Commit d7fca3f0bf176536fc8769ad02a18884d993d7ce by craig.topper
[RISCV] Support fixed vector extract_element for FP types.
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit 9678b07e42ee4cfabbc7405441ccc8ac493df4b5 by peter
Revert 7a0da8894348, "scudo: Support memory tagging in the secondary allocator."

We measured a 2.5 seconds (17.5%) regression in Android boot time
performance with this change.
The file was modifiedcompiler-rt/lib/scudo/standalone/secondary.h
The file was modifiedcompiler-rt/lib/scudo/standalone/linux.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tsd_exclusive.h
The file was modifiedcompiler-rt/lib/scudo/standalone/allocator_config.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/common.h
The file was modifiedcompiler-rt/lib/scudo/standalone/fuchsia.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/primary64.h
The file was modifiedcompiler-rt/lib/scudo/standalone/memtag.h
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tsd_shared.h

Summary

  1. [sanitizer] Set default rtlib to libgcc (details)
  2. [sanitizer] Update x86 ABILIST filtering for x86_64 devices (details)
  3. [sanitizer] Pass -e dotbytes=10m to wget (details)
Commit 1e7891e19f509fd068eb74adf05c56c8cae71613 by rprichard
[sanitizer] Set default rtlib to libgcc

The default --rtlib for Android is about to change from libgcc to
compiler-rt (D96404), which will require a more substantial change to
this script to build the builtins and libunwind. For now, keep using
libgcc.

Differential Revision: https://reviews.llvm.org/D97354
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
Commit 0477d926afac3c9b4ab2e992421c887fc46d6cab by rprichard
[sanitizer] Update x86 ABILIST filtering for x86_64 devices

An x86_64 device (e.g. Android emulator or Cuttlefish VM) might have an
ro.product.cpu.abilist like:

    x86_64,x86,arm64-v8a,armeabi-v7a,armeabi
    x86_64,arm64-v8a,x86,armeabi-v7a,armeabi

When the first arch starts with x86, filter out the remaining archs
that don't start with x86.

Differential Revision: https://reviews.llvm.org/D97355
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
Commit 1a9f4798fee21e8a33af813f37b4d9b316f2bf6c by rprichard
[sanitizer] Pass -e dotbytes=10m to wget

When wget writes to a log file, it defaults to 1KiB per dot, which
produces ~20000 lines of log output for the NDK. This "-e dotbytes"
syntax has existed since 1999 in wget.

Differential Revision: https://reviews.llvm.org/D97356
The file was modifiedzorg/buildbot/builders/sanitizers/buildbot_android_functions.sh