SuccessChanges

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

Summary

  1. [llvm] Add assertions for the smart pointers with the possibility to be null in DWARFLinker::loadClangModule (details)
  2. [clang-tidy] Handle uninstantiated templates in redundant get check (details)
  3. [clang-tidy] Simplify shrink to fit check (details)
  4. [clang-tidy] Simplify default member init check (details)
  5. [clang-tidy] Simplify redundant member init check (details)
  6. [clang-tidy] Simplify suspicious enum usage check (details)
  7. [clang-tidy] Simplify redundant branch condition check (details)
  8. [clang-tidy] Simplify special member functions check (details)
  9. [clang-tidy] Simplify boolean expr check (details)
  10. [clang-tidy] Simplify suspicious memset usage check (details)
  11. [X86] Disable rematerializion for PTILELOADDV (details)
  12. [SimplifyCFG] avoid illegal phi with both poison and undef (details)
  13. [clang][Lifetimes] Fix false positive warning from BUG 49342 (details)
  14. Store (cache) the Argument number (index in the argument list) inside the BlockArgumentImpl (details)
  15. [lld-macho] Properly test subtractor relocations & fix their attributes (details)
  16. [lld-macho] Don't emit rebase opcodes for subtractor minuend relocs (details)
  17. [lld-macho] Add test for a variety of arm64 relocations (details)
  18. [lld-macho] Extract embedded addends for arm64 UNSIGNED relocations (details)
Commit df6fb4d392e530fbf9d4e331711c500d47980dcc by a.v.lapshin
[llvm] Add assertions for the smart pointers with the possibility to be null in DWARFLinker::loadClangModule

Split from D91844.

The local variable `Unit` in function `DWARFLinker::loadClangModule`
in file `llvm/lib/DWARFLinker/DWARFLinker.cpp`. If the variable is not set
in the loop below its definition, it will trigger a null pointer dereference
after the loop.

Patch By: OikawaKirie

Reviewed By: avl

Differential Revision: https://reviews.llvm.org/D97185
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp
Commit a5e3d87f66a1b833594f121fbd8c7334df5a1eeb by steveire
[clang-tidy] Handle uninstantiated templates in redundant get check

Differential Revision: https://reviews.llvm.org/D96222
The file was modifiedclang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.h
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/readability-redundant-smartptr-get.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/RedundantSmartptrGetCheck.cpp
Commit 296c6e85c19b7fc224109fe43af2fd9ed1d3d510 by steveire
[clang-tidy] Simplify shrink to fit check

Differential Revision: https://reviews.llvm.org/D97144
The file was modifiedclang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/ShrinkToFitCheck.h
Commit 9ba557cc0370ee5fa93dca04a20bd2b05bf19f45 by steveire
[clang-tidy] Simplify default member init check

Differential Revision: https://reviews.llvm.org/D97145
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/modernize/UseDefaultMemberInitCheck.h
Commit 35763baf9aa927c2e8fc0a4af484c51391ecc30c by steveire
[clang-tidy] Simplify redundant member init check

Differential Revision: https://reviews.llvm.org/D97147
The file was modifiedclang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/RedundantMemberInitCheck.h
Commit df42f9950d5e4aaea2038581188ed9d786d09213 by steveire
[clang-tidy] Simplify suspicious enum usage check

Differential Revision: https://reviews.llvm.org/D97149
The file was modifiedclang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/SuspiciousEnumUsageCheck.h
Commit a5feefa3c72e67ea94b50addf8f0975dae9a9696 by steveire
[clang-tidy] Simplify redundant branch condition check

Differential Revision: https://reviews.llvm.org/D97151
The file was modifiedclang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/RedundantBranchConditionCheck.h
Commit b672870886643a99dd74f3114995f2a091eab813 by steveire
[clang-tidy] Simplify special member functions check

Differential Revision: https://reviews.llvm.org/D97152
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
Commit 302cc8421ee4ac1cf910dd6cd3306c6eae8d0d3e by steveire
[clang-tidy] Simplify boolean expr check

Differential Revision: https://reviews.llvm.org/D97153
The file was modifiedclang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h
Commit 42ce00ec3947de89c1cda0138fe6adffeeeeace3 by steveire
[clang-tidy] Simplify suspicious memset usage check

Differential Revision: https://reviews.llvm.org/D97150
The file was modifiedclang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/bugprone/SuspiciousMemsetUsageCheck.h
Commit 42e025f9deab39717738e98309370c6df851b1c6 by pengfei.wang
[X86] Disable rematerializion for PTILELOADDV

Per the discussion in D97453. We currently disable it due to it's not a
common scenario and has some problem in implementation.

Differential Revision: https://reviews.llvm.org/D97453
The file was modifiedllvm/test/CodeGen/X86/AMX/amx-across-func.ll
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86InstrAMX.td
Commit 356cdabd3a9e0ff919ea2c1a35c8706ecb915297 by spatel
[SimplifyCFG] avoid illegal phi with both poison and undef

In the example based on:
https://llvm.org/PR49218
...we are crashing because poison is a subclass of undef, so we merge blocks and create:

PHI node has multiple entries for the same basic block with different incoming values!
  %k3 = phi i64 [ poison, %entry ], [ %k3, %g ], [ undef, %entry ]

If both poison and undef values are incoming, we soften the poison values to undef.

Differential Revision: https://reviews.llvm.org/D97495
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was addedllvm/test/Transforms/SimplifyCFG/poison-merge.ll
Commit dd6738d93de148f2239ef5be82a61cf8f5f71124 by xazax.hun
[clang][Lifetimes] Fix false positive warning from BUG 49342

Differential Revision: https://reviews.llvm.org/D97605
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/test/Sema/warn-lifetime-analysis-nocfg.cpp
Commit ee90bb3486948c472a67ec3ca0f0d64927f6643d by joker.eph
Store (cache) the Argument number (index in the argument list) inside the BlockArgumentImpl

This avoids linear search in BlockArgument::getArgNumber().

Differential Revision: https://reviews.llvm.org/D97596
The file was modifiedmlir/include/mlir/IR/Value.h
The file was modifiedmlir/lib/IR/Block.cpp
Commit cc5c03e10957b8dd4ba4efbc5583084c7636a3ba by jezng
[lld-macho] Properly test subtractor relocations & fix their attributes

`llvm-mc` doesn't generate any relocations for subtractions
between local symbols -- they must be global -- so the previous test
wasn't actually testing any relocation logic. I've fixed that and
extended the test to cover r_length=3 relocations as well as both x86_64
and arm64.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D97057
The file was modifiedlld/MachO/Arch/X86_64.cpp
The file was addedlld/test/MachO/reloc-subtractor.s
The file was removedlld/test/MachO/x86-64-reloc-subtract.s
The file was modifiedlld/MachO/Arch/ARM64.cpp
Commit 541390131ef72a8dad93c936d816279c8b76374e by jezng
[lld-macho] Don't emit rebase opcodes for subtractor minuend relocs

Also add a few asserts to verify that we are indeed handling an
UNSIGNED relocation as the minued. I haven't made it an actual
user-facing error since I don't think llvm-mc is capable of generating
SUBTRACTOR relocations without an associated UNSIGNED.

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D97103
The file was modifiedlld/test/MachO/reloc-subtractor.s
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/MachO/InputSection.cpp
The file was modifiedlld/MachO/Arch/ARM64.cpp
The file was modifiedlld/MachO/Target.h
The file was modifiedlld/MachO/Writer.cpp
Commit 8da88d4b605bd3e596fc26845969ba83a6bf076d by jezng
[lld-macho] Add test for a variety of arm64 relocations

Reviewed By: #lld-macho, smeenai

Differential Revision: https://reviews.llvm.org/D97104
The file was modifiedlld/test/MachO/compact-unwind.s
The file was addedlld/test/MachO/arm64-relocs.s
Commit 82b3da6f6f0e91e47074f454907e82b284b8beda by jezng
[lld-macho] Extract embedded addends for arm64 UNSIGNED relocations

On arm64, UNSIGNED relocs are the only ones that use embedded addends
instead of the ADDEND relocation.

Also ensure that the addend works when UNSIGNED is part of a SUBTRACTOR
pair.

Reviewed By: #lld-macho, alexshap

Differential Revision: https://reviews.llvm.org/D97105
The file was modifiedlld/test/MachO/reloc-subtractor.s
The file was modifiedlld/MachO/Arch/ARM64.cpp
The file was modifiedlld/MachO/InputFiles.cpp
The file was modifiedlld/test/MachO/arm64-relocs.s