[llvm] [GlobalISel] Refactor Combiner MatchData & Apply C++ Code Handling (PR #92239)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 01:06:45 PDT 2024


================
@@ -274,8 +274,32 @@ it's less verbose.
 
 
 Combine Rules also allow mixing C++ code with MIR patterns, so that you
-may perform additional checks when matching, or run additional code after
-rewriting a pattern.
+may perform additional checks when matching, or run a C++ action after
+matching.
+
+Note that C++ code in ``apply`` pattern is mutually exclusive with
+other patterns. However, you can freely mix C++ code with other
+types of patterns in ``match`` patterns.
+C++ code in ``match`` patterns is always ran last, after all other
----------------
arsenm wrote:

```suggestion
C++ code in ``match`` patterns is always run last, after all other
```

https://github.com/llvm/llvm-project/pull/92239


More information about the llvm-commits mailing list