[PATCH] D157085: [TableGen] Do not compile CombineRuleBuilder::verify in release builds

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 05:00:05 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2532b68f684c: [TableGen]  Do not compile CombineRuleBuilder::verify in release builds (authored by Pierre-vh).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157085/new/

https://reviews.llvm.org/D157085

Files:
  llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp


Index: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
===================================================================
--- llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
+++ llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp
@@ -491,7 +491,9 @@
   void dump() const { print(dbgs()); }
 
   /// Debug-only verification of invariants.
+#ifndef NDEBUG
   void verify() const;
+#endif
 
 private:
   void PrintError(Twine Msg) const { ::PrintError(RuleDef.getLoc(), Msg); }
@@ -669,6 +671,7 @@
   OS << ")\n";
 }
 
+#ifndef NDEBUG
 void CombineRuleBuilder::verify() const {
   const auto VerifyPats = [&](const PatternMap &Pats) {
     for (const auto &[Name, Pat] : Pats) {
@@ -706,6 +709,7 @@
     }
   }
 }
+#endif
 
 bool CombineRuleBuilder::addFeaturePredicates(RuleMatcher &M) {
   if (!RuleDef.getValue("Predicates"))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157085.547169.patch
Type: text/x-patch
Size: 859 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230804/448574ac/attachment.bin>


More information about the llvm-commits mailing list