Changes

Summary

  1. Revert "[X86] Check immediate before get it." (details)
  2. [X86] Check immediate before get it. (details)
  3. [ARM][NEON] Combine base address updates for vld1Ndup intrinsics (details)
  4. [clang] Implement P2266 Simpler implicit move (details)
  5. [ORC-RT] Fix a comment. (details)
  6. [JITLink][MachO] Add missing testcase. (details)
  7. [ORC-RT] Remove unused header in unit test. (details)
  8. VPlanSLP.cpp - tidy implicit header dependencies. NFCI. (details)
  9. ArgumentPromotion.cpp - remove unused <string> include. NFCI. (details)
  10. SValExplainer.h - get APSInt values by const reference instead of value. NFCI. (details)
  11. [InstCombine] fold ctlz/cttz of bool types (details)
  12. [clang][NFC] Add IsAnyDestructorNoReturn field to CXXRecord instead of calculating it on demand (details)
  13. [ARM] Introduce t2WhileLoopStartTP (details)
  14. LoopUnrollAndJamPass.cpp - remove unused <vector> include. NFCI. (details)
  15. GVN.cpp - remove unused <vector> include. NFCI. (details)
  16. fix comment typos to cycle bots (details)
  17. DWARFDebugFrame.cpp - remove unused <string> include. NFCI. (details)
  18. MachOObjectFile.cpp - remove unused <string> include. NFCI. (details)
  19. RegUsageInfoPropagate.cpp - remove unused <string> and <map> includes. NFCI. (details)
  20. ProfiledCallGraph.h - remove unused <string> include. NFCI. (details)
  21. DetailedRecordsBackend.cpp - tidy implicit header dependencies. NFCI. (details)
  22. DetailedRecordsBackend.cpp - printSectionHeading - avoid std::string creation/copies. (details)
  23. DIPrinter.h - tidy implicit header dependencies. NFCI. (details)
  24. BoundsChecking.cpp - tidy implicit header dependencies. NFCI. (details)
  25. RawError.h - remove unused <string> include. NFCI. (details)
  26. [LoopUnroll] Test multi-exit runtime unrolling with predictable exit (NFC) (details)
  27. [lld/mac] clarify comment (details)
  28. DirectoryWatcher: also wait for the notifier thread (details)
  29. [SPARC] Legalize truncation and extension between fp128 and half (details)
  30. [clang-format] Adds a formatter for aligning arrays of structs (details)
  31. [fuzzer] Fix build on musl (details)
  32. [ELF] Add OVERWRITE_SECTIONS command (details)
  33. Introduce tensor.insert op to Tensor dialect. (details)
  34. [DSE] Extra multiblock loop tests, NFC. (details)
  35. unwind: allow building with GCC (details)
  36. Fix misspelled instruction in X86 assembly parser (details)
  37. [ms] [llvm-ml] Fix capitalization of the ignored CPU directives (details)
  38. [ms] [llvm-ml] When parsing MASM, "jmp short" instructions are case insensitive (details)
  39. [lld-macho][nfc] Remove InputSection::outSecFileOff (details)
  40. [lld-macho][nfc] Represent the image loader cache with a ConcatInputSection (details)
  41. [lld-macho][nfc] Add `final` to classes where possible (details)
  42. [Utils] Add missing freeze and poison keyword highlights (details)
  43. [mlir][linalg] Add constant padding helper to PadTensorOp (details)
  44. [mlir] Vectorize linalg.pad_tensor consumed by transfer_read (details)
  45. [mlir] Vectorize linalg.pad_tensor consumed by subtensor_insert (details)
  46. [mlir] Vectorize linalg.pad_tensor consumed by transfer_write (details)
  47. [DominanceInfo] Make the ctor take a defaulted value for the operand. NFC. (details)
  48. [mlir][linalg] Remove generic PadTensorOp vectorization pattern (details)
  49. [ORC-RT] Fix an error check. (details)
  50. Calculate getTerminator only when necessary (details)
  51. Implement DW_CFA_LLVM_* for Heterogeneous Debugging (details)
  52. [lld-macho] Try to fix MSAN "uninitialized memory" error (details)
  53. [Testsuite] Change these tests to only have a single verification error, NFC. (details)
  54. [LLParser] Remove outdated deplibs (details)
  55. AMD k8 family does not support SSE4.x which are required by x86-64-v2+ (details)
  56. [mlir][linalg] Lower PadTensorOp to InitTensorOp + FillOp + SubTensorInitOp (details)
  57. [mlir][linalg] Vectorize linalg.pad_op source copying (static source shape) (details)
  58. [mlir][linalg] Vectorize linalg.pad_op source copying (improved) (details)
  59. [LoopVectorize] precommit pr50686.ll for D104148 (details)
  60. Only consider built-in compound assignment operators for -Wunused-but-set-* (details)
  61. [mlir] Add ExpOp to Complex dialect. (details)
  62. [mlir][linalg] Lower PadTensorOps with non-constant pad value (details)
  63. [mlir][linalg] Add support for scalar input operands. (details)
  64. [mlir] Remove traits that require vector type support from ops in Complex dialect. (details)
Commit 1e72b9d52f9c734559ac7b134e3ead678e30cfd0 by yuanke.luo
Revert "[X86] Check immediate before get it."

This reverts commit 9eb2f723c24523194b833779d20b027bf89a4f55.
The file was removedllvm/test/CodeGen/X86/unfoldMemoryOperand.mir
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
Commit 5be314f79ba7db0dcd6ea94b8dfcf7f03d8da89c by yuanke.luo
[X86] Check immediate before get it.

For CMP imm instruction, when the operand 1 is symbol address we should
check if it is immediate first. Here is the example code.
`CMP64mi32 $noreg, 8, killed renamable $rcx, @d, $noreg, @a, implicit-def
$eflags`
Many thanks to Craig, Topper for the test case to reproduce this issue.

Differential Revision: https://reviews.llvm.org/D104037
The file was addedllvm/test/CodeGen/X86/unfoldMemoryOperand.mir
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
Commit f6b9836b09c78dc05abb6dfd4ad39345bc4d9f09 by kbessonova
[ARM][NEON] Combine base address updates for vld1Ndup intrinsics

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D103836
The file was modifiedllvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
The file was modifiedllvm/lib/Target/ARM/ARMInstrNEON.td
The file was modifiedllvm/test/CodeGen/ARM/arm-vlddup-update.ll
The file was modifiedllvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
Commit bf20631782183cd19e0bb7219e908c2bbb01a75f by mizvekov
[clang] Implement P2266 Simpler implicit move

This Implements [[http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2266r1.html|P2266 Simpler implicit move]].

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>

Reviewed By: Quuxplusone

Differential Revision: https://reviews.llvm.org/D99005
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp
The file was modifiedclang/test/SemaCXX/deduced-return-type-cxx14.cpp
The file was modifiedclang/test/CXX/drs/dr3xx.cpp
The file was modifiedclang/test/SemaCXX/coroutine-rvo.cpp
The file was modifiedclang/test/SemaCXX/coroutines.cpp
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/test/CXX/temp/temp.decls/temp.mem/p5.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/SemaCXX/return-stack-addr.cpp
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp
The file was modifiedclang/test/SemaCXX/warn-return-std-move.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp
The file was modifiedclang/lib/Sema/SemaType.cpp
The file was modifiedclang/test/SemaCXX/constant-expression-cxx14.cpp
The file was modifiedclang/test/CXX/class/class.init/class.copy.elision/p3.cpp
Commit e405db075b308094b831c99011d813e65cb6bf2c by Lang Hames
[ORC-RT] Fix a comment.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h
Commit fc3ca2cc083b58780b6b3aac9d0cfac9f3be8cc7 by Lang Hames
[JITLink][MachO] Add missing testcase.

This test was accidentally left out of f9649d123db.
The file was addedllvm/test/ExecutionEngine/JITLink/X86/MachO_cstring_section_splitting.s
Commit a7c3105adb55e506e63ad63ab2110341df1ab92b by Lang Hames
[ORC-RT] Remove unused header in unit test.
The file was modifiedcompiler-rt/lib/orc/unittests/simple_packed_serialization_test.cpp
The file was modifiedcompiler-rt/lib/orc/unittests/wrapper_function_utils_test.cpp
Commit b013c58e82c67574b137d33d275c7b9328446b70 by llvm-dev
VPlanSLP.cpp - tidy implicit header dependencies. NFCI.

We don't use std::string and std::vector, but we do use std::pair and std::max.
The file was modifiedllvm/lib/Transforms/Vectorize/VPlanSLP.cpp
Commit 2477b498f2566d303d1b35c495f289512854ec00 by llvm-dev
ArgumentPromotion.cpp - remove unused <string> include. NFCI.
The file was modifiedllvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Commit 7d7e913e096a915038dd41d0bfe5dd8827da1f60 by llvm-dev
SValExplainer.h - get APSInt values by const reference instead of value. NFCI.

Avoid unnecessary copies.
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h
Commit afd44bb6f29ca11b87b76349709fdee2ecd9d921 by spatel
[InstCombine] fold ctlz/cttz of bool types

https://alive2.llvm.org/ce/z/tX4pUT
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/intrinsics.ll
Commit 7ff3a89a7b94193638cb13f8a0a1ef70094c8263 by markus.boeck02
[clang][NFC] Add IsAnyDestructorNoReturn field to CXXRecord instead of calculating it on demand

This patch addresses a performance issue I noticed when using clang-12 to compile projects of mine. Even though the files weren't too large (around 1k cpp), the compiler was taking more than a minute to compile the source file, much longer than either GCC or MSVC.

Using a profiler it turned out the issue was the isAnyDestructorNoReturn function in CXXRecordDecl. In particular it being recursive, recalculating the property for every invocation, for every field and base class. This showed up in tracebacks in the profiler.

This patch instead adds IsAnyDestructorNoReturn as a Field to the data inside of CXXRecord and updates when a new base class, destructor, or record field member is added.

After this patch the problematic file of mine went from a compile time of 81s, down to 12s.

The patch itself should not change any functionality, just improve performance.

Differential Revision: https://reviews.llvm.org/D104182
The file was modifiedclang/include/clang/AST/CXXRecordDeclDefinitionBits.def
The file was modifiedclang/lib/AST/DeclCXX.cpp
The file was modifiedclang/include/clang/AST/DeclCXX.h
Commit bee2f618d599201aa0c91d0322f058cc697e0779 by david.green
[ARM] Introduce t2WhileLoopStartTP

This adds t2WhileLoopStartTP, similar to the t2DoLoopStartTP added in
D90591. It keeps a reference to both the tripcount register and the
element count register, so that the ARMLowOverheadLoops pass in the
backend can pick the correct one without having to search for it from
the operand of a VCTP.

Differential Revision: https://reviews.llvm.org/D103236
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-memtp-loop.ll
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
The file was modifiedllvm/lib/Target/ARM/MVETailPredUtils.h
The file was modifiedllvm/test/CodeGen/Thumb2/mve-gather-scatter-optimisation.ll
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/wls-search-pred.mir
The file was modifiedllvm/lib/Target/ARM/ARMBlockPlacement.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/memcall.ll
The file was modifiedllvm/lib/Target/ARM/ARMInstrThumb2.td
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h
The file was modifiedllvm/lib/Target/ARM/MVETPAndVPTOptimisationsPass.cpp
Commit c14fd171fe77a829347e5fd7650632b3e6dd857c by llvm-dev
LoopUnrollAndJamPass.cpp - remove unused <vector> include. NFCI.
The file was modifiedllvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
Commit 56541d13779047d353f6665d33f58456f7943e6e by llvm-dev
GVN.cpp - remove unused <vector> include. NFCI.
The file was modifiedllvm/lib/Transforms/Scalar/GVN.cpp
Commit 5f9bc580d81ba0f8f2c2e8ba4ad13eca07bf1198 by thakis
fix comment typos to cycle bots
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SyntheticSections.cpp
Commit 35a12023f3925ab6161e0525f7570810e3ee04e7 by llvm-dev
DWARFDebugFrame.cpp - remove unused <string> include. NFCI.
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
Commit dbfa3d289bc435d8edab8ad0e1ebb81a01967575 by llvm-dev
MachOObjectFile.cpp - remove unused <string> include. NFCI.
The file was modifiedllvm/lib/Object/MachOObjectFile.cpp
Commit 2c4ee1e112a2806288d30aa3a70daae3ba99a2e5 by llvm-dev
RegUsageInfoPropagate.cpp - remove unused <string> and <map> includes. NFCI.
The file was modifiedllvm/lib/CodeGen/RegUsageInfoPropagate.cpp
Commit 3dc727e81b92f53533da1c617584f466a7dfb9cc by llvm-dev
ProfiledCallGraph.h - remove unused <string> include. NFCI.
The file was modifiedllvm/include/llvm/Transforms/IPO/ProfiledCallGraph.h
Commit a03d09f423a41098fe92286da8de25c5ade4ba25 by llvm-dev
DetailedRecordsBackend.cpp - tidy implicit header dependencies. NFCI.

We don't use <algorithm>, <set> or <vector>, but we do use std::pair (<utility>).
The file was modifiedllvm/lib/TableGen/DetailedRecordsBackend.cpp
Commit d1b57086d55afcfa94711a0b09c22a4113f6261f by llvm-dev
DetailedRecordsBackend.cpp - printSectionHeading - avoid std::string creation/copies.

Don't create std::string from constant c-strings or pass std::string by value - we can use StringRef instead.
The file was modifiedllvm/lib/TableGen/DetailedRecordsBackend.cpp
Commit 033e594c594b4ba32213997a64af97e0c2bf321c by llvm-dev
DIPrinter.h - tidy implicit header dependencies. NFCI.

We don't use <string> but we do use std::unique_ptr (<memory>) and llvm::Optional<>
The file was modifiedllvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h
Commit 9efe89d82ff95e72d25772c5c7eb1f55e0b7492e by llvm-dev
BoundsChecking.cpp - tidy implicit header dependencies. NFCI.

We don't use <vector> but we do use std::pair (<utility>)
The file was modifiedllvm/lib/Transforms/Instrumentation/BoundsChecking.cpp
Commit 4089e0bbfafd23704a1afef74f65369445a8b02b by llvm-dev
RawError.h - remove unused <string> include. NFCI.
The file was modifiedllvm/include/llvm/DebugInfo/PDB/Native/RawError.h
Commit 6ecc99210cdc87cff7d47484695b812196a9e905 by nikita.ppv
[LoopUnroll] Test multi-exit runtime unrolling with predictable exit (NFC)

The (prior to prologue insertion) predictable exit shouldn't get
folded here. Make sure it isn't...
The file was addedllvm/test/Transforms/LoopUnroll/runtime-loop-known-exit.ll
Commit 7d4c8a2b8f16a2d1cf8120c75d941e99b8a8200a by thakis
[lld/mac] clarify comment

This is a "we should do X in the future" fixme, not an "X might go wrong"
fixme.
The file was modifiedlld/MachO/UnwindInfoSection.cpp
Commit 527a1821e6f8e115db3335a3341c7ac491725a0d by Saleem Abdulrasool
DirectoryWatcher: also wait for the notifier thread

Ultimately the DirectoryWatcher is not ready until the notifier thread
is also active.  Failure to wait for the notifier thread may result in
loss of events.  While this is not catastrophic in practice, the tests
are sensitive to this as depending on the thread scheduler, the thread
may fail to being execution before the operations are completed by the
fixture.  Running this in a tight loop shows no regressions locally as
previously, but this failure mode was been sighted once on a builder.
The file was modifiedclang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp
Commit 5be3a1a06483a5958a1a5dbffda386fd4ce579fe by thatlemon
[SPARC] Legalize truncation and extension between fp128 and half

Lower truncations and expansions between fp128 and half values into libcalls.
Expand truncating stores into two separate truncation and a store operations.

Reviewed By: jrtc27

Differential Revision: https://reviews.llvm.org/D104185
The file was modifiedllvm/lib/Target/Sparc/SparcISelLowering.cpp
The file was modifiedllvm/test/CodeGen/SPARC/fp16-promote.ll
Commit 673c5ba58497298a684f8b8dfddbfb11cd89950e by bjoern
[clang-format] Adds a formatter for aligning arrays of structs

This adds a new formatter to arrange array of struct initializers into
neat columns.

Differential Revision: https://reviews.llvm.org/D101868
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
The file was modifiedclang/lib/Format/WhitespaceManager.cpp
The file was modifiedclang/include/clang/Format/Format.h
The file was modifiedclang/lib/Format/Format.cpp
The file was modifiedclang/lib/Format/WhitespaceManager.h
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/docs/ReleaseNotes.rst
The file was modifiedclang/docs/ClangFormatStyleOptions.rst
The file was modifiedclang/lib/Format/FormatToken.h
The file was addedclang/test/Format/struct-array-initializer.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.h
Commit 60e32a1f34e9ea60155a98bbe6ee5ec2a383efa3 by i
[fuzzer] Fix build on musl

cstddef is needed for size_t definition.
(Multiple headers can provide size_t but none of them exists.)

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D96213
The file was modifiedcompiler-rt/lib/fuzzer/FuzzerInterceptors.cpp
Commit 899fdf548eee427fe08e462955e6f817ca949730 by i
[ELF] Add OVERWRITE_SECTIONS command

This implements https://sourceware.org/bugzilla/show_bug.cgi?id=26404

An `OVERWRITE_SECTIONS` command is a `SECTIONS` variant which contains several
output section descriptions. The output sections do not have specify an order.
Similar to `INSERT [BEFORE|AFTER]`, `LinkerScript::hasSectionsCommand` is not
set, so the built-in rules (see `docs/ELF/linker_script.rst`) still apply.
`OVERWRITE_SECTIONS` can be more convenient than `INSERT` because it does not
need an anchor section.

The initial syntax is intentionally narrow to facilitate backward compatible
extensions in the future. Symbol assignments cannot be used.

This feature is versatile. To list a few usage:

* Use `section : { KEEP(...) }` to retain input sections under GC
* Define encapsulation symbols (start/end) for an output section
* Use `section : ALIGN(...) : { ... }` to overalign an output section (similar to ld64 `-sectalign`)

When an output section is specified by both `OVERWRITE_SECTIONS` and
`INSERT`, `INSERT` is processed after overwrite sections. To make this work,
this patch changes `InsertCommand` to use name based matching instead of pointer
based matching. (This may cause a difference when `INSERT` moves one output
section more than once. Such duplicate commands should not be used in practice
(seems that in GNU ld the output sections may just disappear).)

A linker script can be used without -T/--script. The traditional `SECTIONS`
commands are concatenated, so a wrong rule can be more noticeable from the
section order. This feature if misused can be less noticeable, just like
`INSERT`.

Differential Revision: https://reviews.llvm.org/D103303
The file was modifiedlld/ELF/LinkerScript.h
The file was addedlld/test/ELF/linkerscript/overwrite-sections.test
The file was modifiedlld/ELF/LinkerScript.cpp
The file was modifiedlld/ELF/ScriptParser.cpp
The file was modifiedlld/docs/ReleaseNotes.rst
The file was modifiedlld/docs/ELF/linker_script.rst
The file was modifiedlld/test/ELF/linkerscript/insert-duplicate.test
The file was addedlld/test/ELF/linkerscript/overwrite-sections-discard.test
Commit b4baccc2a760ea13901f201e6ca326284254d205 by hanchung
Introduce tensor.insert op to Tensor dialect.

Add `tensor.insert` op to make `tensor.extract`/`tensor.insert` work in pairs
for `scalar` domain. Like `subtensor`/`subtensor_insert` work in pairs in
`tensor` domain, and `vector.transfer_read`/`vector.transfer_write` work in
pairs in `vector` domain.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D104139
The file was modifiedmlir/test/Dialect/Tensor/invalid.mlir
The file was modifiedmlir/test/Dialect/Tensor/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Tensor/IR/TensorOps.cpp
The file was modifiedmlir/test/Dialect/Tensor/ops.mlir
The file was modifiedmlir/include/mlir/Dialect/Tensor/IR/TensorOps.td
Commit 562593ff82f89961c2fb9cf89eb9524ec51425e9 by david.green
[DSE] Extra multiblock loop tests, NFC.

Some of these can be DSE'd, some of which cannot. Useful in D100464.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll
Commit e03be2efe564026ad3b04d459794c89c674e1ed9 by Saleem Abdulrasool
unwind: allow building with GCC

This was regressed in adf1561d6ce8.  Since gcc does not support
`__has_feature`, this adjusts the build to use the
`__SANITIZE_ADDRESS__` macro which GCC defines to identify if ASAN is
enabled (similar to `__has_feature`).  This allows building libunwind
with gcc again.

Patch by Daniel Levin!

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D104176
The file was modifiedlibunwind/src/libunwind.cpp
Commit 56edcbc2ad8c15b01fd8b47c1f2665d274d0e896 by epastor
Fix misspelled instruction in X86 assembly parser

Did not correctly handle "jecxz short <address>".

Discovered while working on LLVM-ML; shows up in z_Windows_NT-586_asm.asm from the OpenMP runtime

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104194
The file was modifiedllvm/test/MC/X86/intel-syntax.s
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Commit d81c059c3ed22e7f52eb995599e576abd30eb895 by epastor
[ms] [llvm-ml] Fix capitalization of the ignored CPU directives

These directives are matched in lowercase, so make sure to use lowercase for their P suffix.

Differential Revision: https://reviews.llvm.org/D104206
The file was modifiedllvm/lib/MC/MCParser/COFFMasmParser.cpp
The file was addedllvm/test/tools/llvm-ml/ml32-context.asm
Commit f09e200b31f443d972f6723fb9d78638bb38b45c by epastor
[ms] [llvm-ml] When parsing MASM, "jmp short" instructions are case insensitive

Handle "short" in a case-insensitive fashion in MASM.

Required to correctly parse z_Windows_NT-586_asm.asm from the OpenMP runtime.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D104195
The file was addedllvm/test/tools/llvm-ml/jmp_short.asm
The file was modifiedllvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Commit b2a0739012163f5433c0f069e842ee4cea3100f7 by jezng
[lld-macho][nfc] Remove InputSection::outSecFileOff

`outSecFileOff` and the associated `getFileOffset()` accessors were
unnecessary.

For all the cases we care about, `outSecFileOff` is the same as
`outSecOff`. The only time they deviate is if there are zerofill
sections within a given segment. But since zerofill sections are always
at the end of a segment, the only sections where the two values deviate
are zerofill sections themselves. And we never actually query the
outSecFileOff of zerofill sections.

As for `getFileOffset()`, the only place it was being used was to
calculate the offset of the entry symbol. However, we can compute that
value by just taking the difference between the address of the entry
symbol and the address of the Mach-O header. In fact, this appears to be
what ld64 itself does. This difference is the same as the file offset as
long as there are no intervening zerofill sections, but since `__text`
is the first section in `__TEXT`, this never happens, so our previous
use of `getFileOffset()` was not wrong -- just inefficient.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104177
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/ConcatOutputSection.cpp
The file was modifiedlld/MachO/Symbols.cpp
The file was modifiedlld/MachO/UnwindInfoSection.cpp
The file was modifiedlld/MachO/Symbols.h
Commit c5c05ffa4562223cae7db537ca7772afaeccd009 by jezng
[lld-macho][nfc] Represent the image loader cache with a ConcatInputSection

We don't need to define any special behavior for this section,
so creating a subclass for it is redundant.

Reviewed By: #lld-macho, thakis

Differential Revision: https://reviews.llvm.org/D104199
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/SyntheticSections.h
Commit da24e6d43e3fdc07aa84f55b35ec50f6b96545ad by jezng
[lld-macho][nfc] Add `final` to classes where possible

I wanted to see if we would get any perf wins out of this, but
it doesn't seem to be the case. But it still seems worth committing.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104200
The file was modifiedlld/MachO/SyntheticSections.cpp
The file was modifiedlld/MachO/InputFiles.h
The file was modifiedlld/MachO/Writer.cpp
The file was modifiedlld/MachO/ConcatOutputSection.h
The file was modifiedlld/MachO/InputSection.h
The file was modifiedlld/MachO/SyntheticSections.h
Commit 594febf05b41a09409cf3145c6fa7635e9957334 by aqjune
[Utils] Add missing freeze and poison keyword highlights

This patch adds missing keyword highlights for freeze and poison

Reviewed By: MaskRay, porglezomp

Differential Revision: https://reviews.llvm.org/D104017
The file was modifiedllvm/utils/vscode/llvm/syntaxes/ll.tmLanguage.yaml
The file was modifiedllvm/utils/vim/syntax/llvm.vim
Commit bf5d3092f8557301f2e322349880f9f86c884e87 by springerm
[mlir][linalg] Add constant padding helper to PadTensorOp

* Add a helper function that returns the constant padding value (if applicable).
* Remove existing getConstantYieldValueFromBlock function, which does almost the same.
* Adapted from D103243.

Differential Revision: https://reviews.llvm.org/D104004
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
Commit b1b822714db8ea15f811ab03084ee60ff32def21 by springerm
[mlir] Vectorize linalg.pad_tensor consumed by transfer_read

Vectorize linalg.pad_tensor without generating a linalg.init_tensor when consumed by a transfer_read.

Differential Revision: https://reviews.llvm.org/D103735
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit b1fd8a13cc1ab15b53d42996f9cc46aa487d8dbf by springerm
[mlir] Vectorize linalg.pad_tensor consumed by subtensor_insert

Vectorize linalg.pad_tensor without generating a linalg.init_tensor when consumed by a subtensor_insert.

Differential Revision: https://reviews.llvm.org/D103780
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
Commit 562f9e995dfa9e0aaecdfacc880eaa3b357844c2 by springerm
[mlir] Vectorize linalg.pad_tensor consumed by transfer_write

Vectorize linalg.pad_tensor without generating a linalg.init_tensor when consumed by a transfer_write.

Differential Revision: https://reviews.llvm.org/D103137
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
Commit 4fa8677860436b7cf75c5d8bb80a0996c3a83327 by clattner
[DominanceInfo] Make the ctor take a defaulted value for the operand. NFC.

This allows it to be default constructible, which makes sense given it
ignores the operand.
The file was modifiedmlir/include/mlir/IR/Dominance.h
The file was modifiedmlir/lib/IR/Verifier.cpp
Commit fdb21f0c5edd17b9aeb6f5135d0980b9e4c74bf2 by springerm
[mlir][linalg] Remove generic PadTensorOp vectorization pattern

The generic vectorization pattern handles only those cases, where
low and high padding is zero. This is already handled by a
canonicalization pattern.

Also add a new canonicalization test case to ensure that tensor cast ops
are properly inserted.

A more general vectorization pattern will be added in a subsequent commit.

Differential Revision: https://reviews.llvm.org/D103590
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
Commit ba9e28064b25b199715b3a10f3bd3f7ac8cd6dfb by Lang Hames
[ORC-RT] Fix an error check.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h
Commit dcbbc69cc58294cedc865259c6fd5ba80ecd9bd3 by 1894981+hiraditya
Calculate getTerminator only when necessary

Differential Revision: https://reviews.llvm.org/D104202
The file was modifiedllvm/lib/Transforms/IPO/HotColdSplitting.cpp
Commit 167e7afcd52bc1438d60320ec1d1bc53b8eae4a3 by VenkataRamanaiah.Nalamothu
Implement DW_CFA_LLVM_* for Heterogeneous Debugging

Add support in MC/MIR for writing/parsing, and DebugInfo.

This is part of the Extensions for Heterogeneous Debugging defined at
https://llvm.org/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.html

Specifically the CFI instructions implemented here are defined at
https://llvm.org/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.html#cfa-definition-instructions

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D76877
The file was modifiedllvm/include/llvm/MC/MCStreamer.h
The file was modifiedllvm/lib/CodeGen/MIRParser/MIParser.cpp
The file was modifiedllvm/lib/MC/MCDwarf.cpp
The file was addedllvm/test/MC/ELF/cfi-llvm-def-cfa-aspace-errors.s
The file was modifiedllvm/lib/CodeGen/MIRParser/MILexer.h
The file was modifiedllvm/lib/CodeGen/MIRParser/MILexer.cpp
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
The file was modifiedllvm/lib/MC/MCParser/AsmParser.cpp
The file was modifiedllvm/include/llvm/MC/MCDwarf.h
The file was modifiedllvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
The file was modifiedllvm/lib/CodeGen/MachineOperand.cpp
The file was modifiedllvm/test/CodeGen/MIR/AArch64/cfi.mir
The file was addedllvm/test/MC/ELF/cfi-llvm-def-cfa-aspace.s
The file was modifiedllvm/include/llvm/BinaryFormat/Dwarf.def
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
The file was addedllvm/test/tools/llvm-dwarfdump/X86/debug_frame_LLVM_def_cfa_aspace.s
The file was modifiedllvm/lib/MC/MCAsmStreamer.cpp
The file was modifiedllvm/lib/CodeGen/CFIInstrInserter.cpp
The file was modifiedllvm/lib/MC/MCStreamer.cpp
Commit 9c5d43fb5513260dad86c135755bc5313a81e768 by jezng
[lld-macho] Try to fix MSAN "uninitialized memory" error

I *think* this is the fix, with the regression being introduced by
D104199. Not 100% sure since MSAN isn't supported on my Mac machine, and
it'll take some time to spin up a Linux box... will look at the
buildbots for answers
The file was modifiedlld/MachO/Writer.cpp
Commit 0dd4c4b5ae49662359a56f45bccc90b16aea35b0 by clattner
[Testsuite] Change these tests to only have a single verification error, NFC.

These are testing for various verification failures, but have missing returns
at the end of their function.  Add the returns to focus the tests better.
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/test/Dialect/LLVMIR/global.mlir
Commit e0bb5020643cf22e3989c641afaa50892766b557 by th3charlie
[LLParser] Remove outdated deplibs

The comment mentions deplibs should be removed in 4.0. Removing it in this patch.

Reviewed By: compnerd, dexonsmith, lattner

Differential Revision: https://reviews.llvm.org/D102763
The file was modifiedllvm/lib/AsmParser/LLParser.cpp
The file was modifiedllvm/lib/AsmParser/LLLexer.cpp
The file was modifiedllvm/include/llvm/AsmParser/LLParser.h
Commit 092c303955cd18be6c0b923b1c0a1b96e2c91893 by sguelton
AMD k8 family does not support SSE4.x which are required by x86-64-v2+

So don't define __tune__k8__ for these micro architecture.

SSE, SSE2 and SSE3 appear in https://www.amd.com/system/files/TechDocs/25112.PDF
but not SSE4.x.

Differential Revision: https://reviews.llvm.org/D104116
The file was modifiedclang/lib/Basic/Targets/X86.cpp
Commit 98fff5153a81fc501a69a4c184de5236fc806b9f by springerm
[mlir][linalg] Lower PadTensorOp to InitTensorOp + FillOp + SubTensorInitOp

Currently limited to constant pad values. Any combination of dynamic/static tensor sizes and padding sizes is supported.

Differential Revision: https://reviews.llvm.org/D103679
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit 4c2f3d810b4a032792b632998d90baf4ab2ff7f3 by springerm
[mlir][linalg] Vectorize linalg.pad_op source copying (static source shape)

If the source operand of a linalg.pad_op operation has static shape, vectorize the copying of the source.

Differential Revision: https://reviews.llvm.org/D103747
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit 01e3b344690dbb20298977015f13fd03b40132f4 by springerm
[mlir][linalg] Vectorize linalg.pad_op source copying (improved)

Vectorize linalg.pad_op source copying if source or result shape are static.

Differential Revision: https://reviews.llvm.org/D103791
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit 8449af41e5c735960691f711ed9500c2a80a0b11 by guopeilin1
[LoopVectorize] precommit pr50686.ll for D104148
The file was addedllvm/test/Transforms/LoopVectorize/pr50686.ll
Commit b5b9489b2415dc48c39d4d7d4bae6197dc499f38 by sbergman
Only consider built-in compound assignment operators for -Wunused-but-set-*

At least LibreOffice has, for mainly historic reasons that would be hard to
change now, a class Any with an overloaded operator >>= that semantically does
not assign to the LHS but rather extracts into the (by-reference) RHS.  Which
thus caused false positive -Wunused-but-set-parameter and
-Wunused-but-set-variable after those have been introduced recently.

This change is more conservative about the assumed semantics of overloaded
operators, excluding compound assignment operators but keeping plain operator =
ones.  At least for LibreOffice, that strikes a good balance of not producing
false positives but still finding lots of true ones.

(The change to the BinaryOperator case in MaybeDecrementCount is necessary
because e.g. the template f4 test code in warn-unused-but-set-variables-cpp.cpp
turns the += into a BinaryOperator.)

Differential Revision: https://reviews.llvm.org/D103949
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/test/SemaCXX/warn-unused-but-set-variables-cpp.cpp
Commit 73cbc91c93dd5a7ee1b8b1a9d507e194e835b446 by akuegel
[mlir] Add ExpOp to Complex dialect.

Also add a conversion pattern from Complex to Standard/Math dialect.

Differential Revision: https://reviews.llvm.org/D104108
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
Commit ddda52ce3cf2936d9ee05e06ed70e7d270cfcd73 by springerm
[mlir][linalg] Lower PadTensorOps with non-constant pad value

The padding of such ops is not generated in a vectorized way. Instead, emit a tensor::GenerateOp.

We may vectorize GenerateOps in the future.

Differential Revision: https://reviews.llvm.org/D103879
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
Commit 046922e1003795d67df89721e6b76c01b214d408 by gysit
[mlir][linalg] Add support for scalar input operands.

Up to now all structured op operands are assumed to be shaped. The patch relaxes this assumption and allows scalar input operands. In contrast to shaped operands scalar operands are not indexed and directly forwarded to the body of the operation. As all other operands, scalar operands are associated to an indexing map that in case of a scalar or a 0D-operand has an empty range.

We will use scalar operands as a replacement for the capture mechanism. In contrast to captures, the approach ensures we can generate the function signature from the operand list and it prevents outdated capture values in case a transformation updates only the capture operand but not the hidden body of a named operation.

Removing captures and updating existing operations such as linalg.fill is left for a later patch.

The patch depends on https://reviews.llvm.org/D103891 and https://reviews.llvm.org/D103890.

Differential Revision: https://reviews.llvm.org/D104109
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor.mlir
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
The file was modifiedmlir/test/Dialect/Linalg/reshape_fusion.mlir
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Loops.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/test/Dialect/Linalg/tile-and-pad-tensors.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp
Commit 2116eadf0994942fa99778d9b9d4315bc106f35f by akuegel
[mlir] Remove traits that require vector type support from ops in Complex dialect.

Actually, no vector types are supported so far. We should add the traits once
the vector types are supported (e.g. ElementwiseMappable.traits).
Instead add Elementwise trait to each op.

Differential Revision: https://reviews.llvm.org/D104103
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td