SuccessChanges

Summary

  1. [NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline (details)
  2. [ConstantFold] Fold binary arithmetic on scalable vector splats. (details)
  3. [NFC] Remove unused static function (details)
  4. Fix a typo in 31ecf8d29d81d196374a562c6d2bd2c25a62861e (details)
  5. [gn build] Port 31ecf8d29d8 (details)
  6. [ConstantFold] Make areGlobalsPotentiallyEqual less aggressive. (details)
  7. [lldb] Use GetNonKVOClassDescriptor to get the NSDictionary class descriptor (details)
Commit 31ecf8d29d81d196374a562c6d2bd2c25a62861e by Yuanfang Chen
[NewPM][CodeGen] Introduce CodeGenPassBuilder to help build codegen pipeline

Following up on D67687.
Please refer to the RFC here http://lists.llvm.org/pipermail/llvm-dev/2020-July/143309.html

`CodeGenPassBuilder` is the NPM counterpart of `TargetPassConfig` with below differences.
- Debugging features (MIR print/verify, disable pass, start/stop-before/after, etc.) living in `TargetPassConfig` are moved to use PassInstrument as much as possible. (Implementation also lives in `TargetPassConfig.cpp`)
- `TargetPassConfig` is a polymorphic base (virtual inheritance) to build the target-dependent pipeline whereas `CodeGenPassBuilder` is the CRTP base/helper to implement the target-dependent pipeline. The motivation is flexibility for targets to customize the pipeline, inlining opportunity, and fits the overall NPM value semantics design.
- `TargetPassConfig` is a legacy immutable pass to declare hooks for targets to customize some target-independent codegen layer behavior. This is partially ported to TargetMachine::options. The rest, such as `createMachineScheduler/createPostMachineScheduler`, are left out for now. They should be implemented in LLVMTargetMachine in the future.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D83608
The file was modifiedllvm/include/llvm/Passes/StandardInstrumentations.h (diff)
The file was addedllvm/lib/CodeGen/CodeGenPassBuilder.cpp
The file was modifiedllvm/include/llvm/Target/TargetMachine.h (diff)
The file was addedllvm/include/llvm/CodeGen/CGPassBuilderOption.h
The file was addedllvm/include/llvm/CodeGen/MachinePassRegistry.def
The file was modifiedllvm/lib/CodeGen/TargetPassConfig.cpp (diff)
The file was modifiedllvm/lib/CodeGen/LLVMTargetMachine.cpp (diff)
The file was modifiedllvm/lib/CodeGen/CMakeLists.txt (diff)
The file was addedllvm/include/llvm/CodeGen/CodeGenPassBuilder.h
Commit 37f2776d1af27a38ba4fabf3b356d71590f70d90 by efriedma
[ConstantFold] Fold binary arithmetic on scalable vector splats.

It's a nice simplification, and it confuses instcombine if we don't do
it.

Differential Revision: https://reviews.llvm.org/D87422
The file was modifiedllvm/lib/IR/ConstantFold.cpp (diff)
The file was modifiedllvm/test/Transforms/InstSimplify/ConstProp/vscale.ll (diff)
Commit a8503b87f739776cc9d5738f69aa0990db952340 by Vitaly Buka
[NFC] Remove unused static function
The file was modifiedclang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp (diff)
Commit 3fdaa8602a086a3fca5f0fc8527536ac659079d0 by Yuanfang Chen
Fix a typo in 31ecf8d29d81d196374a562c6d2bd2c25a62861e
The file was modifiedllvm/include/llvm/CodeGen/CodeGenPassBuilder.h (diff)
Commit c931dc0bf596ed0a6c4531b0e1f05bd8bda566a6 by llvmgnsyncbot
[gn build] Port 31ecf8d29d8
The file was modifiedllvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn (diff)
Commit d751f86189a7f7ef2a6fe06974a5da3349b02f20 by efriedma
[ConstantFold] Make areGlobalsPotentiallyEqual less aggressive.

In particular, we shouldn't make assumptions about globals which are
unnamed_addr: we can fold them together with other globals.

Also while I'm here, use isInterposable() instead of trying to
explicitly name all the different kinds of weak linkage.

Fixes https://bugs.llvm.org/show_bug.cgi?id=47090

Differential Revision: https://reviews.llvm.org/D87123
The file was modifiedllvm/test/Assembler/ConstantExprNoFold.ll (diff)
The file was modifiedllvm/lib/IR/ConstantFold.cpp (diff)
The file was modifiedllvm/test/Transforms/InstCombine/2010-03-03-ExtElim.ll (diff)
Commit 33eb64704292dc2fc8585b8aa7459f96482c6cf9 by Jonas Devlieghere
[lldb] Use GetNonKVOClassDescriptor to get the NSDictionary class descriptor

On macOS Big Sur the class descriptor contains the NSKVONotifying_
prefix. This is covered by TestDataFormatterObjCKVO.

Differential revision: https://reviews.llvm.org/D87545
The file was modifiedlldb/source/Plugins/Language/ObjC/NSDictionary.cpp (diff)