SuccessChanges

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

Summary

  1. [llvm-profdata] Update CommandGuide (details)
  2. Fix clang test failures from D77454 (details)
  3. [clang][Preprocessor] Replace the slow translateFile call by a new, faster isMainFile check (details)
  4. Revert "[lldb] Don't dissasemble large functions by default" (details)
  5. [gn build] Port 2b7fe0863ac (details)
  6. Add v16f64 value type (details)
  7. [AArch64][SVE] Add some integer DestructiveBinaryComm* patterns (details)
  8. [GlobalISel][InlineAsm] Add early return for memory inputs that need to be indirectified (details)
  9. [AMDGPU] Make v16f64/v16i64 legal (details)
  10. [OPENMP50]Codegen for uses_allocators clause. (details)
  11. [clang][VerifyDiagnosticConsumer] Support filename wildcards (details)
  12. Revert "Run Coverage pass before other *San passes under new pass manager" (details)
  13. [AMDGPU] Peephole adjacent equivalent S_SET_GPR_IDX_ON (details)
  14. [test/dsymutil] Suppress LeakSanitizer on ARM dsymutil tests (details)
  15. [lldb/Test] Replace assertTrue with more specific checks (NFC) (details)
  16. [llvm] Fix refactoring bug introduced in D79042 (details)
  17. llvm/test: Check in suppressions file left out of f26823c9d (details)
  18. Revert "[GlobalISel][InlineAsm] Add early return for memory inputs that need to be indirectified" (details)
  19. [Fuchsia] Do not enable the Z3 solver for a fuchsia toolchain (details)
  20. [LICM] When promoting loads to the preheader, drop the location. (details)
  21. [FileCheck] Fix isalpha/isalnum calls (details)
  22. [lldb/Test] Modify more tests for API replay (details)
  23. [Flang][OpenMP] Avoid abort when collapse clause value is negative (details)
  24. Temporarily Revert "[Support] Make UniqueStringSaver wrap a StringSet" (details)
  25. [MachineVerifier] Use the for_range loop to instead llvm::any_of (details)
  26. Speculative fix for build breakage from D78403 (details)
  27. [mlir][Linalg] Start a LinalgToStandard pass and move conversion to library calls. (details)
  28. [mlir][GPUToSPIRV] Use default ABI only when none of the arguments (details)
  29. [llvm][NFC] Cleanup uses of std::function in Inlining-related APIs (details)
Commit 67bb16049af1faa699a2614f10a64eccd0378944 by wmi
[llvm-profdata] Update CommandGuide

Add a bunch of SampleFDO related flags added recently into llvm-profdata to
its command guide.

Differential Revision: https://reviews.llvm.org/D79911
The file was modifiedllvm/docs/CommandGuide/llvm-profdata.rst
Commit 428d0b6f77986efd944df01bb4ae7888c6262c2f by efriedma
Fix clang test failures from D77454
The file was modifiedclang/lib/CodeGen/CGCleanup.cpp
Commit 11d612ac99a621c762c2cc8f7bacbb8ae32d7fe9 by Alex Lorenz
[clang][Preprocessor] Replace the slow translateFile call by a new, faster isMainFile check

The commit 3c28a2dc6bdc331e5a0d8097a5fa59d06682b9d0 introduced the check that checks if we're
trying to re-enter a main file when building a preamble. Unfortunately this slowed down the preamble
compilation by 80-90% in some test cases, as translateFile is really slow. This change checks
to see if the FileEntry is the main file without calling translateFile, but by using the new
isMainFile check instead. This speeds up preamble building by 1.5-2x for certain test cases that we have.

rdar://59361291

Differential Revision: https://reviews.llvm.org/D79834
The file was modifiedclang/unittests/Basic/SourceManagerTest.cpp
The file was modifiedclang/include/clang/Basic/SourceManager.h
The file was modifiedclang/lib/Basic/SourceManager.cpp
The file was modifiedclang/lib/Lex/PPDirectives.cpp
Commit 1cbd1b8f692df7742efb9114510688045d901f96 by shafik
Revert "[lldb] Don't dissasemble large functions by default"

This reverts commit f665e80c023ec52557f55d7eeaf34471e4c6fa0d.

Reverting because it breaks TestFoundationDisassembly.py
The file was modifiedlldb/test/Shell/Commands/command-disassemble.s
The file was modifiedlldb/source/Commands/CommandObjectDisassemble.cpp
The file was modifiedlldb/test/Shell/Commands/command-disassemble-process.yaml
The file was modifiedlldb/source/Commands/CommandObjectDisassemble.h
The file was modifiedlldb/test/Shell/Commands/Inputs/command-disassemble.lldbinit
The file was modifiedlldb/source/Commands/Options.td
Commit b5d2bd74d75ddcb9ce702aca61e8aa54cc0104ec by llvmgnsyncbot
[gn build] Port 2b7fe0863ac
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/WebAssembly/BUILD.gn
Commit 184b38345746a8f2b8ff5608fdd115991fa2c0fe by Stanislav.Mekhanoshin
Add v16f64 value type

We need to use it to handle <16 x double> indirect indexes
in the AMDGPU BE.

The only visible change from adding it is in ARM cost model.
To me it looks reasonable. With doubling a vector size it
quadruples the cost up to the size 8 and then it did only
double it. Now it also quadruples, which seems a logical
progression to me.

Actual AMDGPU code is to follow, this is a common part, plus
load/store legalization in the AMDGPU BE not to break what
works now.

Differential Revision: https://reviews.llvm.org/D79952
The file was modifiedllvm/test/Analysis/CostModel/ARM/cast.ll
The file was modifiedllvm/include/llvm/IR/Intrinsics.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
The file was modifiedllvm/lib/CodeGen/ValueTypes.cpp
The file was modifiedllvm/include/llvm/Support/MachineValueType.h
The file was modifiedllvm/utils/TableGen/CodeGenTarget.cpp
The file was modifiedllvm/include/llvm/CodeGen/ValueTypes.td
Commit b085e51d818a39c7e2ea659ebbefd1943689c642 by cameron.mcinally
[AArch64][SVE] Add some integer DestructiveBinaryComm* patterns

Add DestructiveBinaryComm* patterns for ADD, SUB, and SUBR.

Differential Revision: https://reviews.llvm.org/D76711
The file was addedllvm/test/CodeGen/AArch64/sve-intrinsics-int-arith-merging.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
Commit 887dfeec53ad5e564e9990c433e5b53f2e651dbf by konstantin.schwarz
[GlobalISel][InlineAsm] Add early return for memory inputs that need to be indirectified

Summary:
D78319 introduced basic support for inline asm input operands in GlobalISel.
However, that patch did not handle the case where a memory input operand still needs to
be indirectified. Later code asserts that the memory operand is already indirect.

This patch adds an early return false to trigger the SelectionDAG fallback for now.

Reviewers: arsenm, paquette

Reviewed By: arsenm

Subscribers: wdng, rovka, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79955
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
Commit 9d4cf5bd421fb6467ff5f00e26a37527246dd4d6 by Stanislav.Mekhanoshin
[AMDGPU] Make v16f64/v16i64 legal

This allows indirect VGPR addressing to work.

Differential Revision: https://reviews.llvm.org/D79960
The file was modifiedllvm/test/CodeGen/AMDGPU/extract_vector_dynelt.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIRegisterInfo.td
The file was modifiedllvm/test/CodeGen/AMDGPU/spill-vgpr-to-agpr.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
The file was modifiedllvm/test/CodeGen/AMDGPU/insert_vector_dynelt.ll
The file was modifiedllvm/lib/Target/AMDGPU/SIInstructions.td
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
Commit 0363ae97abb841114e841a963c95eb6a2202716d by a.bataev
[OPENMP50]Codegen for uses_allocators clause.

Summary:
Predefined allocators should not be mapped at all (they are just enumeric
constants). FOr user-defined allocators need to map the traits only as
firstprivates, the allocator itself is private.
At the beginning of the target region the user-defined allocatores must
be created and then destroyed at the end of the target region:
```
omp_allocator_handle_t my_allocator = __kmpc_init_allocator(<gtid>,
/*default memhandle*/ 0, <number_of_traits>, &<traits>);
...
call void @__kmpc_destroy_allocator(<gtid>, my_allocator);
```

Reviewers: jdoerfert, aaron.ballman

Subscribers: jholewinski, yaxunl, guansong, cfe-commits, caomhin

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79257
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.h
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
The file was addedclang/test/OpenMP/target_simd_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_teams_distribute_parallel_for_simd_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_teams_distribute_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_parallel_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_parallel_for_simd_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_teams_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_teams_distribute_parallel_for_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_teams_distribute_simd_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_uses_allocators_codegen.cpp
The file was addedclang/test/OpenMP/target_parallel_for_uses_allocators_codegen.cpp
Commit 05eedf1f5b449ae42f5493576164b0f9a001646c by Jan Korous
[clang][VerifyDiagnosticConsumer] Support filename wildcards

Differential Revision: https://reviews.llvm.org/D72100
The file was modifiedclang/include/clang/Frontend/VerifyDiagnosticConsumer.h
The file was modifiedclang/lib/Frontend/VerifyDiagnosticConsumer.cpp
The file was addedclang/test/Frontend/verify-any-file.c
The file was addedclang/test/Frontend/verify-any-file.h
Commit e9802aa4221ba3857041c2328639ce2aac0ace67 by leonardchan
Revert "Run Coverage pass before other *San passes under new pass manager"

This reverts commit 7d5bb94d78386e4653535c35d3e8258bf4502340.

Reverting since this leads to a linker error we're seeing on Fuchsia.
The underlying issue seems to be that inlining is run after sanitizers
and causes different comdat groups instrumented by Sancov to reference
non-key symbols defined in other comdat groups.

Will re-land this patch after a fix for that is landed.
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
Commit 7d16a22eb0c19ac8ea6115a7d04021b835307d0b by Stanislav.Mekhanoshin
[AMDGPU] Peephole adjacent equivalent S_SET_GPR_IDX_ON

Differential Revision: https://reviews.llvm.org/D79907
The file was modifiedllvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
The file was addedllvm/test/CodeGen/AMDGPU/set-gpr-idx-peephole.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
Commit f26823c9dccf3bb02663f0d7e29291e8e33fe038 by Vedant Kumar
[test/dsymutil] Suppress LeakSanitizer on ARM dsymutil tests

Just like on X86, we're getting reports of bogus leaks from
CoreFoundation in:

[_CFXPreferences(SourceAdditions) withSourceForIdentifier:user:byHost:container:cloud:perform:]

rdar://63238710
The file was modifiedllvm/test/tools/dsymutil/ARM/lit.local.cfg
Commit 9fde516032d71c325f156cb4b878cf6b12280de8 by Jonas Devlieghere
[lldb/Test] Replace assertTrue with more specific checks (NFC)

Use assertEqual(a, b) instead of assertTrue(a == b) etc.
The file was modifiedlldb/test/API/functionalities/breakpoint/objc/TestObjCBreakpoints.py
Commit 8a2e2a6a2bd0ed9310a8739c256456567e2adb23 by mtrofin
[llvm] Fix refactoring bug introduced in D79042

Incorrectly copied over the GetAssumptionCache snippet.

This patch also renames a variable for clarity.
The file was modifiedllvm/lib/Analysis/InlineAdvisor.cpp
Commit 61f73f893c1d57e1719df46f65496148701dec2e by Vedant Kumar
llvm/test: Check in suppressions file left out of f26823c9d
The file was addedllvm/test/tools/dsymutil/ARM/suppressions.txt
Commit e0c155427408814ceff22d16352331006eb81b6b by thakis
Revert "[GlobalISel][InlineAsm] Add early return for memory inputs that need to be indirectified"

This reverts commit 887dfeec53ad5e564e9990c433e5b53f2e651dbf.
It broke irtranslator-inline-asm.ll on many bots, e.g.
http://lab.llvm.org:8011/builders/lld-x86_64-freebsd/builds/38606/steps/test-check-all/logs/FAIL%3A%20LLVM%3A%3Airtranslator-inline-asm.ll
The file was modifiedllvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback.ll
Commit 592303a53e6bc0737c3999e91aab9ea2147f73ab by leonardchan
[Fuchsia] Do not enable the Z3 solver for a fuchsia toolchain

gLinux started shipping incompatible versions of Z3, which can lead to a
missing `z3.h` header when building the Z3 solver locally. This patch
disables the Z3 solver when building a clang toolchain for Fuchsia.

Differential Revision: https://reviews.llvm.org/D79974
The file was modifiedclang/cmake/caches/Fuchsia-stage2.cmake
Commit da52aa2c3340d91025c0188175012c476967dc74 by ditaliano
[LICM] When promoting loads to the preheader, drop the location.

It's really almost going to be misleading, see the example in
https://bugs.llvm.org/show_bug.cgi?id=45820

Maybe at some point we can do something fancier, but at least
this will fix a bug where we step on dead code while debugging.
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
The file was addedllvm/test/Transforms/LICM/hoisting-preheader-debugloc.ll
Commit 5df55bc7a46fd5319402ac856753bc5ba5e7fb8a by jdenny.ornl
[FileCheck] Fix isalpha/isalnum calls

D79276 caused the following builder to fail:

  http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23489

Specifically, FileCheck dumped stack in the following tests:

  LLVM :: MC/Mips/micromips-jump-pc-region.s
  LLVM :: MC/Mips/mips-jump-pc-region.s

Those tests contained characters encoded as 160 but that render (at
least for me in vim) like a single space (32).  Those characters
appeared between the `#` and `RUN:` on several lines, and D79276
caused FileCheck to process those lines differently: `RUN:` is a
comment directive.  As a result, D79276 caused FileCheck to start
calling is `isalnum` on those characters.

The problem is that FileCheck calls `isalnum` on type `char` without
casting to `unsigned char` first, so it sign-extends 160 beyond what
`unsigned char` or `EOF` can represent.  C says that has undefined
behavior.  This problem is general to FileCheck's prefix parsing and
so exists independently of D79276.

524457edbc3d fixed the above tests.  This patch changes FileCheck to
use LLVM's replacements for `ctype.h` functions, and it adds tests for
cases that are representative with or without D79276.

Reviewed By: jhenderson, thopre, efriedma

Differential Revision: https://reviews.llvm.org/D79810
The file was modifiedllvm/lib/Support/FileCheck.cpp
The file was addedllvm/test/FileCheck/bad-char.txt
Commit bf02bcffcfd7dc965e930c6a3035895823d2d78b by Jonas Devlieghere
[lldb/Test] Modify more tests for API replay

Skip tests or parts thereof that aren't expected to work when run from a
reproducer. Also improve the doc comments in configuration.py to prevent
mistakes in the future.
The file was modifiedlldb/test/API/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandPython.py
The file was modifiedlldb/packages/Python/lldbsuite/test/configuration.py
The file was modifiedlldb/test/API/functionalities/breakpoint/breakpoint_set_restart/TestBreakpointSetRestart.py
The file was modifiedlldb/test/API/functionalities/breakpoint/objc/TestObjCBreakpoints.py
The file was modifiedlldb/test/API/commands/process/attach/attach_denied/TestAttachDenied.py
Commit 85725a67c745cb833174a7eae2aa53e74753bcb1 by clementval
[Flang][OpenMP] Avoid abort when collapse clause value is negative

Summary:
If the value in the collapse close is negative f18 abort without the correct error message. This PR change the size_t in name resolution to a int64_t and check appropriately for negative or zero before the privatization of induction variable.
The correct error is then catch by the OpenMP structure check.

This diff is migrated from the GitHub pull request https://github.com/flang-compiler/f18/pull/1098

Reviewers: ichoyjx, jdoerfert, sscalpone, DavidTruby

Reviewed By: ichoyjx, sscalpone, DavidTruby

Subscribers: sscalpone, klausler, yaxunl, guansong, llvm-commits

Tags: #llvm, #flang

Differential Revision: https://reviews.llvm.org/D77821
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/test/Semantics/omp-clause-validity01.f90
Commit dad2e92eaf531500af5ab9ee3350e3e186944185 by echristo
Temporarily Revert "[Support] Make UniqueStringSaver wrap a StringSet"
as it's causing asan failures in clangd. Followed up offline
with repro instructions.

This reverts commit 29560a89ddcaf3af9b8a73d98d968a0911d21e27.
The file was modifiedllvm/include/llvm/Support/StringSaver.h
The file was modifiedllvm/lib/Support/StringSaver.cpp
Commit aedb6615a8d08d7dfeba17bf22ff4c6fd104cadc by shkzhang
[MachineVerifier] Use the for_range loop to instead llvm::any_of

Summary:
In the patch D78849, it uses llvm::any_of to instead of for loop to
simplify the function addRequired().
It's obvious that above code is not a NFC conversion. Because any_of
will return if any addRequired(Reg) is true immediately, but we want
every element to call addRequired(Reg).

This patch uses for_range loop to fix above any_of bug.

Reviewed By: MaskRay, nickdesaulniers

Differential Revision: https://reviews.llvm.org/D79872
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
Commit 940d949435e88dcbf154fbd310d148295781ea04 by hubert.reinterpretcast
Speculative fix for build breakage from D78403

D78403 appears responsible for breaking bots:
http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/12261/steps/build%20stage%201/logs/stdio
The file was modifiedllvm/tools/llc/CMakeLists.txt
The file was modifiedllvm/tools/opt/CMakeLists.txt
Commit f1b972041adf565c08d1abca41068d2adcf62702 by ntv
[mlir][Linalg] Start a LinalgToStandard pass and move conversion to library calls.

This revision starts decoupling the include the kitchen sink behavior of Linalg to LLVM lowering by inserting a -convert-linalg-to-std pass.

The lowering of linalg ops to function calls was previously lowering to memref descriptors by having both linalg -> std and std -> LLVM patterns in the same rewrite.

When separating this step, a new issue occurred: the layout is automatically type-erased by this process. This revision therefore introduces memref casts to perform these type erasures explicitly. To connect everything end-to-end, the LLVM lowering of MemRefCastOp is relaxed because it is artificially more restricted than the op semantics. The op semantics already guarantee that source and target MemRefTypes are cast-compatible. An invalid lowering test now becomes valid and is removed.

Differential Revision: https://reviews.llvm.org/D79468
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/invalid.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
The file was addedmlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp
The file was modifiedmlir/include/mlir/InitAllPasses.h
The file was modifiedmlir/test/Dialect/Linalg/llvm.mlir
The file was addedmlir/lib/Conversion/LinalgToStandard/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was addedmlir/include/mlir/Conversion/LinalgToStandard/LinalgToStandard.h
The file was modifiedmlir/include/mlir/Dialect/StandardOps/IR/Ops.td
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was addedmlir/test/Dialect/Linalg/standard.mlir
Commit 0b3e478b10e233460073d24df527253ab5edac2a by ravishankarm
[mlir][GPUToSPIRV] Use default ABI only when none of the arguments
have abi attributes.

To ensure there is no conflict, use the default ABI only when none of
the arguments have the spv.interface_var_abi attribute. This also
implies that if one of the arguments has a spv.interface_var_abi
attribute, all of them should have it as well.

Differential Revision: https://reviews.llvm.org/D77232
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
Commit 767db5be67cab5aa04d81227725765cad9620611 by mtrofin
[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs

Summary:
Replacing uses of std::function pointers or refs, or Optional, to
function_ref, since the usage pattern allows that. If the function is
optional, using a default parameter value (nullptr). This led to a few
parameter reshufles, to push all optionals to the end of the parameter
list.

Reviewers: davidxl, dblaikie

Subscribers: arsenm, jvesely, nhaehnle, eraman, hiraditya, haicheng, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79917
The file was modifiedllvm/lib/Transforms/IPO/PartialInlining.cpp
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUInline.cpp
The file was modifiedllvm/lib/Analysis/InlineCost.cpp
The file was modifiedllvm/lib/Analysis/InlineAdvisor.cpp
The file was modifiedllvm/lib/Transforms/Utils/InlineFunction.cpp
The file was modifiedllvm/lib/Transforms/IPO/AlwaysInliner.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/Cloning.h
The file was modifiedllvm/lib/Transforms/IPO/SampleProfile.cpp
The file was modifiedllvm/lib/Transforms/IPO/InlineSimple.cpp
The file was modifiedllvm/include/llvm/Analysis/InlineCost.h
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp