SuccessChanges

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

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

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

Summary

  1. [RISCV] Support fixed-length vector sign/zero extension (details)
  2. [RISCV] Support fixed-length vector truncates (details)
  3. Pass GPU events instead of streams across async regions. (details)
  4. [RISCV] Support fixed-length vector FP_ROUND & FP_EXTEND (details)
  5. [lldb][NFC] Document ClangASTImporter (details)
  6. [clang][cli] NFC: Remove intermediate command line parsing functions (details)
  7. [clang][cli] NFC: Remove ArgList infrastructure for recording queries (details)
  8. [clang] Remove a superfluous semicolon, silencing GCC warnings. NFC. (details)
  9. [clang][driver] Set the input type to Fortran when reading from stdin (details)
  10. [clang][flang] Improve the consistency of the code-base (details)
  11. [RISCV] Support fixed-length vector i2fp/fp2i conversions (details)
  12. [RISCV] Update RVV ISA section-header comments. NFC. (details)
  13. [mlir][NFC] Add missing namespace qualifier to ODS generated code (details)
  14. [clang][sema] Ignore xor-used-as-pow if both sides are macros (details)
  15. Fix a test case that should check whether or not it is passed into lld (details)
  16. [RISCV] Add isel pattern to match X > -1 to bgez. (details)
  17. [arm builtin crosscompile docs] alphabetize flags, no behavior change (details)
  18. [arm builtin crosscompile docs] add COMPILER_RT_BUILD_MEMPROF=OFF (details)
  19. [RISCV] Teach CleanupVSETVLI to remove 'vsetvli zero, zero, vtype' when the vtype matches the previous vsetvli or vsetivli (details)
  20. [IndVars] Add test cases inspired by PR48965. (details)
  21. [CodeGen] Format code comment to 80 columns. NFC. (details)
  22. [MLIR][affine-loop-fusion] Handle defining ops between the source and dest loops (details)
  23. [mlir] Check 'iter_args' in 'isLoopParallel' utility (details)
  24. [SampleFDO][NFC] Refactor: make SampleProfileLoaderBaseImpl a template class (details)
  25. [AMDGPU] require s-memtime-inst for __builtin_amdgcn_s_memtime (details)
  26. [X86] Remove custom lowering of vXi1 ADD/SUB now that they are canonicalized to XOR in getNode. (details)
  27. Support `#pragma clang section` directives on MachO targets (details)
  28. Option to ignore assume like intrinsic uses in hasAddressTaken() (details)
  29. [DAG] Move simplification of SADDSAT/SSUBSAT/UADDSAT/USUBSAT of vXi1 to getNode() (details)
  30. Option to ignore llvm[.compiler].used uses in hasAddressTaken() (details)
  31. [lld-macho] Basic support for linkage and visibility attributes in LTO (details)
  32. [OpenMP] Fix accidental addition of use omp_lib_kinds (details)
  33. [test] Improve SanitizerCoverage tests (details)
  34. adds more checks to -Wfree-nonheap-object (details)
  35. [mlir] Mark OpState::getAttrs() deprecated. (details)
  36. [libc++] Fix incorrect forwarding in tuple's assignment operator (details)
  37. [SanitizerCoverage] Drop !associated on metadata sections (details)
  38. Add a nullptr check. (details)
  39. [Clang][ASan] Introduce `-fsanitize-address-destructor-kind=` driver & frontend option. (details)
  40. [Clang][ASan] Teach Clang to not emit ASan module destructors when compiling with `-mkernel` or `-fapple-kext`. (details)
  41. [CodeGen] Call ConvertTypeForMem instead of ConvertType (details)
  42. [scudo][standalone] Compact pointers for Caches/Batches (details)
  43. [clang,NFC] Fix typos in file headers (details)
  44. Rewrite MSVC toolchain discovery with VFS (details)
  45. [OpenMP] libomp: fix ittnotify stack stitching for teams construct (details)
  46. [NFC] Switch to auto marshalling infrastructure for `-fsanitize-address-destructor-kind=` flag. (details)
  47. [lldb/Core] Change large function threshold variable into a setting. (details)
  48. [OpenMP] libomp minor cleanup (details)
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 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/RISCVInstrInfoVVLPatterns.td
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/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-exttrunc.ll
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/test/Conversion/GPUCommon/lower-wait-to-gpu-runtime-calls.mlir
The file was modifiedmlir/lib/Conversion/GPUCommon/ConvertLaunchFuncToRuntimeCalls.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/AsyncRegionRewriter.cpp
The file was modifiedmlir/test/Dialect/GPU/async-region.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/RISCVISelLowering.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.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/RISCVInstrInfoVSDPatterns.td
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 modifiedclang/tools/driver/driver.cpp
The file was modifiedflang/tools/flang-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/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-i2fp.ll
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/RISCVInstrInfoVSDPatterns.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.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/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
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/lib/Sema/SemaExpr.cpp
The file was modifiedclang/test/SemaCXX/warn-xor-as-pow.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/test/CodeGen/RISCV/xaluo.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.td
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/lib/Target/RISCV/RISCVCleanupVSETVLI.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-int-rv64.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-extract.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-int-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vreductions-int-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/extractelt-fp-rv32.ll
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-insert.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/test/Dialect/Affine/parallelize.mlir
The file was modifiedmlir/lib/Analysis/Utils.cpp
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/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
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/test/CodeGenOpenCL/builtins-amdgcn-vi.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn.cl
The file was modifiedclang/include/clang/Basic/BuiltinsAMDGPU.def
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-gfx9.cl
The file was addedclang/test/SemaOpenCL/builtins-amdgcn-error-gfx1030.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-gfx10.cl
The file was modifiedclang/test/CodeGenOpenCL/builtins-amdgcn-ci.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/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/lib/MC/MCSectionMachO.cpp
The file was modifiedclang/lib/Sema/SemaDeclAttr.cpp
The file was modifiedclang/lib/Sema/SemaAttr.cpp
The file was modifiedclang/include/clang/Basic/TargetInfo.h
The file was modifiedclang/test/CodeGenCXX/clang-sections.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
The file was addedclang/test/Sema/pragma-clang-section-macho.c
The file was modifiedllvm/lib/MC/MCParser/DarwinAsmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCSectionMachO.h
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/lib/Analysis/CallGraph.cpp
The file was addedllvm/test/Analysis/CallGraph/ignore-assumelike-calls.ll
The file was modifiedllvm/lib/IR/Function.cpp
The file was modifiedllvm/include/llvm/IR/Function.h
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/DAGCombiner.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.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 modifiedllvm/include/llvm/IR/Function.h
The file was modifiedllvm/lib/Analysis/CallGraph.cpp
The file was addedllvm/test/Analysis/CallGraph/ignore-llvm-used.ll
The file was modifiedllvm/lib/IR/Function.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 modifiedlld/MachO/InputFiles.cpp
The file was addedlld/test/MachO/linkonce.ll
The file was modifiedlld/MachO/LTO.cpp
The file was addedlld/test/MachO/invalid/duplicate-symbol.ll
The file was addedlld/test/MachO/invalid/protected.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 modifiedllvm/test/Instrumentation/SanitizerCoverage/inline-bool-flag.ll
The file was removedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-nocomdat.ll
The file was addedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
The file was removedllvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-comdat.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 modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was addedclang/test/Analysis/free.cpp
The file was modifiedclang/test/Analysis/weak-functions.c
The file was modifiedclang/lib/Sema/SemaChecking.cpp
The file was modifiedclang/test/Analysis/malloc-fnptr-plist.c
The file was modifiedclang/test/Analysis/free.c
The file was modifiedclang/test/Analysis/malloc.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/PDL/IR/PDL.cpp
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
The file was modifiedmlir/lib/Dialect/PDLInterp/IR/PDLInterp.cpp
The file was modifiedmlir/lib/Dialect/Affine/IR/AffineOps.cpp
The file was modifiedmlir/lib/Dialect/Async/IR/Async.cpp
The file was modifiedmlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
The file was modifiedmlir/lib/Dialect/Shape/IR/Shape.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/Dialect.cpp
The file was modifiedmlir/lib/IR/BuiltinDialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedflang/include/flang/Optimizer/Dialect/FIROps.td
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/DecorateCompositeTypeLayoutPass.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/IR/Ops.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
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/move_ctor.pass.cpp
The file was modifiedlibcxx/include/tuple
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/convert_move.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/utility/pairs/pairs.pair/assign_rv_pair_U_V.pass.cpp
The file was modifiedlibcxx/test/std/utilities/utility/pairs/pairs.pair/rv_pair_U_V.pass.cpp
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/include/llvm/Transforms/Instrumentation.h
The file was addedllvm/test/Instrumentation/SanitizerCoverage/interposable-symbol.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/test/Instrumentation/SanitizerCoverage/trace-pc-guard.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/Instrumentation.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/test/Transforms/Coroutines/coro-debug.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
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/lib/Basic/Sanitizers.cpp
The file was modifiedclang/include/clang/Basic/CodeGenOptions.h
The file was modifiedclang/include/clang/Driver/SanitizerArgs.h
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
The file was addedclang/test/CodeGen/asan-destructor-kind.cpp
The file was modifiedclang/include/clang/Basic/Sanitizers.h
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was addedclang/test/Driver/fsanitize-address-destructor-kind.c
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 addedclang/test/Driver/darwin-asan-mkernel-kext.c
The file was modifiedclang/lib/Driver/SanitizerArgs.cpp
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/lib/CodeGen/CGNonTrivialStruct.cpp
The file was modifiedclang/test/CodeGenObjC/strong-in-c-struct.m
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/size_class_map.h
The file was modifiedcompiler-rt/lib/scudo/standalone/allocator_config.h
The file was modifiedcompiler-rt/lib/scudo/standalone/local_cache.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/release_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/primary32.h
The file was modifiedcompiler-rt/lib/scudo/standalone/release.h
The file was modifiedcompiler-rt/lib/scudo/standalone/primary64.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/primary_test.cpp
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/include/clang/Driver/Options.td
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/test/CodeGen/asan-destructor-kind.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.s
The file was modifiedlldb/source/Core/CoreProperties.td
The file was modifiedlldb/test/Shell/Commands/command-disassemble-process.yaml
The file was modifiedlldb/source/Core/Debugger.cpp
The file was modifiedlldb/source/Commands/CommandObjectDisassemble.cpp
The file was modifiedlldb/include/lldb/Core/Debugger.h
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_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_taskdeps.h