Progress:
In progressChanges

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

Summary

  1. [Passes] Run peeling as part of simple/full loop unrolling. (details)
  2. [AMDGPU] Fix use of HasModifiers in VopProfile (details)
  3. [AMDGPU] Add IntrWillReturn to three intrinsics (details)
  4. [CostModel] Handle CTLZ and CCTZ in getTypeBasedIntrinsicInstrCost (details)
  5. Fix signed/unsigned comparison warning. NFCI. (details)
  6. [LoopUnswitch] Add some additional tests. (details)
  7. [LoopUnswitch] Avoid partially unswitching too aggressively. (details)
  8. AMDGPU: Clear IsSSA property in SIFormMemoryClauses (details)
  9. [libomptarget][NFC] Fixed obsolete function names in comments (details)
  10. [AMDGPU] Fix null-dereference static analysis warnings. NFCI. (details)
  11. [Sema] diagnoseEquivalentInternalLinkageDeclarations - assert for non-null NamedDecl. NFCI. (details)
  12. [mlir][nfc] Move `getInnermostParallelLoops` to SCF/Transforms/Utils.h. (details)
  13. [NFC] Disallow unused prefixes under clang/test/CodeGen (details)
  14. [AMDGPU] HSAMD::fromString - replace std::string arg with StringRef. NFCI. (details)
  15. Fix null dereference static analysis warning. NFCI. (details)
  16. [LoopUtils] do not initialize Cmp predicate unnecessarily; NFC (details)
  17. [LoopVectorize] add test for fmin/fmax FMF propagation; NFC (details)
  18. [mlir] Add Python bindings for IntegerSet (details)
  19. [clangd] Add std::size_t to StdSymbol mapping (details)
  20. [lldb] Remove unused ThreadPlanStack::GetStackOfKind (NFC) (details)
  21. [OpenMP][deviceRTLs] Build the deviceRTLs with OpenMP instead of target dependent language (details)
  22. AMDGPU: Add assertion to determineCalleeSaves (details)
  23. AMDGPU: Fix redundant FP spilling/assert in some functions (details)
  24. [mlir] Set CUDA/ROCm context before creating resources. (details)
  25. [lldb][NFC] Another attempt to fix GCC 5.x compilation (details)
  26. Reland "[lit] Use os.cpu_count() to cleanup TODO" (details)
  27. [mlir] sret and byval now require a type argument when constructed. (details)
  28. [RISCV] Have customLegalizeToWOp truncate to the original type instead of i32 now that we use it for i8/i16 as well. (details)
  29. [ARM] [ELF] Fix ARMMaterializeGV for Indirect calls (details)
  30. [clangd] Selection handles CXXBaseSpecifier (details)
  31. [clangd] FindTarget resolves base specifier (details)
  32. [libomptarget][devicertl][amdgpu] Fix build, variable renaming error (details)
  33. Support for instrumenting only selected files or functions (details)
  34. [gn build] Port 4edf35f11a9e (details)
  35. [OpenMP][Libomptarget] Introduce changes to support remote plugin (details)
  36. [AMDGPU] Update subtarget features for new target ID support (details)
  37. CGDebugInfo: Drop Loc.isInvalid() special case from getLineNumber (details)
  38. CGDebugInfo CreatedLimitedType: Drop file/line for RecordType with invalid location (details)
  39. [flang][openacc][NFC] Organize clause validity tests by directive (details)
  40. Make SBDebugger::CreateTargetWithFileAndArch work with lldb::LLDB_DEFAULT_ARCH (details)
  41. Revert "Support for instrumenting only selected files or functions" (details)
  42. Add -fbinutils-version= to gate ELF features on the specified binutils version (details)
  43. [libc++] Fix oss-fuzz build (details)
  44. [llvm-elfabi] Support ELF file that lacks .gnu.hash section (details)
  45. [OpenMP][Libomptarget] Introduce Remote Offloading Plugin (details)
  46. [libomptarget][cuda] Only run tests when sure there is cuda available (details)
  47. [libomptarget][cuda] Gracefully handle missing cuda library (details)
  48. [llvm-elfabi] Fix test after D95140 (details)
  49. [gn build] Port 1e634f3952aa (details)
  50. [OpenMP][Libomptarget] Fix cmake error on remote plugin (details)
  51. [GlobalISel][IRTranslator] Ignore the llvm.experimental.noalias.scope.decl intrinsic. (details)
  52. [NFC][lit] Cleanup code using string interpolation (details)
  53. [X86] In shrinkAndImmediate, place the new constant into the topological sort. (details)
  54. [NFC] Show instcombine powi simplifications drop FMF (details)
  55. [InstCombine] Preserve FMF for powi simplifications. (details)
  56. [libomptarget][NFC] Use portable printf format specifiers. (details)
  57. [NewPM] Add ExtraVectorizerPasses support (details)
  58. [ARM] Fix STRT/STRHT/STRBT input/output operands. (details)
  59. Frontend: Fix memory leak in CompilerInstance::setVerboseOutputStream (details)
  60. Salvage debug info for function arguments in coro-split funclets. (details)
  61. [GlobalISel] Implement computeKnownBits for G_SEXT_INREG (details)
Commit 35b3989a30eefa66cd6edca4c6e1ec061c05ad96 by flo
[Passes] Run peeling as part of simple/full loop unrolling.

Loop peeling removes conditions from loop bodies that become invariant
after a small number of iterations. When triggered, this leads to fewer
compares and possibly PHIs in loop bodies, enabling further
optimizations. The current cost-model of loop peeling should be quite
conservative/safe, i.e. only peel if a condition in the loop becomes
known after peeling.

For example, see PR47671, where loop peeling enables vectorization by
removing a PHI the vectorizer does not understand. Granted, the
loop-vectorizer could also be taught about constant PHIs, but loop
peeling is likely to enable other optimizations as well.

This has an impact on quite a few benchmarks from
MultiSource/SPEC2000/SPEC2006 on X86 with -O3 -flto, for example

    Same hash: 186 (filtered out)
    Remaining: 51
    Metric: loop-vectorize.LoopsVectorized

    Program                                        base   patch  diff
     test-suite...ve-susan/automotive-susan.test     8.00   9.00 12.5%
     test-suite...nal/skidmarks10/skidmarks.test    35.00  31.00 -11.4%
     test-suite...lications/sqlite3/sqlite3.test    41.00  43.00  4.9%
     test-suite...s/ASC_Sequoia/AMGmk/AMGmk.test    25.00  26.00  4.0%
     test-suite...006/450.soplex/450.soplex.test    88.00  89.00  1.1%
     test-suite...TimberWolfMC/timberwolfmc.test   120.00 119.00 -0.8%
     test-suite.../CINT2006/403.gcc/403.gcc.test   215.00 216.00  0.5%
     test-suite...006/447.dealII/447.dealII.test   957.00 958.00  0.1%
     test-suite...ternal/HMMER/hmmcalibrate.test    75.00  75.00  0.0%

    Same hash: 186 (filtered out)
    Remaining: 51
    Metric: loop-vectorize.LoopsAnalyzed

    Program                                        base    patch   diff
     test-suite...ks/Prolangs-C/agrep/agrep.test   440.00  434.00  -1.4%
     test-suite...nal/skidmarks10/skidmarks.test   312.00  308.00  -1.3%
     test-suite...marks/7zip/7zip-benchmark.test   6399.00 6323.00 -1.2%
     test-suite...lications/minisat/minisat.test   134.00  135.00   0.7%
     test-suite...rks/FreeBench/pifft/pifft.test   295.00  297.00   0.7%
     test-suite...TimberWolfMC/timberwolfmc.test   1879.00 1869.00 -0.5%
     test-suite...pplications/treecc/treecc.test   689.00  691.00   0.3%
     test-suite...T2000/300.twolf/300.twolf.test   1593.00 1597.00  0.3%
     test-suite.../Benchmarks/Bullet/bullet.test   1394.00 1392.00 -0.1%
     test-suite...ications/JM/ldecod/ldecod.test   1431.00 1429.00 -0.1%
     test-suite...6/464.h264ref/464.h264ref.test   2229.00 2230.00  0.0%
     test-suite...lications/sqlite3/sqlite3.test   2590.00 2589.00 -0.0%
     test-suite...ications/JM/lencod/lencod.test   2732.00 2733.00  0.0%
     test-suite...006/453.povray/453.povray.test   3395.00 3394.00 -0.0%

Note the -11% regression in number of loops vectorized for skidmarks. I
suspect this corresponds to the fact that those loops are gone now (see
the reduction in number of loops analyzed by LV).

Reviewed By: lebedev.ri

Differential Revision: https://reviews.llvm.org/D88471
The file was modifiedllvm/include/llvm/Transforms/Scalar.h
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopUnrollPass.h
The file was modifiedllvm/test/Transforms/PhaseOrdering/X86/peel-before-lv-to-enable-vectorization.ll
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
Commit 608ac62540addfb5ee425cf407bafffb40fd3f06 by Mirko.Brkusanin
[AMDGPU] Fix use of HasModifiers in VopProfile

HasModifiers should be true if at least one modifier is used.
This should make the use of this field bit more consistent.

Differential Revision: https://reviews.llvm.org/D94795
The file was modifiedllvm/lib/Target/AMDGPU/VOP1Instructions.td
The file was modifiedllvm/lib/Target/AMDGPU/VOP3Instructions.td
The file was modifiedllvm/lib/Target/AMDGPU/VOP2Instructions.td
The file was modifiedllvm/lib/Target/AMDGPU/VOP3PInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.td
Commit b36370d15335d7703715eb8cf3a3c62da36c2668 by sebastian.neubauer
[AMDGPU] Add IntrWillReturn to three intrinsics

None of these can terminate a wave or lane.
With these, all intrinsic are IntrWillReturn except those that change
exec or can terminate the wave.

Not marking intrinsics as WillReturn may prevent optimizations in the
future: https://lists.llvm.org/pipermail/llvm-dev/2021-January/148047.html

Differential Revision: https://reviews.llvm.org/D95436
The file was modifiedllvm/include/llvm/IR/IntrinsicsAMDGPU.td
Commit b9417c3616d5e1c0cae47e0b6e07209433316abe by sander.desmalen
[CostModel] Handle CTLZ and CCTZ in getTypeBasedIntrinsicInstrCost

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D95355
The file was modifiedllvm/test/Analysis/CostModel/ARM/intrinsic-cost-kinds.ll
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
Commit 110837fbf6a98357c1802de305bf90b1f27734e4 by llvm-dev
Fix signed/unsigned comparison warning. NFCI.
The file was modifiedclang-tools-extra/clangd/index/Serialization.cpp
Commit b2b2aa1c607781a3343085900fa7462ee498c993 by flo
[LoopUnswitch] Add some additional tests.

Add a few additional tests where partial unswitching is not really
profitable and should be avoided.
The file was modifiedllvm/test/Transforms/LoopUnswitch/partial-unswitch.ll
Commit 1272f16d14264939ad3e73c84acc28a63970bc06 by flo
[LoopUnswitch] Avoid partially unswitching too aggressively.

This patch adds additional checks to avoid partial unswitching
in cases where it won't be profitable, e.g. because the path directly
exits the loop anyways.
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnswitch.cpp
The file was modifiedllvm/test/Transforms/LoopUnswitch/partial-unswitch.ll
Commit 551a69e4184d1da9439d6326b35e1061b6756632 by Matthew.Arsenault
AMDGPU: Clear IsSSA property in SIFormMemoryClauses

Fixes verifier error when writing MIR testcases
The file was modifiedllvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
Commit 94cf89d1c2c543a8a2e7b8346a1af7f8605327b5 by georgios.rokos
[libomptarget][NFC] Fixed obsolete function names in comments
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/private.h
Commit ee3da8958a6400fb919345c75ccda684da3fd663 by llvm-dev
[AMDGPU] Fix null-dereference static analysis warnings. NFCI.

Avoid repeated calls to isZeroValue() and check for a null pointer before dereferencing a dyn_cast<>.
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp
Commit feb0b4ec0a448a23b912d65980b6b5eef636e131 by llvm-dev
[Sema] diagnoseEquivalentInternalLinkageDeclarations - assert for non-null NamedDecl. NFCI.

Fixes clang static analysis warnings.
The file was modifiedclang/lib/Sema/SemaOverload.cpp
Commit 80966447a2072815ecc59e654c6e1884262739f4 by pifon
[mlir][nfc] Move `getInnermostParallelLoops` to SCF/Transforms/Utils.h.
The file was modifiedmlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
The file was modifiedmlir/include/mlir/Dialect/SCF/Utils.h
The file was modifiedmlir/lib/Dialect/SCF/Transforms/Utils.cpp
Commit 0c0d009a88f25e9b647c50b54672b30001fabbbb by mtrofin
[NFC] Disallow unused prefixes under clang/test/CodeGen

Differential Revision: https://reviews.llvm.org/D95417
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-alloc_align-on-function-variable.cpp
The file was addedclang/test/CodeGen/lit.local.cfg
The file was modifiedclang/test/CodeGen/catch-nullptr-and-nonzero-offset-blacklist.c
The file was modifiedclang/test/CodeGen/cmse-clear-return.c
The file was modifiedclang/test/CodeGen/catch-implicit-integer-sign-changes-true-negatives.c
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params-variable.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-openmp.cpp
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-three-params.cpp
The file was modifiedclang/test/CodeGen/catch-implicit-signed-integer-truncations-incdec.c
The file was modifiedclang/test/CodeGen/catch-nullptr-and-nonzero-offset-when-nullptr-is-defined.c
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-align_value-on-lvalue.cpp
The file was modifiedclang/test/CodeGen/catch-pointer-overflow.c
The file was modifiedclang/test/CodeGen/catch-pointer-overflow-volatile.c
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-builtin_assume_aligned-two-params.cpp
The file was modifiedclang/test/CodeGen/catch-nullptr-and-nonzero-offset.c
The file was modifiedclang/test/CodeGen/catch-alignment-assumption-attribute-assume_aligned-on-function-two-params.cpp
The file was modifiedclang/test/CodeGen/catch-implicit-integer-sign-changes-incdec.c
Commit f82cff31d35d77510e00dab5c772db8b013497ee by llvm-dev
[AMDGPU] HSAMD::fromString - replace std::string arg with StringRef. NFCI.

Removes an unnecessary chain of StringRef -> std::string -> StringRef conversions
The file was modifiedllvm/lib/Support/AMDGPUMetadata.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp
The file was modifiedllvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
The file was modifiedllvm/include/llvm/Support/AMDGPUMetadata.h
Commit 879c12d95a27a62797aede2f7d4f1886ad439d5d by llvm-dev
Fix null dereference static analysis warning. NFCI.

Replace cast_or_null<> with cast<> as we immediately dereference the pointer afterward so we're not expecting a null pointer.
The file was modifiedclang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp
Commit 09b1c56366b5a81d43013e7d5e739020f866c97f by spatel
[LoopUtils] do not initialize Cmp predicate unnecessarily; NFC

The switch must set the predicate correctly; anything else
should lead to unreachable/assert.

I'm trying to fix FMF propagation here and the callers,
so this is a preliminary cleanup.
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
Commit 00773ef78aaa8c790cd12dcff4e30f8835ef944f by spatel
[LoopVectorize] add test for fmin/fmax FMF propagation; NFC

The existing test has less FMF than we might expect if
our FMF was fixed (on all FP values), so this additional
test is intended to check propagation in a more "normal"
example.
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/reduction-fastmath.ll
Commit b208e5bcd0be5ffb6346b1eab30ad372782bbe4b by zinenko
[mlir] Add Python bindings for IntegerSet

This follows up on the introduction of C API for the same object and is similar
to AffineExpr and AffineMap.

Reviewed By: stellaraccident

Differential Revision: https://reviews.llvm.org/D95437
The file was modifiedmlir/lib/Bindings/Python/IRModules.cpp
The file was addedmlir/test/Bindings/Python/ir_integer_set.py
The file was modifiedmlir/lib/Bindings/Python/IRModules.h
The file was modifiedmlir/include/mlir-c/Bindings/Python/Interop.h
Commit 9190f17a7cc56b6eb6885fc8d08c8ac81d2c0c98 by kadircet
[clangd] Add std::size_t to StdSymbol mapping

This is a common symbol that's missing from our mapping because
cppreference yields multiple headers.

Add it manually by picking cstddef to prevent insertion of some stdlib-internal
headers instead.

Fixes https://github.com/clangd/clangd/issues/666.

Differential Revision: https://reviews.llvm.org/D95423
The file was modifiedclang-tools-extra/clangd/index/CanonicalIncludes.cpp
Commit 90b8ae016bca66b472ca7085de96a02c06124baf by davelee.com
[lldb] Remove unused ThreadPlanStack::GetStackOfKind (NFC)

This function isn't used.

Differential Revision: https://reviews.llvm.org/D95411
The file was modifiedlldb/source/Target/ThreadPlanStack.cpp
The file was modifiedlldb/include/lldb/Target/ThreadPlanStack.h
Commit 7c03f7d7d04c0f017cc8e9522209c98036042f17 by tianshilei1992
[OpenMP][deviceRTLs] Build the deviceRTLs with OpenMP instead of target dependent language

From this patch (plus some landed patches), `deviceRTLs` is taken as a regular OpenMP program with just `declare target` regions. In this way, ideally, `deviceRTLs` can be written in OpenMP directly. No CUDA, no HIP anymore. (Well, AMD is still working on getting it work. For now AMDGCN still uses original way to compile) However, some target specific functions are still required, but they're no longer written in target specific language. For example, CUDA parts have all refined by replacing CUDA intrinsic and builtins with LLVM/Clang/NVVM intrinsics.
Here're a list of changes in this patch.
1. For NVPTX, `DEVICE` is defined empty in order to make the common parts still work with AMDGCN. Later once AMDGCN is also available, we will completely remove `DEVICE` or probably some other macros.
2. Shared variable is implemented with OpenMP allocator, which is defined in `allocator.h`. Again, this feature is not available on AMDGCN, so two macros are redefined properly.
3. CUDA header `cuda.h` is dropped in the source code. In order to deal with code difference in various CUDA versions, we build one bitcode library for each supported CUDA version. For each CUDA version, the highest PTX version it supports will be used, just as what we currently use for CUDA compilation.
4. Correspondingly, compiler driver is also updated to support CUDA version encoded in the name of bitcode library. Now the bitcode library for NVPTX is named as `libomptarget-nvptx-cuda_[cuda_version]-sm_[sm_number].bc`, such as `libomptarget-nvptx-cuda_80-sm_20.bc`.

With this change, there are also multiple features to be expected in the near future:
1. CUDA will be completely dropped when compiling OpenMP. By the time, we also build bitcode libraries for all supported SM, multiplied by all supported CUDA version.
2. Atomic operations used in `deviceRTLs` can be replaced by `omp atomic` if OpenMP 5.1 feature is fully supported. For now, the IR generated is totally wrong.
3. Target specific parts will be wrapped into `declare variant` with `isa` selector if it can work properly. No target specific macro is needed anymore.
4. (Maybe more...)

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D94745
The file was removedclang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-sm_20.bc
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/nvptx_interface.h
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
The file was addedopenmp/libomptarget/deviceRTLs/common/allocator.h
The file was modifiedclang/test/Driver/openmp-offload-gpu.c
The file was modifiedclang/lib/Driver/ToolChains/Cuda.cpp
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/reduction.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/CMakeLists.txt
The file was modifiedopenmp/libomptarget/deviceRTLs/common/omptarget.h
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/omp_data.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.cu
The file was addedclang/test/Driver/Inputs/libomptarget/libomptarget-nvptx-cuda_80-sm_20.bc
Commit 92d1195b5f76548ca35bc00d97e0a28053b2c4a4 by Matthew.Arsenault
AMDGPU: Add assertion to determineCalleeSaves

Make sure this isn't getting called multiple times. I was surprised we
were modifying the function here, which I think is a bit questionable.
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
Commit 5f9707b7960e9a86330dacb814b2ec55207e6f87 by Matthew.Arsenault
AMDGPU: Fix redundant FP spilling/assert in some functions

If a function has stack objects, and a call, we require an FP. If we
did not initially have any stack objects, and only introduced them
during PrologEpilogInserter for CSR VGPR spills, SILowerSGPRSpills
would end up spilling the FP register as if it were a normal
register. This would result in an assert in a debug build, or
redundant handling of the FP register in a release build.

Try to predict that we will have an FP later, although this is ugly.
The file was addedllvm/test/CodeGen/AMDGPU/need-fp-from-csr-vgpr-spill.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIFrameLowering.cpp
Commit 8262cd8a0e24fd5d3d528d675e106031d4232d8d by csigg
[mlir] Set CUDA/ROCm context before creating resources.

The current context is thread-local state, and in preparation of GPU async execution (on multiple threads) we need to set the context before calling API that create resources.

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D94495
The file was modifiedmlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
The file was modifiedmlir/tools/mlir-rocm-runner/rocm-runtime-wrappers.cpp
Commit 48e09faa9457b99b927ccc0d0fbbe452eaf9901d by Raphael Isemann
[lldb][NFC] Another attempt to fix GCC 5.x compilation

37510f69b4cb8d76064f108d57bebe95984a23ae tried to fix GCC 5.x compilation
by making the enum which is used as a unordered_map key unscoped. However it
seems that in GCC 5.x, enum keys are not supported *at all* in unordered_maps
(at least that's what some trial&error on godbolt tells me). This updates the
workaround to just use an int until GCC 5.x support is dropped.
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
Commit 302432f75dadcc78aa4764f3e5e86bf07466a554 by julian.lettner
Reland "[lit] Use os.cpu_count() to cleanup TODO"

The initial problem with the remaining bot config was resolved.

We can now use Python3.  Let's use `os.cpu_count()` to cleanup this
helper.

Differential Revision: https://reviews.llvm.org/D94734
The file was modifiedllvm/utils/lit/lit/cl_arguments.py
The file was modifiedllvm/utils/lit/lit/util.py
The file was modifiedllvm/utils/lit/lit/run.py
Commit 1d6df1fcf0a754adff8b66f3445d7d5ab130434e by eschweitz
[mlir] sret and byval now require a type argument when constructed.

Fixes the LLVM code gen bugs and adds the missing tests.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D95378
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/test/Target/llvmir.mlir
Commit f9d7f77267bca055c6cc480065ca7dd9f768b948 by craig.topper
[RISCV] Have customLegalizeToWOp truncate to the original type instead of i32 now that we use it for i8/i16 as well.

239cfbccb0509da1a08d9e746706013b732e646b add support for legalizing
i8/i16 UDIV/UREM/SDIV to use *W instructions. So we need to truncate
to i8/i16 if we're legalizing one of those.
The file was modifiedllvm/test/CodeGen/RISCV/rv64m-exhaustive-w-insts.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit dad55c22182e267c5baaeec9754039081b052dba by adhemerval.zanella
[ARM] [ELF] Fix ARMMaterializeGV for Indirect calls

Recent shouldAssumeDSOLocal changes (introduced by 961f31d8ad14c66)
do not take in consideration the relocation model anymore.  The ARM
fast-isel pass uses the function return to set whether a global symbol
is loaded indirectly or not, and without the expected information
llvm now generates an extra load for following code:

```
$ cat test.ll
@__asan_option_detect_stack_use_after_return = external global i32
define dso_local i32 @main(i32 %argc, i8** %argv) #0 {
entry:
  %0 = load i32, i32* @__asan_option_detect_stack_use_after_return,
align 4
  %1 = icmp ne i32 %0, 0
  br i1 %1, label %2, label %3

2:
  ret i32 0

3:
  ret i32 1
}

attributes #0 = { noinline optnone }

$ lcc test.ll -o -
[...]
main:
        .fnstart
[...]
        movw    r0, :lower16:__asan_option_detect_stack_use_after_return
        movt    r0, :upper16:__asan_option_detect_stack_use_after_return
        ldr     r0, [r0]
        ldr     r0, [r0]
        cmp     r0, #0
[...]
```

And without 'optnone' it produces:
```
[...]
main:
        .fnstart
[...]
        movw    r0, :lower16:__asan_option_detect_stack_use_after_return
        movt    r0, :upper16:__asan_option_detect_stack_use_after_return
        ldr     r0, [r0]
        clz     r0, r0
        lsr     r0, r0, #5
        bx      lr

[...]
```

This triggered a lot of invalid memory access in sanitizers for
arm-linux-gnueabihf.  I checked this patch both a stage1 built with
gcc and a stage2 bootstrap and it fixes all the Linux sanitizers
issues.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D95379
The file was modifiedllvm/lib/Target/ARM/ARMFastISel.cpp
The file was modifiedllvm/test/CodeGen/ARM/fast-isel-intrinsic.ll
Commit d92413a45e207fcdb414b85e3d255340d9bc1246 by n.james93
[clangd] Selection handles CXXBaseSpecifier

Selection now includes the virtual and access modifier as part of their range for cxx base specifiers.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D95231
The file was modifiedclang-tools-extra/clangd/unittests/RenameTests.cpp
The file was modifiedclang/lib/AST/ASTTypeTraits.cpp
The file was modifiedclang-tools-extra/clangd/Selection.cpp
The file was modifiedclang-tools-extra/clangd/unittests/SelectionTests.cpp
Commit 7730599c41646842f325598f24c77c8157acd706 by n.james93
[clangd] FindTarget resolves base specifier

FindTarget on the virtual keyword or access specifier of a base specifier will now resolve to type of the base specifier.

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D95338
The file was modifiedclang-tools-extra/clangd/unittests/FindTargetTests.cpp
The file was modifiedclang-tools-extra/clangd/FindTarget.cpp
Commit 32cc5564e2707c6036230ef3929c0d783ccea04c by jonathanchesterfield
[libomptarget][devicertl][amdgpu] Fix build, variable renaming error
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
Commit 4edf35f11a9e20bd5df3cb47283715f0ff38b751 by phosek
Support for instrumenting only selected files or functions

This change implements support for applying profile instrumentation
only to selected files or functions. The implementation uses the
sanitizer special case list format to select which files and functions
to instrument, and relies on the new noprofile IR attribute to exclude
functions from instrumentation.

Differential Revision: https://reviews.llvm.org/D94820
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedllvm/include/llvm/Bitcode/LLVMBitCodes.h
The file was modifiedllvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
The file was addedclang/lib/Basic/ProfileList.cpp
The file was addedclang/include/clang/Basic/ProfileList.h
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was addedllvm/test/Transforms/PGOProfile/noprofile.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/AsmParser/LLLexer.cpp
The file was modifiedclang/docs/UsersManual.rst
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/CodeGen/CodeGenPGO.cpp
The file was modifiedclang/docs/SourceBasedCodeCoverage.rst
The file was modifiedclang/lib/Basic/CMakeLists.txt
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedllvm/include/llvm/IR/Attributes.td
The file was modifiedllvm/lib/IR/Attributes.cpp
The file was addedclang/test/CodeGen/profile-filter.c
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was modifiedllvm/lib/AsmParser/LLToken.h
Commit 96f09aa2fb19ca2ab3de642b7d5f76e76afc31c7 by llvmgnsyncbot
[gn build] Port 4edf35f11a9e
The file was modifiedllvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
Commit 683719bc0cc8e12a5f9c06135fc97a13ef414f69 by atmndp
[OpenMP][Libomptarget] Introduce changes to support remote plugin

In order to support remote execution, we need to be able to send the
target binary description to the remote host for registration (and
consequent deregistration). To support this, I added these two
optional new functions to the plugin API:
- `__tgt_rtl_register_lib`
- `__tgt_rtl_unregister_lib`

These functions will be called to properly manage the instance of
libomptarget running on the remote host.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D93293
The file was modifiedopenmp/libomptarget/src/rtl.cpp
The file was modifiedopenmp/libomptarget/src/interface.cpp
The file was modifiedopenmp/libomptarget/src/rtl.h
Commit 2291bd137d12cc4f806d80be93bb442246df4f0e by Austin.Kerbow
[AMDGPU] Update subtarget features for new target ID support

Support for XNACK and SRAMECC is not static on some GPUs. We must be able
to differentiate between different scenarios for these dynamic subtarget
features.

The possible settings are:

- Unsupported: The GPU has no support for XNACK/SRAMECC.
- Any: Preference is unspecified. Use conservative settings that can run anywhere.
- Off: Request support for XNACK/SRAMECC Off
- On: Request support for XNACK/SRAMECC On

GCNSubtarget will track the four options based on the following criteria. If
the subtarget does not support XNACK/SRAMECC we say the setting is
"Unsupported". If no subtarget features for XNACK/SRAMECC are requested we
must support "Any" mode. If the subtarget features XNACK/SRAMECC exist in the
feature string when initializing the subtarget, the settings are "On/Off".

The defaults are updated to be conservatively correct, meaning if no setting
for XNACK or SRAMECC is explicitly requested, defaults will be used which
generate code that can be run anywhere. This corresponds to the "Any" setting.

Differential Revision: https://reviews.llvm.org/D85882
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPU.td
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.pkrtz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/lshr.v2i16.ll
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
The file was modifiedllvm/test/CodeGen/AMDGPU/idot8s.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/idiv-licm.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/idot2.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-scavenge-offset.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/break-vmem-soft-clauses.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.maxnum.f16.ll
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/load-constant.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.global.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ctlz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.image.store.2d.d16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/offset-split-flat.ll
The file was modifiedllvm/lib/Target/AMDGPU/GCNSubtarget.h
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-global-singlethread.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-global-system.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-global-workgroup.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/flat-scratch-reg.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.i128.ll
The file was modifiedllvm/test/MC/AMDGPU/xnack-mask.s
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cluster_stores.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.div.fmas.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/immv216.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.mov.dpp.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/local-stack-alloc-block-sp-reference.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.update.dpp.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fshl.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-vgpr-to-agpr.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.div.scale.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/offset-split-global.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fold-binop-select.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/scalar_to_vector.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.image.nsa.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/flat-scratch.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-global-agent.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/constant-address-space-32bit.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/fast-unaligned-load-store.private.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/elf-header-flags-mach.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_read2.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/hazard-hidden-bundle.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/idot8u.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vector_shuffle.packed.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/setcc-limit-load-shrink.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/nsa-vmem-hazard.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/min.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/localizer.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/directive-amdgcn-target.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.minnum.f16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/indirect-call.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/ds_write2.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/load-global-i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.128.ll
The file was addedllvm/test/CodeGen/AMDGPU/sramecc-subtarget-feature-enabled.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.atomic.inc.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.ubfe.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa-metadata-kernel-code-props-v3.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sram-ecc-default.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.struct.tbuffer.load.f16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/non-entry-alloca.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/function-returns.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/hsa-metadata-kernel-code-props.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/reassoc-scalar.ll
The file was addedllvm/test/CodeGen/AMDGPU/sramecc-subtarget-feature-disabled.ll
The file was addedllvm/test/CodeGen/AMDGPU/xnack-subtarget-feature-any.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/max.i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/idot4s.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/load-constant-i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/nsa-reassign.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/select-constant-cttz.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/saddo.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/memory-legalizer-global-wavefront.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/elf-header-flags-sram-ecc.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/splitkit-copy-bundle.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/flat-scratch.ll
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
The file was addedllvm/test/CodeGen/AMDGPU/xnack-subtarget-feature-enabled.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
The file was addedllvm/test/CodeGen/AMDGPU/sramecc-subtarget-feature-any.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/sub.v2i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/store-local.128.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/store-local.96.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/vgpr-descriptor-waterfall-loop-idom-update.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/frem.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/cgp-addressing-modes-gfx908.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/idot4u.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/smrd.ll
The file was addedllvm/test/CodeGen/AMDGPU/xnack-subtarget-feature-disabled.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/shl.v2i16.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/hazard-in-bundle.mir
Commit 31d375f178c27f258ab640afa613a595e67f92f2 by i
CGDebugInfo: Drop Loc.isInvalid() special case from getLineNumber

`getLineNumber()` picks CurLoc if the parameter is invalid. This appears to
mainly work around missing SourceLocation information for some constructs, but
sometimes adds unintended locations.

* For `CodeGenObjC/debug-info-blocks.m`, `CurLoc` has been advanced to the closing brace. The debug line of `ImplicitVarParameter` is set to the line of `}` because this implicit parameter has an invalid `SourceLocation`. The debug line is a bit arbitrary - perhaps the location of `^{` is better.
* The file/line of Clang synthesized `__va_list_tag` is arbitrarily attached a `#include` line. D94735

Drop the special case to make getLineNumber less magic and add CurLoc fallback in its callers instead.

Tested with stage 2 -DCMAKE_BUILD_TYPE=Debug clang, byte identical.

Reviewed By: #debug-info, aprantl

Differential Revision: https://reviews.llvm.org/D94391
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit 189f311130da38acfe0a3b3b234fc10bd60e34d2 by i
CGDebugInfo CreatedLimitedType: Drop file/line for RecordType with invalid location

For Clang synthesized `__va_list_tag` (`CreateX86_64ABIBuiltinVaListDecl`),
its DW_AT_decl_file/DW_AT_decl_line are arbitrarily set from `CurLoc`.

In a stage 2 `-DCMAKE_BUILD_TYPE=Debug` clang build, I observe that
in driver.cpp, DW_AT_decl_file/DW_AT_decl_line may be set to an `#include` line
(the transitively included file uses va_arg (`__builtin_va_arg`)).
This seems arbitrary. Drop that.

Reviewed By: #debug-info, dblaikie

Differential Revision: https://reviews.llvm.org/D94735
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was modifiedclang/test/CodeGen/X86/x86_64-arguments.c
Commit d2abd62b9d123cde5a55a92450bbe665b237a72d by clementval
[flang][openacc][NFC] Organize clause validity tests by directive

Split the tests from acc-clause-validity.f90 in dedicated files by directives.
The file acc-clause-validity.f90 was getting too big to be correctly maintained.
Tests are identical.

Reviewed By: SouraVX

Differential Revision: https://reviews.llvm.org/D95328
The file was addedflang/test/Semantics/OpenACC/acc-atomic-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-branch.f90
The file was addedflang/test/Semantics/OpenACC/acc-kernels-loop.f90
The file was addedflang/test/Semantics/OpenACC/acc-host-data.f90
The file was addedflang/test/Semantics/OpenACC/acc-parallel.f90
The file was removedflang/test/Semantics/acc-routine-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-resolve01.f90
The file was addedflang/test/Semantics/OpenACC/acc-serial-loop.f90
The file was removedflang/test/Semantics/acc-declare-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-routine-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-kernels.f90
The file was addedflang/test/Semantics/OpenACC/acc-loop.f90
The file was removedflang/test/Semantics/acc-branch.f90
The file was addedflang/test/Semantics/OpenACC/acc-wait-validity.f90
The file was removedflang/test/Semantics/acc-canonicalization-validity.f90
The file was removedflang/test/Semantics/acc-resolve01.f90
The file was addedflang/test/Semantics/OpenACC/acc-init-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-canonicalization-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-data.f90
The file was removedflang/test/Semantics/acc-clause-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-update-validity.f90
The file was removedflang/test/Semantics/acc-resolve02.f90
The file was removedflang/test/Semantics/acc-symbols01.f90
The file was addedflang/test/Semantics/OpenACC/acc-parallel-loop-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-symbols01.f90
The file was addedflang/test/Semantics/OpenACC/acc-shutdown-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-serial.f90
The file was addedflang/test/Semantics/OpenACC/acc-cache-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-set-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-declare-validity.f90
The file was addedflang/test/Semantics/OpenACC/acc-resolve02.f90
Commit 7636b1f6efd56063adcde4f908740660365462a5 by jingham
Make SBDebugger::CreateTargetWithFileAndArch work with lldb::LLDB_DEFAULT_ARCH

Second try, handling both a bogus arch string and the "null file & arch" used
to create an empty but valid target.
Also check in that case before logging (previously the logging would have
crashed.)
The file was modifiedlldb/source/API/SBDebugger.cpp
The file was modifiedlldb/test/API/python_api/target/TestTargetAPI.py
Commit 1e634f3952aa3914d9f962ac1151fccb4469d8ac by phosek
Revert "Support for instrumenting only selected files or functions"

This reverts commit 4edf35f11a9e20bd5df3cb47283715f0ff38b751 because
the test fails on Windows bots.
The file was removedclang/test/CodeGen/profile-filter.c
The file was removedllvm/test/Transforms/PGOProfile/noprofile.ll
The file was modifiedclang/include/clang/AST/ASTContext.h
The file was modifiedclang/lib/CodeGen/CodeGenModule.h
The file was modifiedllvm/lib/IR/Attributes.cpp
The file was modifiedclang/docs/ClangCommandLineReference.rst
The file was modifiedllvm/include/llvm/Bitcode/LLVMBitCodes.h
The file was modifiedclang/lib/CodeGen/CodeGenFunction.h
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/CodeGen/CodeGenPGO.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/docs/UsersManual.rst
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedllvm/lib/AsmParser/LLLexer.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.h
The file was modifiedllvm/include/llvm/IR/Attributes.td
The file was modifiedclang/docs/SourceBasedCodeCoverage.rst
The file was modifiedllvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
The file was removedclang/lib/Basic/ProfileList.cpp
The file was modifiedllvm/lib/AsmParser/LLToken.h
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/Transforms/Utils/CodeExtractor.cpp
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was removedclang/include/clang/Basic/ProfileList.h
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/lib/Basic/CMakeLists.txt
Commit 34b60d8a5684edabc06543c89ddd11874a927886 by i
Add -fbinutils-version= to gate ELF features on the specified binutils version

There are two use cases.

Assembler
We have accrued some code gated on MCAsmInfo::useIntegratedAssembler().  Some
features are supported by latest GNU as, but we have to use
MCAsmInfo::useIntegratedAs() because the newer versions have not been widely
adopted (e.g. SHF_LINK_ORDER 'o' and 'unique' linkage in 2.35, --compress-debug-sections= in 2.26).

Linker
We want to use features supported only by LLD or very new GNU ld, or don't want
to work around older GNU ld. We currently can't represent that "we don't care
about old GNU ld".  You can find such workarounds in a few other places, e.g.
Mips/MipsAsmprinter.cpp PowerPC/PPCTOCRegDeps.cpp X86/X86MCInstrLower.cpp
AArch64 TLS workaround for R_AARCH64_TLSLD_MOVW_DTPREL_* (PR ld/18276),
R_AARCH64_TLSLE_LDST8_TPREL_LO12 (https://bugs.llvm.org/show_bug.cgi?id=36727 https://sourceware.org/bugzilla/show_bug.cgi?id=22969)

Mixed SHF_LINK_ORDER and non-SHF_LINK_ORDER components (supported by LLD in D84001;
GNU ld feature request https://sourceware.org/bugzilla/show_bug.cgi?id=16833 may take a while before available).
This feature allows to garbage collect some unused sections (e.g. fragmented .gcc_except_table).

This patch adds `-fbinutils-version=` to clang and `-binutils-version` to llc.
It changes one codegen place in SHF_MERGE to demonstrate its usage.
`-fbinutils-version=2.35` means the produced object file does not care about GNU
ld<2.35 compatibility. When `-fno-integrated-as` is specified, the produced
assembly can be consumed by GNU as>=2.35, but older versions may not work.

`-fbinutils-version=none` means that we can use all ELF features, regardless of
GNU as/ld support.

Both clang and llc need `parseBinutilsVersion`. Such command line parsing is
usually implemented in `llvm/lib/CodeGen/CommandFlags.cpp` (LLVMCodeGen),
however, ClangCodeGen does not depend on LLVMCodeGen. So I add
`parseBinutilsVersion` to `llvm/lib/Target/TargetMachine.cpp` (LLVMTarget).

Differential Revision: https://reviews.llvm.org/D85474
The file was modifiedllvm/lib/CodeGen/LLVMTargetMachine.cpp
The file was modifiedllvm/include/llvm/MC/MCAsmInfo.h
The file was modifiedllvm/test/CodeGen/X86/explicit-section-mergeable.ll
The file was modifiedllvm/tools/llc/llc.cpp
The file was modifiedllvm/lib/Target/TargetMachine.cpp
The file was modifiedclang/include/clang/Basic/CodeGenOptions.h
The file was modifiedllvm/include/llvm/Target/TargetOptions.h
The file was addedllvm/test/tools/llc/binutils-version.ll
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was addedclang/test/Driver/fbinutils-version.c
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedllvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedllvm/include/llvm/Target/TargetMachine.h
Commit 4210b87020b9e558f650993d6a274807083ac5f6 by Louis Dionne
[libc++] Fix oss-fuzz build
The file was modifiedlibcxx/utils/ci/oss-fuzz.sh
Commit 15313f64be9d5ec18582975e0a0548743695f961 by haowei
[llvm-elfabi] Support ELF file that lacks .gnu.hash section

Before this change, when reading ELF file, elfabi determines number of
entries in .dynsym by reading the .gnu.hash section. This change makes
elfabi read section headers directly first. This change allows elfabi
works on ELF files which do not have .gnu.hash sections.

Differential Revision: https://reviews.llvm.org/D93362
The file was addedllvm/test/tools/llvm-elfabi/read-elf-dynsym.test
The file was modifiedllvm/lib/InterfaceStub/ELFObjHandler.cpp
The file was modifiedllvm/include/llvm/Object/ELF.h
Commit ec8f4a38c83eefc51be4f8cc39f93cc79116aab5 by atmndp
[OpenMP][Libomptarget] Introduce Remote Offloading Plugin

This introduces a remote offloading plugin for libomptarget. This
implementation relies on gRPC and protobuf, so this library will only
build if both libraries are available on the system. The corresponding
server is compiled to `openmp-offloading-server`.

This is a large change, but the only way to split this up is into RTL/server
but I fear that could introduce an inconsistency amongst them.

Ideally, tests for this should be added to the current ones that but that is
problematic for at least one reason. Given that libomptarget registers plugin
on a first-come-first-serve basis, if we wanted to offload onto a local x86
through a different process, then we'd have to either re-order the plugin list
in `rtl.cpp` (which is what I did locally for testing) or find a better
solution for runtime plugin registration in libomptarget.

Differential Revision: https://reviews.llvm.org/D95314
The file was addedopenmp/libomptarget/plugins/remote/src/CMakeLists.txt
The file was addedopenmp/libomptarget/plugins/remote/lib/Utils.cpp
The file was addedopenmp/libomptarget/plugins/remote/src/Client.cpp
The file was addedopenmp/libomptarget/plugins/remote/src/Client.h
The file was addedopenmp/libomptarget/plugins/remote/server/Server.h
The file was modifiedopenmp/docs/design/Runtimes.rst
The file was modifiedopenmp/libomptarget/plugins/exports
The file was addedopenmp/libomptarget/plugins/remote/include/Utils.h
The file was modifiedopenmp/libomptarget/src/CMakeLists.txt
The file was addedopenmp/libomptarget/plugins/remote/server/Server.cpp
The file was addedopenmp/libomptarget/plugins/remote/CMakeLists.txt
The file was addedopenmp/libomptarget/plugins/remote/include/openmp.proto
The file was modifiedopenmp/docs/SupportAndFAQ.rst
The file was modifiedopenmp/libomptarget/plugins/CMakeLists.txt
The file was addedopenmp/libomptarget/plugins/remote/server/OffloadingServer.cpp
The file was addedopenmp/libomptarget/plugins/remote/src/rtl.cpp
The file was addedopenmp/libomptarget/plugins/remote/server/CMakeLists.txt
Commit fdeffd6fb0c1a824137c502e2b1c182aded17325 by jonathanchesterfield
[libomptarget][cuda] Only run tests when sure there is cuda available

[libomptarget][cuda] Only run tests when sure there is cuda available

Prior to D95155, building the cuda plugin implied cuda was installed locally.
With that change, every machine can build a cuda plugin, but they won't all have
cuda and/or an nvptx card installed locally.

This change enables the nvptx tests when either:
- libcuda is present
- the user has forced use of the dlopen stub

The default case when there is no cuda detected will no longer attempt to
run the tests on nvptx hardware, as was the case before D95155.

Reviewed By: jdoerfert, ronlieb

Differential Revision: https://reviews.llvm.org/D95467
The file was modifiedopenmp/libomptarget/plugins/cuda/CMakeLists.txt
Commit 7baff00eeedb0d9bac5e7cd0c5e4189a6cc6101d by jonathanchesterfield
[libomptarget][cuda] Gracefully handle missing cuda library

[libomptarget][cuda] Gracefully handle missing cuda library

If using dynamic cuda, and it failed to load, it is not safe to call
cuGetErrorString.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D95412
The file was modifiedopenmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.cpp
The file was modifiedopenmp/libomptarget/plugins/cuda/dynamic_cuda/cuda.h
The file was modifiedopenmp/libomptarget/plugins/cuda/src/rtl.cpp
Commit 79ce46e2753a6e132538405f43d6ad19cc2d58ae by i
[llvm-elfabi] Fix test after D95140
The file was modifiedllvm/test/tools/llvm-elfabi/read-elf-dynsym.test
Commit da9a3540e2164a175eb1177f4ecd318d3d4c35f6 by llvmgnsyncbot
[gn build] Port 1e634f3952aa
The file was modifiedllvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
Commit 810572cc96e99b5d6fb695f1f047c2ae6507831b by atmndp
[OpenMP][Libomptarget] Fix cmake error on remote plugin

Requiring 3.15 causes a build breakage, I'm sure none of the contents actually require
3.15 or above.

Differential Revision: https://reviews.llvm.org/D95474
The file was modifiedopenmp/libomptarget/plugins/remote/CMakeLists.txt
Commit cbed865e1e661bdb573d97b3a0aadc06769b1236 by Amara Emerson
[GlobalISel][IRTranslator] Ignore the llvm.experimental.noalias.scope.decl intrinsic.

These don't generate any code.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
Commit 63273fc41fccf11962ce6ec4df91fee703e5ab57 by julian.lettner
[NFC][lit] Cleanup code using string interpolation

LLVM now requires Python 3.6, so we can use string interpolation to make
code more readable.
The file was modifiedllvm/utils/lit/lit/reports.py
The file was modifiedllvm/utils/lit/lit/main.py
Commit 74784a5aa47bb8967e5868831e359fa631abe465 by craig.topper
[X86] In shrinkAndImmediate, place the new constant into the topological sort.

Revert the change to use APInt::isSignedIntN from
5ff5cf8e057782e3e648ecf5ccf1d9990b53ee90.

Its clear that the games we were playing to avoid the topological
sort aren't working. So just fix it once and for all.

Fixes PR48888.
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/pr48458.ll
The file was addedllvm/test/CodeGen/X86/pr48888.ll
Commit c8df2d1bdeb9f78c2efcdff0ffe55f7d21c227c6 by valery.n.dmitriev
[NFC] Show instcombine powi simplifications drop FMF

Differential Revision: https://reviews.llvm.org/D95454
The file was modifiedllvm/test/Transforms/InstCombine/intrinsics.ll
Commit 716b9dd0d84ad9227398e22c009a75203bd25176 by valery.n.dmitriev
[InstCombine] Preserve FMF for powi simplifications.

Differential Revision: https://reviews.llvm.org/D95455
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/intrinsics.ll
Commit 5f1d4d477902a9c058bd5506f17eeab6b7c5b7f5 by vyacheslav.p.zakharin
[libomptarget][NFC] Use portable printf format specifiers.

Differential Revision: https://reviews.llvm.org/D95476
The file was modifiedopenmp/libomptarget/src/omptarget.cpp
The file was modifiedopenmp/libomptarget/src/private.h
Commit a9bd3d37bdec19fc8b4d9aad13f36902c20c7441 by bjorn.a.pettersson
[NewPM] Add ExtraVectorizerPasses support

As it looks like NewPM generally is using SimpleLoopUnswitch
instead of LoopUnswitch, this patch also use SimpleLoopUnswitch
in the ExtraVectorizerPasses sequence (compared with LegacyPM
which use the LoopUnswitch pass).

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D95457
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp
The file was modifiedllvm/lib/Passes/PassBuilder.cpp
The file was modifiedllvm/test/Other/opt-pipeline-vector-passes.ll
Commit 8cef45517e47af7c81dd6504fa52ce98e21a6208 by chaosdefinition
[ARM] Fix STRT/STRHT/STRBT input/output operands.

STRT, STRHT, and STRBT are store instructions and their source register
$Rt should be treated as an input operand instead of an output operand.
This should fix things (e.g., liveness tracking in LivePhysRegs) if
these instructions were used in CodeGen.

Differential Revision: https://reviews.llvm.org/D95074
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
Commit 8afabff6b11c3aa2b0a2f045833450703aab6605 by Duncan P. N. Exon Smith
Frontend: Fix memory leak in CompilerInstance::setVerboseOutputStream

Found this memory leak in `CompilerInstance::setVerboseOutputStream` by
inspection; it looks like this wasn't previously exercised, since it was
never called twice.

Differential Revision: https://reviews.llvm.org/D93249
The file was modifiedclang/lib/Frontend/CompilerInstance.cpp
The file was modifiedclang/unittests/Frontend/OutputStreamTest.cpp
Commit 0554541b44548591373b690030dea28c5434be7c by Adrian Prantl
Salvage debug info for function arguments in coro-split funclets.

This patch improves the availability for variables stored in the
coroutine frame by emitting an alloca to hold the pointer to the frame
object and rewriting dbg.declare intrinsics to point inside the frame
object using salvaged DIExpressions. Finally, a new alloca is created
in the funclet to hold the FramePtr pointer to ensure that it is
available throughout the entire function at -O0.

This path also effectively reverts D90772. The testcase updates
highlight nicely how every removed CHECK for a dbg.value is preceded
by a new CHECK for a dbg.declare.

Thanks to JunMa, Yifeng, and Bruno for their thoughtful reviews!

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

rdar://71866936
The file was modifiedllvm/lib/Transforms/Coroutines/CoroFrame.cpp
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroInternal.h
The file was modifiedllvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll
The file was modifiedllvm/lib/Transforms/Coroutines/CoroSplit.cpp
Commit f36007e8110174ea10294f6fa546f3c64f0e548a by Jessica Paquette
[GlobalISel] Implement computeKnownBits for G_SEXT_INREG

Just use the existing `Known.sextInReg` implementation.

- Update KnownBitsTest.cpp.
- Update combine-redundant-and.mir for a more concrete example.

Differential Revision: https://reviews.llvm.org/D95484
The file was modifiedllvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/combine-redundant-and.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp