SuccessChanges

Summary

  1. [GlobalISel] Add G_UNMERGE_VALUES(G_MERGE_VALUES) combine (details)
  2. Revert "[docs][NewPM] Add docs for writing NPM passes" (details)
  3. [GISel]: Add combine for G_FABS to G_FABS (details)
  4. Reland [docs][NewPM] Add docs for writing NPM passes (details)
  5. [Hexagon] Some HVX DAG combines (details)
  6. [Hexagon] Widen loads and handle any-/sign-/zero-extensions (details)
Commit 670c276232ec2233323fab5ad4c1aeef923e9e48 by qcolombet
[GlobalISel] Add G_UNMERGE_VALUES(G_MERGE_VALUES) combine

Add the matching and applying function to the combiner helper for
G_UNMERGE_VALUES(G_MERGE_VALUES).

This combine also supports any merge-like input nodes, like G_BUILD_VECTORS
and is robust against bitcasts in between int unmerge and merge nodes.

When the input type of the merge node and the output type of the unmerge
node are not the same, but the sizes are, the combine still applies but
creates bitcasts between the sources and the destinations instead of
reusing the destinations directly.

Long term, the artifact combiner should probably reuse that helper, but
as of today, it doesn't use any outside helper, so I kept it this way.

Differential Revision: https://reviews.llvm.org/D87117
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h (diff)
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td (diff)
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/combine-unmerge.mir
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp (diff)
Commit 39ec36415df5162fcffae09fde9b931e336a6f3d by aeubanks
Revert "[docs][NewPM] Add docs for writing NPM passes"

This reverts commit c2590de30df23ef0db39b496cdec62a83a61fbfa.

Breaks shared libs build
The file was removedllvm/test/Transforms/HelloNew/helloworld.ll
The file was removedllvm/lib/Transforms/HelloNew/CMakeLists.txt
The file was modifiedllvm/lib/Passes/LLVMBuild.txt (diff)
The file was removedllvm/lib/Transforms/HelloNew/HelloWorld.cpp
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn (diff)
The file was modifiedllvm/lib/Transforms/CMakeLists.txt (diff)
The file was modifiedllvm/docs/WritingAnLLVMPass.rst (diff)
The file was removedllvm/utils/gn/secondary/llvm/lib/Transforms/HelloNew/BUILD.gn
The file was removedllvm/docs/WritingAnLLVMNewPMPass.rst
The file was removedllvm/include/llvm/Transforms/HelloNew/HelloWorld.h
The file was modifiedllvm/lib/Transforms/LLVMBuild.txt (diff)
The file was modifiedllvm/lib/Passes/PassBuilder.cpp (diff)
The file was modifiedllvm/docs/UserGuides.rst (diff)
The file was modifiedllvm/lib/Passes/PassRegistry.def (diff)
The file was removedllvm/lib/Transforms/HelloNew/LLVMBuild.txt
Commit 46f9137e43f3eb2de9990765a4c482b45b0f8dd5 by aditya_nandakumar
[GISel]: Add combine for G_FABS to G_FABS

https://reviews.llvm.org/D87554

Patch adds one new GICombinerRule for G_FABS. The combine rule folds G_FABS(G_FABS(X)) to G_FABS(X).
Patch additionally adds new combiner tests for the AArch64 target to test this new combiner rule.

Patch by mkitzan.
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp (diff)
The file was modifiedllvm/include/llvm/Target/GlobalISel/Combine.td (diff)
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/combine-fabs.mir
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h (diff)
Commit 10b12d4035de40e5eaedddda82d9c533854eefcb by aeubanks
Reland [docs][NewPM] Add docs for writing NPM passes

As to not conflict with the legacy PM example passes under
llvm/lib/Transforms/Hello, this is under HelloNew. This makes the
CMakeLists.txt and general directory structure less confusing for people
following the example.

Much of the doc structure was taken from WritinAnLLVMPass.rst.

This adds a HelloWorld pass which simply prints out each function name.

More will follow after this, e.g. passes over different units of IR, analyses.
https://llvm.org/docs/WritingAnLLVMPass.html contains a lot more.

Relanded with missing "Support" dependency in LLVMBuild.txt.

Reviewed By: ychen, asbirlea

Differential Revision: https://reviews.llvm.org/D86979
The file was addedllvm/test/Transforms/HelloNew/helloworld.ll
The file was modifiedllvm/lib/Passes/PassBuilder.cpp (diff)
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn (diff)
The file was addedllvm/docs/WritingAnLLVMNewPMPass.rst
The file was modifiedllvm/lib/Transforms/LLVMBuild.txt (diff)
The file was modifiedllvm/lib/Passes/PassRegistry.def (diff)
The file was modifiedllvm/lib/Transforms/CMakeLists.txt (diff)
The file was addedllvm/lib/Transforms/HelloNew/LLVMBuild.txt
The file was modifiedllvm/lib/Passes/LLVMBuild.txt (diff)
The file was modifiedllvm/docs/UserGuides.rst (diff)
The file was addedllvm/lib/Transforms/HelloNew/HelloWorld.cpp
The file was addedllvm/include/llvm/Transforms/HelloNew/HelloWorld.h
The file was addedllvm/utils/gn/secondary/llvm/lib/Transforms/HelloNew/BUILD.gn
The file was modifiedllvm/docs/WritingAnLLVMPass.rst (diff)
The file was addedllvm/lib/Transforms/HelloNew/CMakeLists.txt
Commit 6352381039c43c66f01a23be19472f7e611ffcdf by kparzysz
[Hexagon] Some HVX DAG combines

1. VINSERTW0 x, undef -> x
2. VROR (VROR x, a), b) -> VROR x, a+b
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (diff)
Commit bb877d1af2ec2f624caa380350c8da00c984e754 by kparzysz
[Hexagon] Widen loads and handle any-/sign-/zero-extensions
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.h (diff)
The file was addedllvm/test/CodeGen/Hexagon/autohvx/widen-ext.ll
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp (diff)
The file was modifiedllvm/lib/Target/Hexagon/HexagonPatternsHVX.td (diff)
The file was modifiedllvm/lib/Target/Hexagon/HexagonISelLowering.cpp (diff)