SuccessChanges

Summary

  1. [SVE] Fix VBITS_GE_256 typo in fixed-width tests. (details)
  2. Revert "Canonicalize declaration pointers when forming APValues." (details)
  3. [NFC][ScalarEvolution] Add tests with ptrtoint in constant context in loop (details)
  4. Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown" (details)
  5. [AMDGPU] Correct processor names for gfx1010 and gfx1011 (details)
  6. [gn build] Add libclang_rt.ios.a, libclang_rt.iossim.a to the build (details)
  7. [mlir][Linalg] Temporarily circumvent TensorConstant bufferize bug (details)
  8. [libomptarget][amdgcn] Implement partial barrier (details)
  9. [libunwind] [SEH] Don't interact with foreign exceptions (details)
  10. [LLD] [COFF] Fix a ubsan error in pdb-type-server-missing.yaml (details)
  11. [MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled (details)
  12. [X86] Add more tests for D89178. NFC (details)
  13. [TableGen] Add overload of RecordKeeper::getAllDerivedDefinitions() (details)
  14. DependencyScanning: pull factory function into MinimizedVFS, NFC (details)
  15. [CostModel] get type-based cost for vector intrinsics directly (details)
  16. Ensure TreeTransform considers ParmVarDecls as transformed Decls (details)
  17. Lex: Avoid MemoryBuffer* key in ExcludedPreprocessorDirectiveSkipMapping, NFC (details)
  18. [AArch64] Add tests for 128-bit shift variations. (details)
  19. [mlir] Make Python bindings installable. (details)
  20. [Coroutine] Rename coro-semmetric-transfer.cpp and possibly fix test failure (details)
  21. [BitCodeAnalyzer] Add a few missing TYPE_CODES and MODULE_CODE_COMDAT to GetCodeName (details)
  22. [lldb] Alphabetically sort test categories (NFC) (details)
  23. [lldb] Add instrumentation runtime category (details)
  24. [clangd] Try harder to get accurate ranges for documentSymbols in macros (details)
  25. [lldb] Handle alternative output in TestAbortExitCode (details)
  26. [lldb] Remove unused code in GetVersion (NFC) (details)
  27. [SemaTemplate] Stop passing insertion position around during VarTemplate instantiation (details)
  28. [llvm] Export LLVM_USE_SPLIT_DWARF in LLVMConfig.cmake (details)
  29. [AMDGPU] Update LiveVariables in convertToThreeAddress() (details)
  30. [lld][WebAssembly] Add support for -Bsymbolic flag (details)
  31. [llc] -filetype=null: don't create .null if -o is not specified (details)
  32. Add accessors. (NFC) (details)
Commit abe14485fed7741ef5771d11509373c861ec37eb by mcinally
[SVE] Fix VBITS_GE_256 typo in fixed-width tests.

This seems to be a typo that propagated to a number of tests. Replace VBITS_GE_256 with CHECK. There is no VBITS_GE_256.
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-fp-reduce.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-fp-select.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-trunc.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-div.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-log-reduce.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-select.ll
The file was modifiedllvm/test/CodeGen/AArch64/sve-fixed-length-int-reduce.ll
Commit 9a33f027ac7d73e14ae287e78ab554142d1cbc8f by aeubanks
Revert "Canonicalize declaration pointers when forming APValues."

This reverts commit 9dcd96f728863d40d6f5922ed52732fdd728fb5f.

See https://crbug.com/1134762.
The file was modifiedclang/test/OpenMP/ordered_messages.cpp
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp
The file was modifiedclang/include/clang/AST/APValue.h
The file was modifiedclang/lib/CodeGen/CGExprConstant.cpp
The file was modifiedclang/lib/AST/Decl.cpp
The file was modifiedclang/lib/AST/DeclBase.cpp
The file was modifiedclang/lib/AST/APValue.cpp
The file was modifiedclang/lib/AST/ExprConstant.cpp
The file was modifiedclang/test/CodeGenCXX/weak-external.cpp
Commit 73818f450e3a90fc89eca143ee30777ed7e660e9 by lebedev.ri
[NFC][ScalarEvolution] Add tests with ptrtoint in constant context in loop

Reduced from the https://reviews.llvm.org/D88806#2325340
The file was addedllvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
Commit 1fb610429308a7c29c5065f5cc35dcc3fd69c8b1 by lebedev.ri
Reland "[SCEV] Model ptrtoint(SCEVUnknown) cast not as unknown, but as zext/trunc/self of SCEVUnknown"

This relands commit 1c021c64caef83cccb719c9bf0a2554faa6563af which was
reverted in commit 17cec6a11a12f815052d56a17ef738cf246a2d9a because
an assertion was being triggered, since `BuildConstantFromSCEV()`
wasn't updated to handle the case where the constant we want to truncate
is actually a pointer. I was unsuccessful in coming up with a test case
where we'd end there with constant zext/sext of a pointer,
so i didn't handle those cases there until there is a test case.

Original commit message:

While we indeed can't treat them as no-ops, i believe we can/should
do better than just modelling them as `unknown`. `inttoptr` story
is complicated, but for `ptrtoint`, it seems straight-forward
to model it just as a zext-or-trunc of unknown.

This may be important now that we track towards
making inttoptr/ptrtoint casts not no-op,
and towards preventing folding them into loads/etc
(see D88979/D88789/D88788)

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D88806
The file was modifiedllvm/test/CodeGen/X86/ragreedy-hoist-spill.ll
The file was modifiedllvm/test/CodeGen/ARM/lsr-undef-in-binop.ll
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyIndVar.cpp
The file was modifiedllvm/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/add-expr-pointer-operand-sorting.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint-constantexpr-loop.ll
The file was modifiedpolly/test/Isl/CodeGen/scev_looking_through_bitcasts.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/ptrtoint.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
Commit fe145b66ecfd98769feef496d47e49781efd6a2e by Tony.Tye
[AMDGPU] Correct processor names for gfx1010 and gfx1011

Change-Id: Ie409f86876b0437d0b0405aff42872963708d926

Differential Revision: https://reviews.llvm.org/D89259
The file was modifiedllvm/docs/AMDGPUUsage.rst
Commit 4a96b2e75f6db5b6f51febdd2ee559bacb7833b7 by thakis
[gn build] Add libclang_rt.ios.a, libclang_rt.iossim.a to the build

It's built with just-built clang, like all other compiler-rt parts
in the GN build.

This requires adding some cross build support to the mac toolchain.

Also add explicit mmacosx-version-min and miphoneos-version-min
flags to the build.

ios.a is only built with the arm64 slice, iossim.a only with the
x86_64 slice for now. (The latter should maybe become host_cpu
when Arm Macs become a common iOS development platform.)

With this, it's possible to build chromium/iOS with a GN-built LLVM.

Differential Revision: https://reviews.llvm.org/D89260
The file was modifiedllvm/utils/gn/secondary/llvm/triples.gni
The file was modifiedllvm/utils/gn/secondary/compiler-rt/target.gni
The file was modifiedllvm/utils/gn/build/toolchain/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/builtins/BUILD.gn
The file was modifiedllvm/utils/gn/build/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/compiler-rt/BUILD.gn
The file was modifiedllvm/utils/gn/build/toolchain/target_flags.gni
The file was modifiedllvm/utils/gn/build/mac_sdk.gni
Commit 81ead8a53525abe1f149b3c5ad1bb44ee258d10f by nicolas.vasilache
[mlir][Linalg] Temporarily circumvent TensorConstant bufferize bug

The TensorConstantOp bufferize conversion pattern has a bug that
makes it incorrect in the case of vectors whose alignment is not
the natural alignment. Circumvent it temporarily by using a power of 2.

Differential Revision: https://reviews.llvm.org/D89265
The file was modifiedmlir/integration_test/Dialect/Linalg/CPU/test-tensor-matmul.mlir
Commit 8b6cd15242673c04618fb0aafc07d5de9e0bbe1e by jonchesterfield
[libomptarget][amdgcn] Implement partial barrier

[libomptarget][amdgcn] Implement partial barrier

named_sync is used to coordinate non-spmd kernels. This uses bar.sync on nvptx.
There is no corresponding ISA support on amdgcn, so this is implemented using
shared memory, one word initialized to zero.

Each wave increments the variable by one. Whichever wave is last is responsible
for resetting the variable to zero, at which point it and the others continue.

The race condition on a wave reaching the barrier before another wave has
noticed that it has been released is handled with a generation counter, packed
into the same word.

Uses a shared variable that is not needed on nvptx. Introduces a new hook,
kmpc_impl_target_init, to allow different targets to do extra initialization.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D88602
The file was modifiedopenmp/libomptarget/deviceRTLs/nvptx/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.h
The file was modifiedopenmp/libomptarget/deviceRTLs/common/src/omptarget.cu
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/src/target_impl.hip
Commit fc5e68fab965bdc8fdf6db9ae2603f9dd02dec5b by martin
[libunwind] [SEH] Don't interact with foreign exceptions

This unfortunately means that we don't execute C++ destructors when
unwinding past such frames for a different SEH unwind purpose (e.g.
as part of setjmp/longjmp), but that case isn't handled properly at
the moment (the original unwind intent is lost and we end up with an
unhandled exception). This patch makes sure the foreign unwind terminates
as intended.

After executing a handler, _Unwind_Resume doesn't have access to
the target frame parameter of the original foreign unwind. We also
currently blindly set ExceptionCode to STATUS_GCC_THROW - we could
set that correctly by storing the original code in _GCC_specific_handler,
but we don't have access to the original target frame value.

This also matches what libgcc's SEH unwinding code does in this case.

Differential Revision: https://reviews.llvm.org/D89231
The file was modifiedlibunwind/src/Unwind-seh.cpp
Commit d77d727339a7439fe747f6b33c6e63ec57c6662e by martin
[LLD] [COFF] Fix a ubsan error in pdb-type-server-missing.yaml

This error has been present since 5519e4da83d1abc666203.

Differential Revision: https://reviews.llvm.org/D89027
The file was modifiedlld/COFF/DebugTypes.cpp
Commit 3b1d018c0dba45408164f5e69cb400976efa350f by martin
[MinGW][clang-shlib] Build only when LLVM_LINK_LLVM_DYLIB is enabled

Otherwise it's easy to hit 2^16 DLL exports limit.

Differential Revision: https://reviews.llvm.org/D89225
The file was modifiedclang/tools/CMakeLists.txt
Commit 09ee1fe85a34642699fc1f3a74605dd79688c739 by craig.topper
[X86] Add more tests for D89178. NFC
The file was addedllvm/test/CodeGen/X86/xaluo128.ll
Commit 350fafabe9d3bda75e80bf077303eb5a09130b53 by paul
[TableGen] Add overload of RecordKeeper::getAllDerivedDefinitions()
  and use in PseudoLowering backend.
Now the two getAllDerivedDefinitions() use StringRef and Arrayref.
Use all_of() in getAllDerivedDefinitions().
The file was modifiedllvm/docs/TableGen/BackGuide.rst
The file was modifiedllvm/utils/TableGen/PseudoLoweringEmitter.cpp
The file was modifiedllvm/include/llvm/TableGen/Record.h
The file was modifiedllvm/lib/TableGen/Record.cpp
Commit d07b290e4b7c55823895e88b683de4178ffc66db by Duncan P. N. Exon Smith
DependencyScanning: pull factory function into MinimizedVFS, NFC

Avoid need for getBufferPtr API, simplifying another patch. No
functionality change.
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
Commit 46d3e428a83ccc0cab73abb2e39a82b1cca53a52 by spatel
[CostModel] get type-based cost for vector intrinsics directly

This is NFC-intended (the reductions and other intrinsics have
tests that should provide coverage) - trying to untangle the
mess that has formed here.

We were stripping the arguments off of the given
"IntrinsicCostAttributes" and then semi-recursively
calling back into getIntrinsicInstrCost() only to
then call getTypeBasedIntrinsicInstrCost(), so make
that call directly instead.
The file was modifiedllvm/include/llvm/CodeGen/BasicTTIImpl.h
Commit ac73cafac0e523879b42b305106cd6e67bfb412e by erich.keane
Ensure TreeTransform considers ParmVarDecls as transformed Decls

See PR47804:

TreeTransform uses TransformedLocalDecls as a map of declarations that
have been transformed already. When doing a "TransformDecl", which
happens in the cases of updating a DeclRefExpr's target, the default
implementation simply returns the already transformed declaration.

However, this was not including ParmVarDecls. SO, any use of
TreeTransform that didn't re-implement TransformDecl would NOT properly
update the target of a DeclRefExpr, resulting in odd behavior.

In the case of Typo-recovery, the result was that a lambda that used its
own parameter would cause an error, since it thought that the
ParmVarDecl referenced was a different lambda. Additionally, this caused
a problem in the AST (a declrefexpr into another scope) such that a
future instantiation would cause an assertion.

This patch ensures that the ParmVarDecl transforming process records
into TransformedLocalDecls so that the DeclRefExpr is ALSO updated.
The file was addedclang/test/SemaCXX/pr47804.cpp
The file was modifiedclang/lib/Sema/TreeTransform.h
Commit 69feac12d0539a7cc19cbda906d46f67029486e1 by Duncan P. N. Exon Smith
Lex: Avoid MemoryBuffer* key in ExcludedPreprocessorDirectiveSkipMapping, NFC

This is a prep patch for changing SourceManager to return
`Optional<MemoryBufferRef>` instead of `MemoryBuffer`. With that change the
address of the MemoryBuffer will be gone, so instead use the start of the
buffer as the key for this map.

No functionality change intended, as it's expected that the pointer identity
matches between the buffers and the buffer data.

Radar-Id: rdar://70139990
Differential Revision: https://reviews.llvm.org/D89136
The file was modifiedclang/include/clang/Lex/PreprocessorExcludedConditionalDirectiveSkipMapping.h
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp
The file was modifiedclang/lib/Lex/PPDirectives.cpp
Commit a324d8f964bf421fa7d8b882b0f64ead28c4149c by efriedma
[AArch64] Add tests for 128-bit shift variations.

It looks like there's still some room for optimization; the funnel shift
lowering is more efficient than the lowering of actual shifts.
The file was modifiedllvm/test/CodeGen/AArch64/arm64-long-shift.ll
The file was modifiedllvm/test/CodeGen/AArch64/funnel-shift.ll
Commit 75ae846de69cccd6ed66357f3ee3ad3301849d95 by stellaraccident
[mlir] Make Python bindings installable.

* Links against libMLIR.so if the project is built for DYLIBs.
* Puts things in the right place in build and install time python/ trees so that RPaths line up.
* Adds install actions to install both the extension and sources.
* Copies py source files to the build directory to match (consistent layout between build/install time and one place to point a PYTHONPATH for tests and interactive use).
* Finally, "import mlir" from an installed LLVM just works.

Differential Revision: https://reviews.llvm.org/D89167
The file was modifiedmlir/lib/Bindings/Python/CMakeLists.txt
The file was removedmlir/lib/Bindings/Python/unix_version.lds
The file was modifiedmlir/test/lit.cfg.py
Commit d80ecdf27faf2c45a4264064ddfd5c4524dadce4 by xun
[Coroutine] Rename coro-semmetric-transfer.cpp and possibly fix test failure

Some tests start to fail after https://reviews.llvm.org/D89066.
It's because the size of pointers are different on different targets.
Limit the target in the command so there is no confusion.
Also noticed I had typo in the test name.
Adding disable-llvm-passes option to make the test more stable as well.

Differential Revision: https://reviews.llvm.org/D89269
The file was removedclang/test/CodeGenCoroutines/coro-semmetric-transfer.cpp
The file was addedclang/test/CodeGenCoroutines/coro-symmetric-transfer.cpp
Commit a184c758b77dd6849eab2d46baa6a719780dd539 by craig.topper
[BitCodeAnalyzer] Add a few missing TYPE_CODES and MODULE_CODE_COMDAT to GetCodeName

Happened to notice some of these printing as UnknownCode while running llvm-bcanalyzer on a bc file I had.

Differential Revision: https://reviews.llvm.org/D86900
The file was addedllvm/test/Bitcode/bcanalyzer-comdat.ll
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeAnalyzer.cpp
The file was addedllvm/test/Bitcode/bcanalyzer-types.ll
Commit e465ddac880228b879b5a6549adbb9c8a7f335bf by Jonas Devlieghere
[lldb] Alphabetically sort test categories (NFC)
The file was modifiedlldb/packages/Python/lldbsuite/test/test_categories.py
Commit 360ab009e2b95629388cef132ebe639c120ed35e by Jonas Devlieghere
[lldb] Add instrumentation runtime category
The file was modifiedlldb/packages/Python/lldbsuite/test/test_categories.py
The file was addedlldb/test/API/functionalities/tsan/.categories
The file was addedlldb/test/API/functionalities/asan/.categories
The file was addedlldb/test/API/functionalities/mtc/.categories
The file was addedlldb/test/API/functionalities/ubsan/.categories
Commit b764edc59ff7768e052bc2b9e76e3bb69dd5147b by zeratul976
[clangd] Try harder to get accurate ranges for documentSymbols in macros

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

Differential Revision: https://reviews.llvm.org/D88463
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
The file was modifiedclang-tools-extra/clangd/FindSymbols.cpp
Commit a52cc9b4be362b12ca261000b723374d4b772a45 by davelee.com
[lldb] Handle alternative output in TestAbortExitCode

This test

On macOS, this test can instead return `status = 0 (0x00000000) Terminated due to signal 6`. This updates the `CHECK` accordingly.

Differential Revision: https://reviews.llvm.org/D89273
The file was modifiedlldb/test/Shell/Process/TestAbortExitCode.test
Commit 08924b54debcfd47bcf22a8213308cec7d22b975 by davelee.com
[lldb] Remove unused code in GetVersion (NFC)

Small cleanup to `lldb_private::GetVersion()`.

Differential Revision: https://reviews.llvm.org/D88939
The file was modifiedlldb/source/lldb.cpp
Commit cffb0dd54d41d8e249d2009467c4beb5b681ba26 by bruno.cardoso
[SemaTemplate] Stop passing insertion position around during VarTemplate instantiation

They can get stale at use time because of updates from other recursive
specializations. Instead, rely on the existence of previous declarations to add
the specialization.

Differential Revision: https://reviews.llvm.org/D87853
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/SemaTemplate/instantiate-var-template.cpp
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/include/clang/Sema/Template.h
Commit 7f8dc347c9552f339b4410b679d91bceb2cc456e by Jonas Devlieghere
[llvm] Export LLVM_USE_SPLIT_DWARF in LLVMConfig.cmake

Export LLVM_USE_SPLIT_DWARF in LLVMConfig.cmake so that it can be used
from standalone builds of clang and lldb. Currently, there is no way for
standalone builds to know whether this option was set which means that
it only applies to LLVM.

Differential revision: https://reviews.llvm.org/D89282
The file was modifiedllvm/cmake/modules/LLVMConfig.cmake.in
Commit b215a26628feae349d663f687efe475d622970b7 by ruiling.song
[AMDGPU] Update LiveVariables in convertToThreeAddress()

This can fix an asan failure like below.
==15856==ERROR: AddressSanitizer: use-after-poison on address ...
READ of size 8 at 0x6210001a3cb0 thread T0
    #0 llvm::MachineInstr::getParent()
    #1 llvm::LiveVariables::VarInfo::findKill()
    #2 TwoAddressInstructionPass::rescheduleMIBelowKill()
    #3 TwoAddressInstructionPass::tryInstructionTransform()
    #4 TwoAddressInstructionPass::runOnMachineFunction()

We need to update the Kills if we replace instructions. The Kills
may be later accessed within TwoAddressInstruction pass.

Differential Revision: https://reviews.llvm.org/D89092
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was addedllvm/test/CodeGen/AMDGPU/stale-livevar-in-twoaddr-pass.mir
Commit 2513407d39506edf2a98f647088a9e1789f8c418 by sbc
[lld][WebAssembly] Add support for -Bsymbolic flag

This flag works in a similar way to the ELF linker in that it
will resolve any defined symbols to their local definition with
a shared library or -pie executable.

This flag has no effect on static linking.

Differential Revision: https://reviews.llvm.org/D89152
The file was addedlld/test/wasm/bsymbolic.s
The file was modifiedlld/wasm/Relocations.cpp
The file was modifiedlld/wasm/SyntheticSections.h
The file was modifiedlld/wasm/Driver.cpp
The file was modifiedlld/wasm/Config.h
The file was modifiedlld/wasm/Options.td
The file was modifiedlld/wasm/SyntheticSections.cpp
The file was modifiedlld/wasm/Writer.cpp
Commit 85c779d256207fe82ba876d19724c497ee904be7 by i
[llc] -filetype=null: don't create .null if -o is not specified

The new behavior is consistent with llvm-mc -filetype=null.
The file was modifiedllvm/test/CodeGen/X86/null-streamer.ll
The file was modifiedllvm/tools/llc/llc.cpp
Commit ec2c2ad2a2dddf24b052625b5ff434704ea43e24 by Adrian Prantl
Add accessors. (NFC)

There's a place in swift-lldb where it is useful to create a copy of
an lldb_private::Variable. Adding these two accessors makes this
possible.
The file was modifiedlldb/include/lldb/Symbol/Variable.h
The file was modifiedlldb/include/lldb/Symbol/Type.h