Changes

Summary

  1. Fix some typos in the MLIR documentation. (details)
  2. [ORC][examples] Fix ThinLtoJIT example after changes in 85fb997659b. (details)
  3. [ORC] Add a convenience method for setting the ExecutionSession to LLJITBuilder. (details)
  4. [X86] Fix NSW/NUW typo in avg test (PR44973) (details)
  5. [clang-format] Merge name and colon into a single token for C# named arguments (details)
  6. libclang: Make shared object symbol exporting by default (details)
  7. [AIX] Pack BasicBlockBits (details)
  8. [clang][doxygen] Fix false -Wdocumentation warning for tag typedefs (details)
  9. [GISel][KnownBits] Give up on PHI analysis as soon as we don't know anything (details)
  10. [cxx_status] Update -std= instructions for C++20. (details)
  11. [llvm][build] Fix shared lib builds. [NFC] (details)
  12. Revert "[NFCI][DebugInfo]: Corrected a Typo." (details)
  13. [ConstantFold] add/move tests for FP with undef operand; NFC (details)
  14. Revert "[AArch64][SVE] Add intrinsics for SVE2 bitwise ternary operations" (details)
  15. Revert "libclang: Add static build support for Windows" and (details)
  16. [X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT (details)
  17. Revert 714265dabb606bfef2f85694234f152edbfa91ac "[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT" (details)
  18. Recommit "[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT"" (details)
  19. [AIX] Improve 32/64-bit build configuration (details)
  20. [ASTImporter] Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage (details)
  21. [Driver] Escape the program path for -frecord-command-line (details)
  22. [SVE] Add support for lowering GEPs involving scalable vectors. (details)
  23. [SCCP] Do not mark unknown loads as overdefined. (details)
  24. [mlir] [VectorOps] Multi-dim reductions for lowering vector.contract (details)
  25. [mlir] Use LLJIT::getMainJITDylib instead of hardcoding '<main>' (details)
  26. [lldb/Plugin] Don't mark ProcessNetBSD as a plugin (details)
  27. Revert "[Driver] Escape the program path for -frecord-command-line" (details)
  28. [mlir][Parser] Update DenseElementsAttr to print in hex when the number of elements is over a certain threshold. (details)
  29. [lldb/Test] Remove stale README in test/API (details)
  30. [libc++] Explain XFAILs with std::uncaught_exceptions test (details)
  31. [X86] Custom legalize v1i1 add/sub/mul to xor/xor/and with avx512. (details)
  32. [X86] Fix a couple copy mistakes in v4i1 or/and/xor isel patterns. (details)
  33. [X86] Custom legalize v1i1 UADDSAT/USUBSAT/SADDSAT/UADDSAT to match v2i1/v4i1/v8i1 etc. (details)
  34. [X86] Expand vselect of v1i1 under avx512. (details)
  35. [X86] Add CMOV_VK1 pseudo so we don't crash on v1i1 ISD::SELECT (details)
  36. [libc++][regex] Validate backreferences in the constructor. (details)
  37. [libunwind][CMake] Treat S files as C to work around CMake bug. (details)
  38. Filter callbr insts from critical edge splitting (details)
  39. [Dominators] Use Instruction::comesBefore for block-local queries, NFC (details)
Commit 8928c6dbbf7d1de32e84f3ec2b778c006fc70091 by riddleriver
Fix some typos in the MLIR documentation.

Summary: Fix minor typos in the tutorial and the "writing a pass" page.

Differential Revision: https://reviews.llvm.org/D74905
The file was modifiedmlir/docs/Tutorials/Toy/Ch-6.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-4.md
The file was modifiedmlir/docs/WritingAPass.md
The file was modifiedmlir/docs/Tutorials/Toy/Ch-5.md
Commit 6de21c556d159d29e7957821fa8b83ef68083b76 by Lang Hames
[ORC][examples] Fix ThinLtoJIT example after changes in 85fb997659b.
The file was modifiedllvm/examples/ThinLtoJIT/ThinLtoJIT.cpp
Commit 813b1b9fd6c19706b735a595d33f7b8ebcd08be7 by Lang Hames
[ORC] Add a convenience method for setting the ExecutionSession to LLJITBuilder.

Can be used to set a custom pre-configured ExecutionSession for the LLJIT or
LLLazyJIT instance being constructed.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
Commit e2c2eb0a5509ed8e013c4e4d880de27e60641b9a by llvm-dev
[X86] Fix NSW/NUW typo in avg test (PR44973)

The not_avg_v16i8_wide_constants test shouldn't assume NSW/NUW for the addition of -1 - copy + paste typo from other avg tests
The file was modifiedllvm/test/CodeGen/X86/avg.ll
Commit a11ff39ba2ad3975a40e2684948a4dd2ada89bd3 by jbcoe
[clang-format] Merge name and colon into a single token for C# named arguments

Summary:
Merge 'argumentName' and ':' into a single token in foo(argumentName: bar).

Add C# named argument as a token type.

Reviewers: krasimir, MyDeveloperDay

Reviewed By: krasimir

Tags: #clang-format

Differential Revision: https://reviews.llvm.org/D74894
The file was modifiedclang/lib/Format/FormatToken.h
The file was modifiedclang/lib/Format/FormatTokenLexer.h
The file was modifiedclang/lib/Format/FormatTokenLexer.cpp
The file was modifiedclang/unittests/Format/FormatTestCSharp.cpp
Commit 7a7c753b0cca6abb61f054842fb087dfc30dc563 by thakis
libclang: Make shared object symbol exporting by default

https://reviews.llvm.org/D74564 enabled static building for libclang,
and for non CMake consumers they had to set the `CMAKE_EXPORTS` define
when consuming libclang.

This commit makes the non CMake users of the static building have to define `CMAKE_NO_EXPORTS`.

Differential Revision: https://reviews.llvm.org/D74907
The file was modifiedclang/include/clang-c/Platform.h
The file was modifiedclang/tools/libclang/CMakeLists.txt
Commit 967eeb109bedc4ae606fdf6ad6eca58ffbac6739 by daltenty
[AIX] Pack BasicBlockBits

Summary:
D51664 introduces a new structure BasicBlockBits which it expects to be
packed a certain way. This change is very similar to D60164, and we apply the
same fix:

"On AIX, the canonical layout of bit-fields would cause
these ... to span four bytes. Applying the pack pragma for compilers that
employ the AIX canonical layout allows these ... to fit within the expected
two bytes. In the future, the pragma would also likely need to be applied when
building with Clang on AIX."

Reviewers: jasonliu, hubert.reinterpretcast, sfertile, xingxue

Reviewed By: sfertile

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74911
The file was modifiedllvm/include/llvm/IR/BasicBlock.h
Commit 2f56789c8fe8edb57bc7a193592ecd35a393fe4a by Jan Korous
[clang][doxygen] Fix false -Wdocumentation warning for tag typedefs

For tag typedefs like this one:

/*!
@class Foo
*/
typedef class { } Foo;

clang -Wdocumentation gives:

warning: '@class' command should not be used in a comment attached to a
non-struct declaration [-Wdocumentation]

... while doxygen seems fine with it.

Differential Revision: https://reviews.llvm.org/D74746
The file was modifiedclang/lib/AST/CommentSema.cpp
The file was addedclang/test/Sema/warn-documentation-tag-typedef.cpp
The file was modifiedclang/include/clang/AST/CommentSema.h
Commit e4a9225f5d10f35cf9cf3664bb93620880228782 by qcolombet
[GISel][KnownBits] Give up on PHI analysis as soon as we don't know anything

When analyzing PHIs, we gather the known bits for every operand and
merge them together to get the known bits of the result of the PHI.
It is not unusual that merging the information leads to know nothing
on the result (e.g., phi a: i8 3, b: i8 unknown, ..., after looking at the
second argument we know we will know nothing on the result), thus, as
soon as we reach that state, stop analyzing the following operand (i.e.,
on the previous example, we won't process anything after looking at `b`).

This improves compile time in particular with PHIs with a large number
of operands.

NFC.
The file was modifiedllvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
The file was modifiedllvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
Commit 6d34a87bae6ea211076c25faef7da5d29cb8e46d by richard
[cxx_status] Update -std= instructions for C++20.

We merged support for -std=c++20 to the Clang 10 branch, so -std=c++2a
is only needed in Clang 9 and earlier.
The file was modifiedclang/www/cxx_status.html
Commit 0c8fa6db90ae856b844d7d2925672cbaef3e0668 by francesco.petrogalli
[llvm][build] Fix shared lib builds. [NFC]

The code at https://reviews.llvm.org/D74808 has broken builds that are
configured with -DBUILD_SHARED_LIBS=On.

This patch adds the correct library dependencies.
The file was modifiedllvm/lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt
The file was modifiedllvm/lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt
Commit 3d0564c7e07b00a4ddd672e5efb12b75501f47d9 by SourabhSingh.Tomar
Revert "[NFCI][DebugInfo]: Corrected a Typo."

This reverts commit 3e1090922a0b808f424ff424b744752b0d53a3ee
as per Paul Robinson's suggestion.
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFAbbreviationDeclaration.cpp
Commit 7ddbf802cf64e89b77ef2ce44182248921a42172 by spatel
[ConstantFold] add/move tests for FP with undef operand; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/fp-undef.ll
The file was addedllvm/test/Analysis/ConstantFolding/fp-undef.ll
Commit 6f4d9d10293d8e93d7cf3397e3a82ac19c8b629f by thakis
Revert "[AArch64][SVE] Add intrinsics for SVE2 bitwise ternary operations"

This reverts commit ce70e2899879e092b153a4078b993833b6696713.
It broke MC/AArch64/SVE2/bsl-diagnostics.s everywhere.
The file was removedllvm/test/CodeGen/AArch64/sve2-bitwise-ternary.ll
The file was modifiedllvm/include/llvm/IR/IntrinsicsAArch64.td
The file was modifiedllvm/lib/Target/AArch64/SVEInstrFormats.td
The file was modifiedllvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
Commit e84444781aad23ed66d46d23637df4768677e76e by thakis
Revert "libclang: Add static build support for Windows" and
follow-up "libclang: Make shared object symbol exporting by default"

This reverts commit 7a7c753b0cca6abb61f054842fb087dfc30dc563.
This reverts commit 7ff1f55a1219719f57a6f7905c26ce41d1767e4c.

They broke building libclang.dll on Windows, see
https://reviews.llvm.org/D74564
The file was modifiedclang/tools/libclang/CMakeLists.txt
The file was modifiedclang/include/clang-c/Platform.h
Commit 714265dabb606bfef2f85694234f152edbfa91ac by craig.topper
[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT

The type here isn't guaranteed to be a simple type.

Fixes PR44976
The file was addedllvm/test/CodeGen/X86/pr44976.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 1d8860f90bcec1902e2d247c6b1261955a4b6353 by craig.topper
Revert 714265dabb606bfef2f85694234f152edbfa91ac "[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT"

I accidentally messed up the author on the previous commit somehow.
The file was removedllvm/test/CodeGen/X86/pr44976.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit c7b54a196e1363cbe43122f01a728cd71fa1686a by craig.topper
Recommit "[X86] Replace a bad use of MVT::getVectorVT with EVT::getVectorVT""

With the correct author this time
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was addedllvm/test/CodeGen/X86/pr44976.ll
Commit 9e0c95572e5a245b79eff2b214d9b3580e703e4d by daltenty
[AIX] Improve 32/64-bit build configuration

Summary:
AIX supports both 32-bit and 64-bit environments (with 32-bit being the default). This patch improves support for building LLVM on AIX in both 32-bit and 64-bit mode.

  - Change host detection to return correct 32/64-bit triple as config_guess does not return the correct version on 64-bit. This can confuse JIT tests and other things that care about what the host triple is.
  - Remove manual setting of 64-bit flags on AIX. AIX provides OBJECT_MODE environment variable to enable the user to obtain a 64-bit development environment. CMake will properly set these flags provided the user sets the correct OBJECT_MODE before configuring and setting them manually will interfere with 32-bit builds.
  - Don't present the LLVM_BUILD_32_BITS option on AIX, users should use OBJECT_MODE when running CMake instead.

Reviewers: hubert.reinterpretcast, DiggerLin, stevewan

Reviewed By: DiggerLin, stevewan

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74256
The file was modifiedllvm/cmake/modules/GetHostTriple.cmake
The file was modifiedllvm/cmake/modules/HandleLLVMOptions.cmake
The file was modifiedllvm/CMakeLists.txt
Commit bf3f427ba239bd2942bfaa350d06ed072935f048 by shafik
[ASTImporter] Add linkage check to ASTNodeImporter::hasSameVisibilityContext and rename to hasSameVisibilityContextAndLinkage

This fixed is based on the assert in LinkageComputer::getLVForDecl(...) which assumes that all the decls in a redecl chain have the same linkage.

Differential Revision: https://reviews.llvm.org/D74639
The file was modifiedclang/lib/AST/ASTImporter.cpp
Commit 6123074d0c0de3614f1552f2f2d6b9db7b32cebe by scott.linder
[Driver] Escape the program path for -frecord-command-line

Similar to the rest of the command line that is recorded, the program
path must also have spaces and backslashes escaped. Without this
parsing the recorded command line becomes hard on platforms like
Windows where spaces and backslashes are common.

Patch By: Ravi Ramaseshan
Differential Revision: https://reviews.llvm.org/D74811
The file was modifiedclang/test/Driver/clang_f_opts.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit c767cf24e48d9f6c17179abf2e42497601c7165b by efriedma
[SVE] Add support for lowering GEPs involving scalable vectors.

This includes both GEPs where the indexed type is a scalable vector, and
GEPs where the result type is a scalable vector.

Differential Revision: https://reviews.llvm.org/D73602
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-gep.ll
Commit 99809f98d7bb18dbe3be543942a4b467dff7e92e by flo
[SCCP] Do not mark unknown loads as overdefined.

For tracked globals that are unknown after solving, we expect all
non-store uses to be replaced.

This is a follow-up to f8045b250d80, which removed forcedconstant.

We should not mark unknown loads as overdefined, as they either load
from an unknown pointer or an undef global. Restore the original logic
for loads.
The file was addedllvm/test/Transforms/SCCP/loadtest2.ll
The file was modifiedllvm/test/Transforms/SCCP/apint-bigint2.ll
The file was modifiedllvm/test/Transforms/SCCP/loadtest.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp
The file was modifiedllvm/test/Transforms/IPConstantProp/PR26044.ll
Commit ee260c1a0f1c0a8fd1179cdab9fb4312086dcc54 by ajcbik
[mlir] [VectorOps] Multi-dim reductions for lowering vector.contract

Summary:
This implements the last step for lowering vector.contract progressively
to LLVM IR (except for masks). Multi-dimensional reductions that remain
after expanding all parallel dimensions are lowered into into simpler
vector.contract operations until a trivial 1-dim reduction remains.

Reviewers: nicolasvasilache, andydavis1

Reviewed By: andydavis1

Subscribers: mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, arpith-jacob, mgester, lucyrfox, liufengdb, Joonsoo, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74880
The file was modifiedmlir/lib/Dialect/VectorOps/VectorTransforms.cpp
The file was modifiedmlir/test/Dialect/VectorOps/vector-contract-transforms.mlir
Commit 6d60d8695d2066c9ef9360603c88ce938ca65491 by riddleriver
[mlir] Use LLJIT::getMainJITDylib instead of hardcoding '<main>'

This fixes test failures caused by a change to the name of the main
dylib, now called 'main'. It also hardens the engine against potential
future changes to the name.
The file was modifiedmlir/lib/ExecutionEngine/ExecutionEngine.cpp
Commit 3ee281082737d18585abff3b482a7ab86af73b5a by Jonas Devlieghere
[lldb/Plugin] Don't mark ProcessNetBSD as a plugin

ProcessNetBSD has no initializers so it's just a regular library and
shouldn't have the PLUGIN argument in add_lldb_library.
The file was modifiedlldb/source/Plugins/Process/NetBSD/CMakeLists.txt
Commit 577d9ce35532439203411c999deefc9c80e04c69 by scott.linder
Revert "[Driver] Escape the program path for -frecord-command-line"

This reverts commit 6123074d0c0de3614f1552f2f2d6b9db7b32cebe.

Quoting/escaping rules seem host specific, so the test is failing on
some bots.
The file was modifiedclang/test/Driver/clang_f_opts.c
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
Commit 51bf5d3cc19ac113de2ff185fb5bc2b99b8d89bc by riddleriver
[mlir][Parser] Update DenseElementsAttr to print in hex when the number of elements is over a certain threshold.

Summary: DenseElementsAttr is used to store tensor data, which in some cases can become extremely large(100s of mb). In these cases it is much more efficient to format the data as a string of hex values instead.

Differential Revision: https://reviews.llvm.org/D74922
The file was modifiedmlir/include/mlir/IR/Attributes.h
The file was addedmlir/test/IR/dense-elements-hex.mlir
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/lib/IR/Attributes.cpp
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit 0d19b016226dc2c442a34abfe9b9c06ab4d7ea1e by Jonas Devlieghere
[lldb/Test] Remove stale README in test/API

Now that the test live in the same directory the README is no longer
relevant.
The file was removedlldb/test/API/README.md
Commit 07c559caef967cda9812ab7b6ab94c20748e6ac9 by Louis Dionne
[libc++] Explain XFAILs with std::uncaught_exceptions test
The file was modifiedlibcxx/test/std/language.support/support.exception/uncaught/uncaught_exceptions.pass.cpp
Commit d95a10a7f976188e4ffec77d82000afc53a6d39a by craig.topper
[X86] Custom legalize v1i1 add/sub/mul to xor/xor/and with avx512.

We already did this for v2i1, v4i1, v8i1, etc.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/avx512-mask-op.ll
Commit 5228a5544b2c887dab3aede7baf818ca4244141e by craig.topper
[X86] Fix a couple copy mistakes in v4i1 or/and/xor isel patterns.

VK1 was being used as the output of the copy to regclass, but it
should be VK2/VK4. Shouldn't matter in practice though since
VK1/VK2/VK4/VK8/VK16 are all identicaly and just have different VTs.
The file was modifiedllvm/lib/Target/X86/X86InstrAVX512.td
Commit b00ef8951b52451eb31f9e41848246c8fb17a2bb by craig.topper
[X86] Custom legalize v1i1 UADDSAT/USUBSAT/SADDSAT/UADDSAT to match v2i1/v4i1/v8i1 etc.
The file was modifiedllvm/test/CodeGen/X86/avx512-mask-op.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
Commit 7e927698621f476e698eea14e6954057c81ccf4b by craig.topper
[X86] Expand vselect of v1i1 under avx512.

We already do this for v2i1, v4i1, etc.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/avx512-select.ll
Commit e5782377f3f6184abc73a7098c9a0cea0a93350f by craig.topper
[X86] Add CMOV_VK1 pseudo so we don't crash on v1i1 ISD::SELECT
The file was modifiedllvm/test/CodeGen/X86/avx512-select.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Target/X86/X86InstrCompiler.td
Commit 72ce0c8073bc8dfa109d25a3c5f245ee0285568c by Louis Dionne
[libc++][regex] Validate backreferences in the constructor.

This patch enables throwing exceptions for invalid backreferences
in the constructor when using the basic, extended,  grep, or egrep grammar.

This fixes bug 34297.

Differential Revision: https://reviews.llvm.org/D62453
The file was modifiedlibcxx/include/regex
The file was modifiedlibcxx/test/std/re/re.regex/re.regex.construct/bad_backref.pass.cpp
Commit d4ded05ba851304b26a437896bc3962ef56f62cb by bigcheesegs
[libunwind][CMake] Treat S files as C to work around CMake bug.

The OSX_ARCHITECTURES property is supposed to add the -arch flag when
targeting Apple platforms. However, due to a bug in CMake
(https://github.com/Kitware/CMake/blob/master/Source/cmLocalGenerator.cxx#L1780),
this does not apply to assembly files. This results in a linker error
when trying to build libunwind for i386 on MacOS.

rdar://59642189
The file was modifiedlibunwind/src/CMakeLists.txt
Commit 2fe457690da0fc38bc7f9f1d0aee2ba6a6a16ada by isanbard
Filter callbr insts from critical edge splitting

Similarly to how splitting predecessors with an indirectbr isn't handled
in the generic way, we also shouldn't split callbrs, for similar
reasons.
The file was modifiedllvm/lib/Transforms/Scalar/LICM.cpp
The file was addedllvm/test/Transforms/LICM/callbr-crash.ll
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
Commit 7593a480dbce4e26f7dda4aa8f15bffd03acbfdb by Vedant Kumar
[Dominators] Use Instruction::comesBefore for block-local queries, NFC

Use the lazy instruction ordering facility for block-local dominance
queries.

Differential Revision: https://reviews.llvm.org/D74931
The file was modifiedllvm/lib/IR/Dominators.cpp
The file was modifiedllvm/unittests/IR/DominatorTreeTest.cpp