SuccessChanges

Summary

  1. [MSSA][NewPM] Handle tests with -print-memoryssa (details)
  2. [X86] Rename mod128.ll to divmod128.ll and add test cases for sdiv/udiv/urem. (details)
  3. [CMake] Simplify CMake handling for zlib (details)
  4. [ELF] Allow SHF_LINK_ORDER sections to have sh_link=0 (details)
  5. [Analyzer][WebKit] UncountedLambdaCaptureChecker (details)
  6. [ELF][test] Add REQUIES: x86 and -triple=x86_64 to linkorder-mixed.s (details)
  7. [ELF] Fix type of ciesWithLSDA after D84610 (details)
  8. [gn build] Port 820e8d8656e (details)
  9. [mlir] [VectorOps] Add masked load/store operations to Vector dialect (details)
  10. [MSSA] Update test with more detailed and resilient checks. [NFC] (details)
  11. [lld-macho] Fix errant search and replace. NFC (details)
  12. [ELF][test] Add another -triple=x86_64 to linkorder-mixed.s (details)
  13. [JumpThreading] Add a test that duplicates insts of a basic block with cond br to preds; NFC (details)
  14. [JumpThreading] Allow duplicating a basic block into preds when its branch condition is freeze(phi) (details)
  15. [flang] Fix compilation warning in check-directive-structure.h (details)
Commit 4103f4a936ae6eb060d84d007b1d64c17ddf1a91 by aeubanks
[MSSA][NewPM] Handle tests with -print-memoryssa

-print-memoryssa in legacy PM is print<memoryssa> in NPM.
Pin tests with -print-memoryssa to legacy PM.
Add corresponding tests for NPM where missing.
This fixes "unknown pass name 'print-memoryssa'".

Some tests still fail in Analysis/MemorySSA due to other passes that
haven't been ported.

pr43427.ll and pr43438.ll required adding -aa-pipeline=basic-aa,
-loop-simplify (since it doesn't run on legacy PM by default), and
decrementing some of the MemoryPhi numbers.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D85333
The file was modifiedllvm/test/Analysis/MemorySSA/lifetime-simple.ll
The file was modifiedllvm/test/Analysis/MemorySSA/many-dom-backedge.ll
The file was modifiedllvm/test/Analysis/MemorySSA/volatile-clobber.ll
The file was modifiedllvm/test/Analysis/MemorySSA/multiple-backedges-hal.ll
The file was modifiedllvm/test/Analysis/MemorySSA/pr36883.ll
The file was modifiedllvm/test/Analysis/MemorySSA/atomic-clobber.ll
The file was modifiedllvm/test/Analysis/MemorySSA/pr28880.ll
The file was modifiedllvm/test/Analysis/MemorySSA/pr43438.ll
The file was modifiedllvm/test/Analysis/MemorySSA/assume.ll
The file was modifiedllvm/test/Analysis/MemorySSA/multiple-locations.ll
The file was modifiedllvm/test/Analysis/MemorySSA/no-disconnected.ll
The file was modifiedllvm/test/Analysis/MemorySSA/many-doms.ll
The file was modifiedllvm/test/Analysis/MemorySSA/loop-rotate-disablebasicaa.ll
The file was modifiedllvm/test/Analysis/MemorySSA/update_unroll.ll
The file was modifiedllvm/test/Analysis/MemorySSA/debugvalue2.ll
The file was modifiedllvm/test/Analysis/MemorySSA/phi-translation.ll
The file was modifiedllvm/test/Analysis/MemorySSA/constant-memory.ll
The file was modifiedllvm/test/Analysis/MemorySSA/pr41640.ll
The file was modifiedllvm/test/Analysis/MemorySSA/invariant-groups.ll
The file was modifiedllvm/test/Analysis/MemorySSA/ptr-const-mem.ll
The file was modifiedllvm/test/Analysis/MemorySSA/load-invariant.ll
The file was modifiedllvm/test/Analysis/MemorySSA/pr43317.ll
The file was modifiedllvm/test/Analysis/MemorySSA/pr43427.ll
The file was modifiedllvm/test/Analysis/MemorySSA/multi-edges.ll
The file was modifiedllvm/test/Analysis/MemorySSA/optimize-use.ll
The file was modifiedllvm/test/Analysis/MemorySSA/function-mem-attrs.ll
The file was modifiedllvm/test/Analysis/MemorySSA/scalable-vec.ll
The file was modifiedllvm/test/Analysis/MemorySSA/basicaa-memcpy.ll
The file was modifiedllvm/test/Analysis/MemorySSA/function-clobber.ll
The file was modifiedllvm/test/Analysis/MemorySSA/loop_rotate_remove_trivial_phis.ll
The file was modifiedllvm/test/Analysis/MemorySSA/cyclicphi.ll
Commit 978165bf02776a2b957c795a5c1d94f9f208fc8e by craig.topper
[X86] Rename mod128.ll to divmod128.ll and add test cases for sdiv/udiv/urem.

This improves code coverage on the switch in LowerWin64_i128OP.
The file was removedllvm/test/CodeGen/X86/mod128.ll
The file was addedllvm/test/CodeGen/X86/divmod128.ll
Commit 1adc494bce44f6004994deed61b30d4b71fe1d05 by phosek
[CMake] Simplify CMake handling for zlib

Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.

This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.

Differential Revision: https://reviews.llvm.org/D79219
The file was modifiedllvm/include/llvm/Config/config.h.cmake
The file was modifiedllvm/cmake/modules/LLVMConfig.cmake.in
The file was modifiedllvm/lib/Support/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/lld/test/BUILD.gn
The file was modifiedllvm/lib/Support/CRC.cpp
The file was modifiedlldb/cmake/modules/LLDBStandalone.cmake
The file was modifiedllvm/lib/Support/Compression.cpp
The file was modifiedlld/test/CMakeLists.txt
The file was modifiedllvm/utils/gn/secondary/llvm/test/BUILD.gn
The file was modifiedcompiler-rt/test/lit.common.configured.in
The file was modifiedllvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
The file was modifiedclang/test/lit.site.cfg.py.in
The file was modifiedllvm/test/lit.site.cfg.py.in
The file was modifiedclang/test/CMakeLists.txt
The file was modifiedlld/test/lit.site.cfg.py.in
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
The file was modifiedllvm/test/CMakeLists.txt
The file was modifiedllvm/unittests/Support/CompressionTest.cpp
The file was modifiedllvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
The file was modifiedllvm/cmake/config-ix.cmake
The file was modifiedllvm/utils/gn/secondary/clang/test/BUILD.gn
Commit b216c80cc2496b87bf827260ce7e24dc62247d71 by i
[ELF] Allow SHF_LINK_ORDER sections to have sh_link=0

Part of https://bugs.llvm.org/show_bug.cgi?id=41734

The semantics of SHF_LINK_ORDER have been extended to represent metadata
sections associated with some other sections (usually text).

The associated text section may be discarded (e.g. LTO) and we want the
metadata section to have sh_link=0 (D72899, D76802).

Normally the metadata section is only referenced by the associated text
section. sh_link=0 means the associated text section is discarded, and
the metadata section will be garbage collected. If there is another
section (.gc_root) referencing the metadata section, the metadata
section will be retained. It's the .gc_root consumer's job to validate
the metadata sections.

  # This creates a SHF_LINK_ORDER .meta with sh_link=0
  .section .meta,"awo",@progbits,0
  1:
  .section .meta,"awo",@progbits,foo
  2:

  .section .gc_root,"a",@progbits
  .quad 1b
  .quad 2b

Reviewed By: pcc, jhenderson

Differential Revision: https://reviews.llvm.org/D72904
The file was modifiedlld/ELF/InputFiles.cpp
The file was modifiedlld/ELF/InputSection.cpp
The file was addedlld/test/ELF/linkorder-mixed.s
The file was modifiedlld/ELF/Writer.cpp
The file was removedlld/test/ELF/invalid/linkorder-invalid-sec2.test
Commit 820e8d8656ecf65ba29ea27c794c833f230c2698 by Jan Korous
[Analyzer][WebKit] UncountedLambdaCaptureChecker

Differential Revision: https://reviews.llvm.org/D82837
The file was addedclang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
The file was modifiedclang/docs/analyzer/checkers.rst
The file was modifiedclang/include/clang/StaticAnalyzer/Checkers/Checkers.td
The file was modifiedclang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
The file was addedclang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
Commit eb45b978b7d646a7fb96a2734e44d03b2a066dfa by i
[ELF][test] Add REQUIES: x86 and -triple=x86_64 to linkorder-mixed.s
The file was modifiedlld/test/ELF/linkorder-mixed.s
Commit 279e4cf78262dfef560631d643b85aa2032ac566 by i
[ELF] Fix type of ciesWithLSDA after D84610
The file was modifiedlld/ELF/SyntheticSections.cpp
Commit dd892a33e1ec28ff430c74b67d076344c51e4acb by llvmgnsyncbot
[gn build] Port 820e8d8656e
The file was modifiedllvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
Commit 39379916a7f01d907562c1b70114568dac1778a2 by ajcbik
[mlir] [VectorOps] Add masked load/store operations to Vector dialect

The intrinsics were already supported and vector.transfer_read/write lowered
direclty into these operations. By providing them as individual ops, however,
clients can used them directly, and it opens up progressively lowering transfer
operations at higher levels (rather than direct lowering to LLVM IR as done now).

Reviewed By: bkramer

Differential Revision: https://reviews.llvm.org/D85357
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
The file was modifiedmlir/test/Dialect/Vector/invalid.mlir
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-maskedload.mlir
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-maskedstore.mlir
The file was modifiedmlir/test/Dialect/Vector/ops.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Vector/VectorOps.td
The file was modifiedmlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
Commit beb9993d960bebc14f25538fa4b596f2d8ca75ac by asbirlea
[MSSA] Update test with more detailed and resilient checks. [NFC]
The file was modifiedllvm/test/Analysis/MemorySSA/pr43427.ll
Commit 8b9e86fea66fb626173bd62e1f8775fcfea69a6b by smeenai
[lld-macho] Fix errant search and replace. NFC
The file was modifiedlld/test/MachO/framework.s
Commit 3af4039876a148a841aecfae89d356033d022c74 by i
[ELF][test] Add another -triple=x86_64 to linkorder-mixed.s

Fixes an error on macOS:
error: mach-o section specifier uses an unknown section type
The file was modifiedlld/test/ELF/linkorder-mixed.s
Commit fd86d67b82830f1365e1e25fd138832b475bc1e7 by aqjune
[JumpThreading] Add a test that duplicates insts of a basic block with cond br to preds; NFC
The file was addedllvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll
Commit 9f717d7b941fbc42bef017b84c4dd0f65ce06e7a by aqjune
[JumpThreading] Allow duplicating a basic block into preds when its branch condition is freeze(phi)

This is the last JumpThreading patch for getting the performance numbers shown at
https://reviews.llvm.org/D84940#2184653 .

This patch makes ProcessBlock call ProcessBranchOnPHI when the branch condition
is freeze(phi) as well (originally it calls the function when the condition is
phi only).

Since what ProcessBranchOnPHI does is to duplicate the basic block into
predecessors if profitable, it is still valid when the condition is freeze(phi)
too.

```
    p = phi [a, pred1] [b, pred2]
    p.fr = freeze p
    br p.fr, ...
=>
  pred1:
    p.fr = freeze a
    br p.fr, ...
  pred2:
    p.fr2 = freeze b
    br p.fr2, ...
```

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D85029
The file was modifiedllvm/test/Transforms/JumpThreading/phi-copy-to-pred.ll
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
Commit 6d2d73059fda5a63f2b34a9482acc0445e0956a4 by tkeith
[flang] Fix compilation warning in check-directive-structure.h

Clang 9 gets the following warning after revision `D85104`.
```
../../flang/lib/Semantics/check-directive-structure.h:36:7: error: 'Fortran::semantics::DirectiveStructureChecker<llvm::omp::Directive, llvm::omp::Clause, Fortran::parser::OmpClause, 77>' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
```

The fix is the make the destructor virtual. Neither it nor the
constructor need to be public, so make them protected.

Differential Revision: https://reviews.llvm.org/D85383
The file was modifiedflang/lib/Semantics/check-directive-structure.h