[llvm] [SelectionDAG] Add space-optimized forms of OPC_CheckPatternPredicate (PR #73319)

Wang Pengcheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 03:47:52 PST 2024


================
@@ -573,8 +572,10 @@ bool MatcherGen::EmitMatcherCode(unsigned Variant) {
   // If the pattern has a predicate on it (e.g. only enabled when a subtarget
   // feature is around, do the check).
   std::string PredicateCheck = Pattern.getPredicateCheck();
-  if (!PredicateCheck.empty())
+  if (!PredicateCheck.empty()) {
+    CGP.increasePatternPredicateUsage(PredicateCheck);
----------------
wangpc-pp wrote:

No, it's related. It's for increasing the usage of `PatternPredicate`.

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


More information about the llvm-commits mailing list